diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-09-10 23:59:08 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-09-10 23:59:08 +0300 |
commit | 259ea9d7034566760785fd5253f97b65ee8cd6ed (patch) | |
tree | 421140d6bf14e32f09acc4d0180d2273a9e88965 /libmpcodecs | |
parent | b56858342fdbe48489618107df75e5bd0451eb0b (diff) | |
parent | 60a3099c0db23d03b9f2501c2ef2cf35847b30a7 (diff) | |
download | mpv-259ea9d7034566760785fd5253f97b65ee8cd6ed.tar.bz2 mpv-259ea9d7034566760785fd5253f97b65ee8cd6ed.tar.xz |
Merge svn changes up to r27573
Conflicts:
libmpcodecs/vd_ffmpeg.c
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/ad_ffmpeg.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vd_libmpeg2.c | 2 | ||||
-rw-r--r-- | libmpcodecs/vd_zrmjpeg.c | 21 | ||||
-rw-r--r-- | libmpcodecs/ve_lavc.c | 11 | ||||
-rw-r--r-- | libmpcodecs/vf_bmovl.c | 22 | ||||
-rw-r--r-- | libmpcodecs/vf_qp.c | 5 | ||||
-rw-r--r-- | libmpcodecs/vf_zrmjpeg.c | 38 |
8 files changed, 81 insertions, 26 deletions
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index cef9819831..a8a8a18120 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -63,7 +63,7 @@ static int init(sh_audio_t *sh_audio) lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec; lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8; lavc_context->block_align = sh_audio->wf->nBlockAlign; - lavc_context->bits_per_sample = sh_audio->wf->wBitsPerSample; + lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample; } lavc_context->request_channels = audio_output_channels; lavc_context->codec_tag = sh_audio->format; //FOURCC diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 78e705318d..d4a43a5724 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -20,7 +20,7 @@ static const vd_info_t info = { "ffmpeg", "A'rpi", "A'rpi, Michael, Alex", - "native codecs (http://ffmpeg.sf.net/)" + "native codecs" }; LIBVD_EXTERN(ffmpeg) @@ -266,7 +266,7 @@ static int init(sh_video_t *sh){ avctx->width = sh->disp_w; avctx->height= sh->disp_h; avctx->workaround_bugs= lavc_param->workaround_bugs; - avctx->error_resilience= lavc_param->error_resilience; + avctx->error_recognition= lavc_param->error_resilience; if(lavc_param->gray) avctx->flags|= CODEC_FLAG_GRAY; #ifdef CODEC_FLAG2_FAST avctx->flags2|= lavc_param->fast; @@ -384,7 +384,7 @@ static int init(sh_video_t *sh){ } if(sh->bih) - avctx->bits_per_sample= sh->bih->biBitCount; + avctx->bits_per_coded_sample= sh->bih->biBitCount; if(lavc_param->threads > 1) avcodec_thread_init(avctx, lavc_param->threads); diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c index 3bd17a4e0e..eeab4b23be 100644 --- a/libmpcodecs/vd_libmpeg2.c +++ b/libmpcodecs/vd_libmpeg2.c @@ -11,7 +11,7 @@ static const vd_info_t info = { - "MPEG 1/2 Video decoder libmpeg2-v0.4.0b", + "libmpeg2 MPEG 1/2 Video decoder", "libmpeg2", "A'rpi & Fabian Franz", "Aaron & Walken", diff --git a/libmpcodecs/vd_zrmjpeg.c b/libmpcodecs/vd_zrmjpeg.c index 6f8ce58fcf..a2d1d21e8b 100644 --- a/libmpcodecs/vd_zrmjpeg.c +++ b/libmpcodecs/vd_zrmjpeg.c @@ -1,9 +1,26 @@ /* - * Copyright (C) 2005 Rik Snel <rsnel@cube.dyndns.org>, license GPL v2 or later - * - based on vd_mpegpes.c by A'rpi (C) 2002-2003 + * Copyright (C) 2005 Rik Snel <rsnel@cube.dyndns.org> + * - based on vd_mpegpes.c by A'rpi (C) 2002-2003 * - guess_mjpeg_type code stolen from lav_io.c (C) 2000 Rainer Johanni * <Rainer@Johanni.de> from the mjpegtools package + * + * 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 <stdio.h> #include <stdlib.h> diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 1904330ac3..653ae37750 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -240,7 +240,7 @@ m_option_t lavcopts_conf[]={ {"predia", &lavc_param_pre_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL}, {"dia", &lavc_param_dia_size, CONF_TYPE_INT, CONF_RANGE, -2000, 2000, NULL}, {"qpel", &lavc_param_qpel, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL, NULL}, - {"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT, NULL}, + {"trell", &lavc_param_trell, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"lowdelay", &lavc_param_lowdelay, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_LOW_DELAY, NULL}, {"last_pred", &lavc_param_last_pred, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL}, {"preme", &lavc_param_pre_me, CONF_TYPE_INT, CONF_RANGE, 0, 2000, NULL}, @@ -369,7 +369,6 @@ static int config(struct vf_instance* vf, lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold; lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold; lavc_venc_context->rtp_payload_size= lavc_param_packet_size; - if(lavc_param_packet_size )lavc_venc_context->rtp_mode=1; lavc_venc_context->strict_std_compliance= lavc_param_strict; lavc_venc_context->i_quant_factor= lavc_param_vi_qfactor; lavc_venc_context->i_quant_offset= (int)(FF_QP2LAMBDA * lavc_param_vi_qoffset + 0.5); @@ -540,7 +539,7 @@ static int config(struct vf_instance* vf, #endif lavc_venc_context->dia_size= lavc_param_dia_size; lavc_venc_context->flags|= lavc_param_qpel; - lavc_venc_context->flags|= lavc_param_trell; + lavc_venc_context->trellis = lavc_param_trell; lavc_venc_context->flags|= lavc_param_lowdelay; lavc_venc_context->flags|= lavc_param_bit_exact; lavc_venc_context->flags|= lavc_param_aic; @@ -665,7 +664,7 @@ static int config(struct vf_instance* vf, lavc_venc_context->flags &= ~CODEC_FLAG_QPEL; lavc_venc_context->flags &= ~CODEC_FLAG_4MV; - lavc_venc_context->flags &= ~CODEC_FLAG_TRELLIS_QUANT; + lavc_venc_context->trellis = 0; lavc_venc_context->flags &= ~CODEC_FLAG_CBP_RD; lavc_venc_context->flags &= ~CODEC_FLAG_QP_RD; lavc_venc_context->flags &= ~CODEC_FLAG_MV0; @@ -700,8 +699,8 @@ static int config(struct vf_instance* vf, /* free second pass buffer, its not needed anymore */ av_freep(&lavc_venc_context->stats_in); - if(lavc_venc_context->bits_per_sample) - mux_v->bih->biBitCount= lavc_venc_context->bits_per_sample; + if(lavc_venc_context->bits_per_coded_sample) + mux_v->bih->biBitCount= lavc_venc_context->bits_per_coded_sample; if(lavc_venc_context->extradata_size){ mux_v->bih= realloc(mux_v->bih, sizeof(BITMAPINFOHEADER) + lavc_venc_context->extradata_size); memcpy(mux_v->bih + 1, lavc_venc_context->extradata, lavc_venc_context->extradata_size); diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index 0cadc63b70..1c16d60ca7 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -1,8 +1,26 @@ -/* vf_bmovl.c v0.9.1 - BitMap OVerLay videofilter for MPlayer +/* + * vf_bmovl.c v0.9.1 - BitMap OVerLay video filter for MPlayer * * (C) 2002 Per Wigren <wigren@home.se> - * Licenced under the GNU General Public License * + * 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. + */ + +/* * Use MPlayer as a framebuffer to read bitmaps and commands from a FIFO * and display them in the window. * diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c index c8605c76c5..b08a0d5523 100644 --- a/libmpcodecs/vf_qp.c +++ b/libmpcodecs/vf_qp.c @@ -75,7 +75,10 @@ static int config(struct vf_instance* vf, NULL }; - vf->priv->lut[i+129]= lrintf(ff_eval(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL)); + const char *error = NULL; + vf->priv->lut[i+129]= lrintf(ff_eval2(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error)); + if (error) + mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\": %s\n", vf->priv->eq, error); } return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index 193ac6e5da..546c63cf10 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -1,20 +1,38 @@ -/** - * \file vf_zrmjpeg.c - * - * \brief Does mjpeg encoding as required by the zrmjpeg filter as well - * as by the zr video driver. - */ /* - * Copyright (C) 2005 Rik Snel <rsnel@cube.dyndns.org>, license GPL v2 or later - * - based on vd_lavc.c by A'rpi (C) 2002-2003 - * - parts from ffmpeg Copyright (c) 2000-2003 Fabrice Bellard - * * This files includes a straightforward (to be) optimized JPEG encoder for * the YUV422 format, based on mjpeg code from ffmpeg. * * For an excellent introduction to the JPEG format, see: * http://www.ece.purdue.edu/~bouman/grad-labs/lab8/pdf/lab.pdf + * + * Copyright (C) 2005 Rik Snel <rsnel@cube.dyndns.org> + * - based on vd_lavc.c by A'rpi (C) 2002-2003 + * - parts from ffmpeg Copyright (c) 2000-2003 Fabrice Bellard + * + * 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 vf_zrmjpeg.c + * + * \brief Does mjpeg encoding as required by the zrmjpeg filter as well + * as by the zr video driver. */ + #include <stdio.h> #include <stdlib.h> #include <string.h> |