mirror of https://github.com/mpv-player/mpv
Merge svn changes up to r31050
This commit is contained in:
commit
9a34ae4fd0
|
@ -1,4 +1,4 @@
|
|||
.\" sync with en/mplayer.1 rev. 30936
|
||||
.\" sync with en/mplayer.1 rev. 31028
|
||||
.\" Encoding: UTF-8
|
||||
.\" Reminder of hard terms which need better/final solution later:
|
||||
.\" /capture; playtree in parent list; colorkey; retrace; desync; downmix;
|
||||
|
@ -289,6 +289,8 @@ MPlayer 有个完全可配置的, 命令驱动的控制层,
|
|||
开始/停止截屏。
|
||||
.IPs "I\ \ \ \ "
|
||||
用 OSD 显示文件名。
|
||||
.IPs "P\ \ \ \ "
|
||||
在 OSD 上显示进度条、已播放时间以及总长度信息。
|
||||
.IPs "! 和 @"
|
||||
寻到前一章节/后一章节的开始处。
|
||||
.IPs "D(仅用于\-vo xvmc, \-vo vdpau,\-vf yadif, \-vf kerndeint)"
|
||||
|
|
|
@ -7058,7 +7058,7 @@ if test "$_x264" = auto ; then
|
|||
cat > $TMPC << EOF
|
||||
#include <inttypes.h>
|
||||
#include <x264.h>
|
||||
#if X264_BUILD < 79
|
||||
#if X264_BUILD < 89
|
||||
#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; }
|
||||
|
|
|
@ -30,14 +30,15 @@
|
|||
#include "libmpcodecs/mp_image.h"
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
void mp_image_alloc_planes(mp_image_t *mpi) {
|
||||
// IF09 - allocate space for 4. plane delta info - unused
|
||||
if (mpi->imgfmt == IMGFMT_IF09) {
|
||||
mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8+
|
||||
mpi->planes[0]=av_malloc(mpi->bpp*mpi->width*(mpi->height+2)/8+
|
||||
mpi->chroma_width*mpi->chroma_height);
|
||||
} else
|
||||
mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8);
|
||||
mpi->planes[0]=av_malloc(mpi->bpp*mpi->width*(mpi->height+2)/8);
|
||||
if (mpi->flags&MP_IMGFLAG_PLANAR) {
|
||||
int bpp = IMGFMT_IS_YUVP16(mpi->imgfmt)? 2 : 1;
|
||||
// YV12/I420/YVU9/IF09. feel free to add other planar formats here...
|
||||
|
@ -65,7 +66,7 @@ void mp_image_alloc_planes(mp_image_t *mpi) {
|
|||
} else {
|
||||
mpi->stride[0]=mpi->width*mpi->bpp/8;
|
||||
if (mpi->flags & MP_IMGFLAG_RGB_PALETTE)
|
||||
mpi->planes[1] = memalign(64, 1024);
|
||||
mpi->planes[1] = av_malloc(1024);
|
||||
}
|
||||
mpi->flags|=MP_IMGFLAG_ALLOCATED;
|
||||
}
|
||||
|
@ -191,9 +192,9 @@ void free_mp_image(mp_image_t* mpi){
|
|||
if(!mpi) return;
|
||||
if(mpi->flags&MP_IMGFLAG_ALLOCATED){
|
||||
/* becouse we allocate the whole image in once */
|
||||
if(mpi->planes[0]) free(mpi->planes[0]);
|
||||
if(mpi->planes[0]) av_free(mpi->planes[0]);
|
||||
if (mpi->flags & MP_IMGFLAG_RGB_PALETTE)
|
||||
free(mpi->planes[1]);
|
||||
av_free(mpi->planes[1]);
|
||||
}
|
||||
free(mpi);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ static int init(sh_video_t *sh){
|
|||
if (sh->disp_w & 3)
|
||||
{
|
||||
ctx->stride = ((sh->disp_w * 3) + 3) & ~3;
|
||||
ctx->buffer = memalign(64, ctx->stride * sh->disp_h);
|
||||
ctx->buffer = av_malloc(ctx->stride * sh->disp_h);
|
||||
}
|
||||
default:
|
||||
DMO_VideoDecoder_SetDestFmt(ctx->decoder,out_fmt&255,0); // RGB/BGR
|
||||
|
@ -96,6 +96,7 @@ static int init(sh_video_t *sh){
|
|||
static void uninit(sh_video_t *sh){
|
||||
struct context *ctx = sh->context;
|
||||
DMO_VideoDecoder_Destroy(ctx->decoder);
|
||||
av_free(ctx->buffer);
|
||||
free(ctx);
|
||||
sh->context = NULL;
|
||||
}
|
||||
|
|
|
@ -152,6 +152,7 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in
|
|||
param.i_height = height;
|
||||
param.i_fps_num = mod->mux->h.dwRate;
|
||||
param.i_fps_den = mod->mux->h.dwScale;
|
||||
param.b_vfr_input = 0;
|
||||
param.vui.i_sar_width = d_width*height;
|
||||
param.vui.i_sar_height = d_height*width;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "vf.h"
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
extern const vf_info_t vf_info_vo;
|
||||
extern const vf_info_t vf_info_rectangle;
|
||||
|
@ -356,7 +357,7 @@ mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype,
|
|||
if(mpi->flags&MP_IMGFLAG_ALLOCATED){
|
||||
if(mpi->width<w2 || mpi->height<h){
|
||||
// need to re-allocate buffer memory:
|
||||
free(mpi->planes[0]);
|
||||
av_free(mpi->planes[0]);
|
||||
mpi->flags&=~MP_IMGFLAG_ALLOCATED;
|
||||
mp_msg(MSGT_VFILTER,MSGL_V,"vf.c: have to REALLOCATE buffer memory :(\n");
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
#include "libvo/fastmemcpy.h"
|
||||
#include "libavutil/mem.h"
|
||||
|
||||
#define MAX_NOISE 4096
|
||||
#define MAX_SHIFT 1024
|
||||
|
@ -80,7 +81,7 @@ static int8_t *initNoise(FilterParam *fp){
|
|||
int uniform= fp->uniform;
|
||||
int averaged= fp->averaged;
|
||||
int pattern= fp->pattern;
|
||||
int8_t *noise= memalign(16, MAX_NOISE*sizeof(int8_t));
|
||||
int8_t *noise= av_malloc(MAX_NOISE*sizeof(int8_t));
|
||||
int i, j;
|
||||
|
||||
srand(123457);
|
||||
|
@ -369,10 +370,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
|||
static void uninit(struct vf_instance* vf){
|
||||
if(!vf->priv) return;
|
||||
|
||||
if(vf->priv->chromaParam.noise) free(vf->priv->chromaParam.noise);
|
||||
if(vf->priv->chromaParam.noise) av_free(vf->priv->chromaParam.noise);
|
||||
vf->priv->chromaParam.noise= NULL;
|
||||
|
||||
if(vf->priv->lumaParam.noise) free(vf->priv->lumaParam.noise);
|
||||
if(vf->priv->lumaParam.noise) av_free(vf->priv->lumaParam.noise);
|
||||
vf->priv->lumaParam.noise= NULL;
|
||||
|
||||
free(vf->priv);
|
||||
|
|
|
@ -131,7 +131,7 @@ static void scale_image(struct vf_priv_s* priv, mp_image_t *mpi)
|
|||
|
||||
dst_stride[0] = priv->stride;
|
||||
if (!priv->buffer)
|
||||
priv->buffer = memalign(16, dst_stride[0]*priv->dh);
|
||||
priv->buffer = av_malloc(dst_stride[0]*priv->dh);
|
||||
|
||||
dst[0] = priv->buffer;
|
||||
sws_scale(priv->ctx, mpi->planes, mpi->stride, 0, priv->dh, dst, dst_stride);
|
||||
|
@ -144,7 +144,7 @@ static void start_slice(struct vf_instance* vf, mp_image_t *mpi)
|
|||
if (vf->priv->shot) {
|
||||
vf->priv->store_slices = 1;
|
||||
if (!vf->priv->buffer)
|
||||
vf->priv->buffer = memalign(16, vf->priv->stride*vf->priv->dh);
|
||||
vf->priv->buffer = av_malloc(vf->priv->stride*vf->priv->dh);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ static void uninit(vf_instance_t *vf)
|
|||
avcodec_close(vf->priv->avctx);
|
||||
av_freep(&vf->priv->avctx);
|
||||
if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
|
||||
if (vf->priv->buffer) free(vf->priv->buffer);
|
||||
if (vf->priv->buffer) av_free(vf->priv->buffer);
|
||||
free(vf->priv->outbuffer);
|
||||
free(vf->priv);
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ static int config( struct vf_instance* vf,
|
|||
stepsX = fp->msizeX/2;
|
||||
stepsY = fp->msizeY/2;
|
||||
for( z=0; z<2*stepsY; z++ )
|
||||
fp->SC[z] = memalign( 16, sizeof(*(fp->SC[z])) * (width+2*stepsX) );
|
||||
fp->SC[z] = av_malloc(sizeof(*(fp->SC[z])) * (width+2*stepsX));
|
||||
|
||||
fp = &vf->priv->chromaParam;
|
||||
effect = fp->amount == 0 ? "don't touch" : fp->amount < 0 ? "blur" : "sharpen";
|
||||
|
@ -152,7 +152,7 @@ static int config( struct vf_instance* vf,
|
|||
stepsX = fp->msizeX/2;
|
||||
stepsY = fp->msizeY/2;
|
||||
for( z=0; z<2*stepsY; z++ )
|
||||
fp->SC[z] = memalign( 16, sizeof(*(fp->SC[z])) * (width+2*stepsX) );
|
||||
fp->SC[z] = av_malloc(sizeof(*(fp->SC[z])) * (width+2*stepsX));
|
||||
|
||||
return vf_next_config( vf, width, height, d_width, d_height, flags, outfmt );
|
||||
}
|
||||
|
@ -212,12 +212,12 @@ static void uninit( struct vf_instance* vf ) {
|
|||
|
||||
fp = &vf->priv->lumaParam;
|
||||
for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
|
||||
if( fp->SC[z] ) free( fp->SC[z] );
|
||||
if( fp->SC[z] ) av_free( fp->SC[z] );
|
||||
fp->SC[z] = NULL;
|
||||
}
|
||||
fp = &vf->priv->chromaParam;
|
||||
for( z=0; z<sizeof(fp->SC)/sizeof(fp->SC[0]); z++ ) {
|
||||
if( fp->SC[z] ) free( fp->SC[z] );
|
||||
if( fp->SC[z] ) av_free( fp->SC[z] );
|
||||
fp->SC[z] = NULL;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue