passing pts through the filter layer (lets see if pts or cola comes out at the end)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17907 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
1 parent
aa6943767d
commit
02b199e5e9
80 files changed
+191
-180
No files matched your search
@@ -336,7 +336,7 @@ if(!mpi || drop_frame) return 0; // error / skipped frame
|
||||
|
||||
//vo_draw_image(video_out,mpi);
|
||||
vf=sh_video->vfilter;
|
||||
ret = vf->put_image(vf,mpi); // apply video filters and call the leaf vo/ve
|
||||
ret = vf->put_image(vf,mpi, MP_NOPTS_VALUE); // apply video filters and call the leaf vo/ve
|
||||
if(ret>0) vf->control(vf,VFCTRL_DRAW_OSD,NULL);
|
||||
|
||||
t2=GetTimer()-t2;
|
||||
|
||||
@@ -387,7 +387,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
ENC_RESULT enc_result;
|
||||
vf->priv->enc_frame.image=mpi->planes[0];
|
||||
vf->priv->enc_frame.bitstream=mux_v->buffer;
|
||||
|
||||
+13
-6
@@ -338,7 +338,7 @@ struct vf_priv_s {
|
||||
#define FF_QP2LAMBDA 1
|
||||
#endif
|
||||
|
||||
static int encode_frame(struct vf_instance_s* vf, AVFrame *pic);
|
||||
static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts);
|
||||
|
||||
static int config(struct vf_instance_s* vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
@@ -782,7 +782,7 @@ static int control(struct vf_instance_s* vf, int request, void* data){
|
||||
switch(request){
|
||||
case VFCTRL_FLUSH_FRAMES:
|
||||
if(vf->priv->codec->capabilities & CODEC_CAP_DELAY)
|
||||
while(encode_frame(vf, NULL) > 0);
|
||||
while(encode_frame(vf, NULL, MP_NOPTS_VALUE) > 0);
|
||||
return CONTROL_TRUE;
|
||||
default:
|
||||
return CONTROL_UNKNOWN;
|
||||
@@ -826,7 +826,7 @@ static double psnr(double d){
|
||||
return -10.0*log(d)/log(10);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
AVFrame *pic= vf->priv->pic;
|
||||
|
||||
pic->data[0]=mpi->planes[0];
|
||||
@@ -848,13 +848,17 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
#endif
|
||||
|
||||
return (encode_frame(vf, pic) >= 0);
|
||||
return (encode_frame(vf, pic, pts) >= 0);
|
||||
}
|
||||
|
||||
static int encode_frame(struct vf_instance_s* vf, AVFrame *pic){
|
||||
static int encode_frame(struct vf_instance_s* vf, AVFrame *pic, double pts){
|
||||
const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'};
|
||||
int out_size;
|
||||
|
||||
if(pic){
|
||||
pic->opaque= malloc(sizeof(pts));
|
||||
memcpy(pic->opaque, &pts, sizeof(pts));
|
||||
}
|
||||
out_size = avcodec_encode_video(lavc_venc_context, mux_v->buffer, mux_v->buffer_size,
|
||||
pic);
|
||||
|
||||
@@ -863,7 +867,10 @@ static int encode_frame(struct vf_instance_s* vf, AVFrame *pic){
|
||||
return 0;
|
||||
}
|
||||
|
||||
muxer_write_chunk(mux_v,out_size,lavc_venc_context->coded_frame->key_frame?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v,out_size,lavc_venc_context->coded_frame->key_frame?0x10:0,
|
||||
pts,
|
||||
*(double*)lavc_venc_context->coded_frame->opaque);
|
||||
free(lavc_venc_context->coded_frame->opaque);
|
||||
|
||||
#if LIBAVCODEC_BUILD >= 4643
|
||||
/* store psnr / pict size / type / qscale */
|
||||
|
||||
@@ -71,13 +71,13 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
|
||||
dv_encode_full_frame(vf->priv->enc, mpi->planes,
|
||||
(mpi->flags&MP_IMGFLAG_YUV) ? e_dv_color_yuv : e_dv_color_rgb,
|
||||
mux_v->buffer);
|
||||
|
||||
muxer_write_chunk(mux_v, 480 * (vf->priv->enc->isPAL ? 300 : 250) , 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v, 480 * (vf->priv->enc->isPAL ? 300 : 250) , 0x10, pts, pts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
struct rtframeheader* ench = (struct rtframeheader*)vf->priv->buffer;
|
||||
uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE;
|
||||
uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE;
|
||||
@@ -175,7 +175,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
ench->packetlength = len;
|
||||
le2me_rtframeheader(ench);
|
||||
mux_v->buffer=(void*)ench;
|
||||
muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
|
||||
static int codec_inited = 0;
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
|
||||
OSErr cres;
|
||||
long framesizemax;
|
||||
|
||||
@@ -115,9 +115,9 @@ static int query_format(struct vf_instance_s *vf, unsigned int fmt) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi) {
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts) {
|
||||
mux_v->buffer = mpi->planes[0];
|
||||
muxer_write_chunk(mux_v, mpi->width*mpi->height*mux_v->bih->biBitCount/8, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v, mpi->width*mpi->height*mux_v->bih->biBitCount/8, 0x10, pts, pts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -238,12 +238,12 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
long flags=0;
|
||||
int ret;
|
||||
// flip_upside_down(vo_image_ptr,vo_image_ptr,3*vo_w,vo_h); // dirty hack
|
||||
ret=vfw_encode_frame(mux_v->bih, mux_v->buffer, vfw_bih, mpi->planes[0], &flags, 10000);
|
||||
muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v,mux_v->bih->biSizeImage,flags, pts, pts);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -221,7 +221,7 @@ static int parse_cqm(const char *str, uint8_t *cqm, int length,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi);
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts);
|
||||
static int encode_frame(struct vf_instance_s *vf, x264_picture_t *pic_in);
|
||||
|
||||
static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt) {
|
||||
@@ -474,7 +474,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s *vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
h264_module_t *mod=(h264_module_t*)vf->priv;
|
||||
int i;
|
||||
|
||||
@@ -434,7 +434,7 @@ query_format(struct vf_instance_s* vf, unsigned int fmt)
|
||||
}
|
||||
|
||||
static int
|
||||
put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
XVID_ENC_STATS enc_stats;
|
||||
struct vf_priv_s *fp = vf->priv;
|
||||
|
||||
@@ -591,7 +591,7 @@ query_format(struct vf_instance_s* vf, unsigned int fmt)
|
||||
*==========================================================================*/
|
||||
|
||||
static int
|
||||
put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
int size;
|
||||
xvid_enc_stats_t stats;
|
||||
|
||||
+2
-2
@@ -630,8 +630,8 @@ int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
return flags;
|
||||
}
|
||||
|
||||
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi){
|
||||
return vf->next->put_image(vf->next,mpi);
|
||||
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts){
|
||||
return vf->next->put_image(vf->next,mpi, pts);
|
||||
}
|
||||
|
||||
void vf_next_draw_slice(struct vf_instance_s* vf,unsigned char** src, int * stride,int w, int h, int x, int y){
|
||||
|
||||
+6
-2
@@ -37,7 +37,7 @@ typedef struct vf_instance_s {
|
||||
void (*get_image)(struct vf_instance_s* vf,
|
||||
mp_image_t *mpi);
|
||||
int (*put_image)(struct vf_instance_s* vf,
|
||||
mp_image_t *mpi);
|
||||
mp_image_t *mpi, double pts);
|
||||
void (*start_slice)(struct vf_instance_s* vf,
|
||||
mp_image_t *mpi);
|
||||
void (*draw_slice)(struct vf_instance_s* vf,
|
||||
@@ -78,6 +78,10 @@ typedef struct vf_seteq_s
|
||||
|
||||
#include "vfcap.h"
|
||||
|
||||
//FIXME this should be in a common header, but i dunno which
|
||||
#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly
|
||||
|
||||
|
||||
// functions:
|
||||
void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h);
|
||||
mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h);
|
||||
@@ -96,7 +100,7 @@ int vf_next_config(struct vf_instance_s* vf,
|
||||
unsigned int flags, unsigned int outfmt);
|
||||
int vf_next_control(struct vf_instance_s* vf, int request, void* data);
|
||||
int vf_next_query_format(struct vf_instance_s* vf, unsigned int fmt);
|
||||
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi);
|
||||
int vf_next_put_image(struct vf_instance_s* vf,mp_image_t *mpi, double pts);
|
||||
void vf_next_draw_slice (struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
|
||||
|
||||
vf_instance_t* append_filters(vf_instance_t* last);
|
||||
|
||||
@@ -105,7 +105,7 @@ static void convert(mp_image_t *mpi, mp_image_t *dmpi, int value0, int value1,in
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -151,7 +151,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
return 0;
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -318,7 +318,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,2*width,2*height,2*d_width,2*d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -330,7 +330,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
dmpi->planes[0], dmpi->stride[0],
|
||||
mpi->w, mpi->h, mpi->bpp/8);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -199,7 +199,7 @@ _read_cmd(int fd, char *cmd, char *args) {
|
||||
|
||||
|
||||
static int
|
||||
put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){
|
||||
int buf_x=0, buf_y=0, buf_pos=0;
|
||||
int have, got, want;
|
||||
int xpos=0, ypos=0, pos=0;
|
||||
@@ -246,10 +246,10 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
else if( strncmp(cmd,"OPAQUE",6)==0 ) vf->priv->opaque=TRUE;
|
||||
else if( strncmp(cmd,"SHOW", 4)==0 ) vf->priv->hidden=FALSE;
|
||||
else if( strncmp(cmd,"HIDE", 4)==0 ) vf->priv->hidden=TRUE;
|
||||
else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi);
|
||||
else if( strncmp(cmd,"FLUSH" ,5)==0 ) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
else {
|
||||
mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Unknown command: '%s'. Ignoring.\n", cmd);
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
if(command == CMD_ALPHA) {
|
||||
@@ -268,7 +268,7 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
buffer = malloc(imgw*imgh*pxsz);
|
||||
if(!buffer) {
|
||||
mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Couldn't allocate temporary buffer! Skipping...\n\n");
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
/* pipes/sockets might need multiple calls to read(): */
|
||||
want = (imgw*imgh*pxsz);
|
||||
@@ -329,7 +329,7 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
if( (imgx <= vf->priv->x2) && ( (imgx+imgw) >= vf->priv->x2) )
|
||||
vf->priv->x2 = imgx;
|
||||
}
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
for( buf_y=0 ; (buf_y < imgh) && (buf_y < (vf->priv->h-imgy)) ; buf_y++ ) {
|
||||
@@ -387,7 +387,7 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
}
|
||||
}
|
||||
|
||||
if(vf->priv->hidden) return vf_next_put_image(vf, dmpi);
|
||||
if(vf->priv->hidden) return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
|
||||
if(vf->priv->opaque) { // Just copy buffer memory to screen
|
||||
for( ypos=vf->priv->y1 ; ypos < vf->priv->y2 ; ypos++ ) {
|
||||
@@ -439,7 +439,7 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
} // for xpos
|
||||
} // for ypos
|
||||
} // if !opaque
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
} // put_image
|
||||
|
||||
static int
|
||||
|
||||
@@ -132,7 +132,7 @@ static void vBlur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int s
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
|
||||
@@ -156,7 +156,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
vBlur(dmpi->planes[2], dmpi->planes[2], cw,ch,
|
||||
dmpi->stride[2], dmpi->stride[2], vf->priv->chromaParam.radius, vf->priv->chromaParam.power);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -67,10 +67,10 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,vf->priv->crop_w,vf->priv->crop_h,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
if (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
MP_IMGTYPE_EXPORT, 0,
|
||||
vf->priv->crop_w, vf->priv->crop_h);
|
||||
@@ -91,7 +91,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
dmpi->stride[0]=mpi->stride[0];
|
||||
dmpi->width=mpi->width;
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
@@ -55,7 +55,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
int bpp=mpi->bpp/8;
|
||||
int w,h,x,y,shrink_by;
|
||||
@@ -135,7 +135,7 @@ if(++vf->priv->fno>2){ // ignore first 2 frames - they may be empty
|
||||
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int query_format(struct vf_instance_s* vf, unsigned int fmt) {
|
||||
|
||||
@@ -110,7 +110,7 @@ static int diff_to_drop(int hi, int lo, float frac, mp_image_t *old, mp_image_t
|
||||
new->w*(new->bpp/8), new->h, old->stride[0], new->stride[0]);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -143,7 +143,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height,
|
||||
dmpi->stride[2], mpi->stride[2]);
|
||||
}
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf)
|
||||
|
||||
@@ -147,7 +147,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
@@ -170,7 +170,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
@@ -114,7 +114,7 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
|
||||
|
||||
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
int W = mpi->w, H = mpi->h;
|
||||
@@ -147,7 +147,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
vf->priv->Coefs[3] + 256);
|
||||
|
||||
vf->priv->pmpi=dmpi; // save reference image
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -327,10 +327,10 @@ static int do_put_image(struct vf_instance_s* vf, mp_image_t *dmpi)
|
||||
}
|
||||
|
||||
p->outframes++;
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
int ret=0;
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -62,7 +62,7 @@ static int config (struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image (struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image (struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
char rrow0[MAXROWSIZE];
|
||||
char rrow1[MAXROWSIZE];
|
||||
@@ -171,7 +171,7 @@ static int put_image (struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
}
|
||||
vf->priv->was_dint = 0;
|
||||
// mp_msg (MSGT_VFILTER, MSGL_INFO, "DI:%d/%d ", vf->priv->rdfr, vf->priv->dfr);
|
||||
return vf_next_put_image (vf, mpi);
|
||||
return vf_next_put_image (vf, mpi, pts);
|
||||
}
|
||||
|
||||
static int open (vf_instance_t *vf, char* args){
|
||||
|
||||
@@ -235,7 +235,7 @@ static int match(struct vf_priv_s *p, int *diffs,
|
||||
return m;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi, *tmpi=0;
|
||||
int n, m, f, newphase;
|
||||
@@ -350,12 +350,12 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
imgop((void *)memcpy_pic, tmpi, mpi, 0);
|
||||
imgop(deghost_plane, tmpi, dmpi, p->deghost);
|
||||
imgop((void *)memcpy_pic, dmpi, mpi, 0);
|
||||
return vf_next_put_image(vf, tmpi);
|
||||
return vf_next_put_image(vf, tmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
imgop((void *)memcpy_pic, dmpi, mpi, 0);
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
static int analyze(struct vf_priv_s *p)
|
||||
|
||||
@@ -79,7 +79,7 @@ static void toright(unsigned char *dst[3], unsigned char *src[3],
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -93,7 +93,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
toright(dmpi->planes, mpi->planes, dmpi->stride,
|
||||
mpi->stride, mpi->w, mpi->h, vf->priv);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int config(struct vf_instance_s* vf,
|
||||
|
||||
+2
-2
@@ -116,7 +116,7 @@ static void (*process)(unsigned char *dest, int dstride, unsigned char *src, int
|
||||
|
||||
/* FIXME: add packed yuv version of process */
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -142,7 +142,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
vf->priv->contrast);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int control(struct vf_instance_s* vf, int request, void* data)
|
||||
|
||||
@@ -224,7 +224,7 @@ void apply_lut (eq2_param_t *par, unsigned char *dst, unsigned char *src,
|
||||
}
|
||||
|
||||
static
|
||||
int put_image (vf_instance_t *vf, mp_image_t *src)
|
||||
int put_image (vf_instance_t *vf, mp_image_t *src, double pts)
|
||||
{
|
||||
unsigned i;
|
||||
vf_eq2_t *eq2;
|
||||
@@ -264,7 +264,7 @@ int put_image (vf_instance_t *vf, mp_image_t *src)
|
||||
}
|
||||
}
|
||||
|
||||
return vf_next_put_image (vf, dst);
|
||||
return vf_next_put_image (vf, dst, pts);
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
@@ -329,7 +329,7 @@ static void draw_slice(struct vf_instance_s* vf,
|
||||
vf->priv->first_slice = 0;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
|
||||
vf->dmpi=mpi->priv;
|
||||
if(!vf->dmpi) { printf("Why do we get NULL \n"); return 0; }
|
||||
@@ -340,7 +340,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
// we've used DR, so we're ready...
|
||||
if(!(mpi->flags&MP_IMGFLAG_PLANAR))
|
||||
vf->dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -372,7 +372,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
#ifdef OSD_SUPPORT
|
||||
if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h);
|
||||
#endif
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -45,7 +45,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
fame_yuv_t yuv;
|
||||
mp_image_t *dmpi;
|
||||
int out_size;
|
||||
@@ -75,7 +75,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
dmpi->planes[0]=(void*) &vf->priv->pes;
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -22,7 +22,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height/2,d_width,d_height,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
|
||||
mpi->width, mpi->height/2);
|
||||
@@ -40,7 +40,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
} else
|
||||
vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
|
||||
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -47,10 +47,10 @@ static int config(struct vf_instance_s* vf,
|
||||
(d_width*vf->priv->stridefactor)>>1, 2*d_height/vf->priv->stridefactor, flags, outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT){
|
||||
// we've used DR, so we're ready...
|
||||
return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
|
||||
return vf_next_put_image(vf,(mp_image_t*)mpi->priv, pts);
|
||||
}
|
||||
|
||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
@@ -68,7 +68,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
} else
|
||||
vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
|
||||
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -1137,7 +1137,7 @@ find_breaks(struct vf_priv_s *p, struct frame_stats *s)
|
||||
|
||||
#define ITOC(X) (!(X) ? ' ' : (X) + ((X)>9 ? 'a'-10 : '0'))
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
struct vf_priv_s *p = vf->priv;
|
||||
@@ -1332,7 +1332,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
"" : " @@@@@@@@@@@@@@@@@");
|
||||
|
||||
p->merge_time += get_time() - diff_time;
|
||||
return show_fields ? vf_next_put_image(vf, dmpi) : 0;
|
||||
return show_fields ? vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) : 0;
|
||||
}
|
||||
|
||||
static int query_format(struct vf_instance_s* vf, unsigned int fmt)
|
||||
|
||||
@@ -41,12 +41,12 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT){
|
||||
// we've used DR, so we're ready...
|
||||
if(!(mpi->flags&MP_IMGFLAG_PLANAR))
|
||||
((mp_image_t*)mpi->priv)->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
return vf_next_put_image(vf,(mp_image_t*)mpi->priv);
|
||||
return vf_next_put_image(vf,(mp_image_t*)mpi->priv, pts);
|
||||
}
|
||||
|
||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
@@ -67,7 +67,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
} else
|
||||
vf->dmpi->planes[1]=mpi->planes[1]; // passthru bgr8 palette!!!
|
||||
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -75,7 +75,7 @@ struct vf_priv_s {
|
||||
};
|
||||
|
||||
/* Filter handler */
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
struct vf_priv_s *priv;
|
||||
@@ -125,7 +125,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->height = mpi->height;
|
||||
|
||||
/* Chain to next filter / output ... */
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
/* Skip the frame */
|
||||
|
||||
@@ -519,7 +519,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
@@ -564,7 +564,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
#ifdef HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf)
|
||||
|
||||
@@ -143,7 +143,7 @@ static void (*halfpack)(unsigned char *dst, unsigned char *src[3],
|
||||
int dststride, int srcstride[3], int w, int h);
|
||||
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -164,7 +164,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->stride, mpi->w, mpi->h);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int config(struct vf_instance_s* vf,
|
||||
|
||||
@@ -15,7 +15,7 @@ struct vf_priv_s {
|
||||
mp_image_t *last_mpi;
|
||||
};
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
int ret;
|
||||
@@ -34,7 +34,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->stride[2] = mpi->stride[2];
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
static int control(struct vf_instance_s* vf, int request, void* data)
|
||||
@@ -46,7 +46,7 @@ static int control(struct vf_instance_s* vf, int request, void* data)
|
||||
// has been called earlier in the filter chain
|
||||
// since the last put_image. This is reasonable
|
||||
// because we're handling a duplicate frame!
|
||||
if (put_image(vf, vf->priv->last_mpi))
|
||||
if (put_image(vf, vf->priv->last_mpi, MP_NOPTS_VALUE))
|
||||
return CONTROL_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ static void deNoise(unsigned char *Frame, // mpi->planes[x]
|
||||
}
|
||||
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
int W = mpi->w, H = mpi->h;
|
||||
@@ -237,7 +237,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
vf->priv->Coefs[2],
|
||||
vf->priv->Coefs[3]);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -58,7 +58,7 @@ static void (*process)(uint8_t *udst, uint8_t *vdst, uint8_t *usrc, uint8_t *vsr
|
||||
|
||||
/* FIXME: add packed yuv version of process */
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -89,7 +89,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
vf->priv->hue, vf->priv->saturation);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int control(struct vf_instance_s* vf, int request, void* data)
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ static void interleave(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int w;
|
||||
FilterParam *luma = &vf->priv->lumaParam;
|
||||
FilterParam *chroma= &vf->priv->chromaParam;
|
||||
@@ -104,7 +104,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
dmpi->stride[2], mpi->stride[2], chroma->interleave, luma->swap);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -353,7 +353,7 @@ static void ilpack(unsigned char *dst, unsigned char *src[3],
|
||||
}
|
||||
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -364,7 +364,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
|
||||
ilpack(dmpi->planes[0], mpi->planes, dmpi->stride[0], mpi->stride, mpi->w, mpi->h, vf->priv->pack);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int config(struct vf_instance_s* vf,
|
||||
|
||||
@@ -449,10 +449,10 @@ static int do_put_image(struct vf_instance_s* vf, mp_image_t *dmpi)
|
||||
}
|
||||
|
||||
p->outframes++;
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
int ret=0;
|
||||
struct vf_priv_s *p = vf->priv;
|
||||
|
||||
@@ -76,7 +76,7 @@ static inline int IsYUY2(mp_image_t *mpi)
|
||||
#define PLANAR_U 1
|
||||
#define PLANAR_V 2
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
int W = mpi->w, H = mpi->h;
|
||||
@@ -272,7 +272,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -115,7 +115,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_MPEGPES);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t* dmpi;
|
||||
int out_size;
|
||||
AVFrame *pic= vf->priv->pic;
|
||||
@@ -143,7 +143,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
dmpi->planes[0]=(unsigned char*)&vf->priv->pes;
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
@@ -203,7 +203,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
}
|
||||
#if LIBAVCODEC_BUILD >= 4754
|
||||
lavc_venc_context.time_base.num = 1000*1001;
|
||||
lavc_venc_context.time_base.den = (p_fps<1.0) ? 0 : (p_fps * lavc_venc_context.time_base.num);
|
||||
lavc_venc_context.time_base.den = (p_fps<1.0) ? 1000*1001*25 : (p_fps * lavc_venc_context.time_base.num);
|
||||
#else
|
||||
#if LIBAVCODEC_BUILD >= 4662
|
||||
lavc_venc_context.frame_rate_base = 1000*1001;
|
||||
|
||||
@@ -103,7 +103,7 @@ config (struct vf_instance_s* vf,
|
||||
}
|
||||
|
||||
static int
|
||||
put_image (struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
put_image (struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
struct vf_priv_s *priv = vf->priv;
|
||||
mp_image_t* dmpi;
|
||||
@@ -135,7 +135,7 @@ put_image (struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ static void mirror(unsigned char* dst,unsigned char* src,int dststride,int srcst
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -93,7 +93,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
dmpi->planes[1]=mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -333,7 +333,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
@@ -359,7 +359,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
@@ -73,7 +73,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -152,7 +152,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -257,7 +257,7 @@ static inline void resampleLinear(uint8_t *dst, uint8_t *src, int w, int h, int
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
|
||||
@@ -283,7 +283,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
vf->priv, mpi->chroma_x_shift, mpi->chroma_y_shift);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -178,7 +178,7 @@ static enum mode analyze_plane(unsigned char *old, unsigned char *new,
|
||||
return mode;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
int w;
|
||||
@@ -219,7 +219,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
&vf->priv->buf[2], mode);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf)
|
||||
|
||||
+2
-2
@@ -112,7 +112,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
// no DR, so get a new image! hope we'll get DR buffer:
|
||||
vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
|
||||
@@ -137,7 +137,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->pict_type);
|
||||
#endif
|
||||
}
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -369,7 +369,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT){
|
||||
@@ -401,7 +401,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
@@ -118,7 +118,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->flags &= ~MP_IMGFLAG_DRAW_CALLBACK;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
struct pullup_context *c = vf->priv->ctx;
|
||||
struct pullup_buffer *b;
|
||||
@@ -263,7 +263,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->qstride = mpi->qstride;
|
||||
dmpi->qscale_type = mpi->qscale_type;
|
||||
}
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
dmpi = vf_get_image(vf->next, mpi->imgfmt,
|
||||
MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,
|
||||
@@ -282,7 +282,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->qstride = mpi->qstride;
|
||||
dmpi->qscale_type = mpi->qscale_type;
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
pullup_release_frame(f);
|
||||
return ret;
|
||||
}
|
||||
|
||||
+2
-2
@@ -117,7 +117,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
int x,y;
|
||||
|
||||
@@ -157,7 +157,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
@@ -64,7 +64,7 @@ control(struct vf_instance_s* vf, int request, void *data)
|
||||
return 0;
|
||||
}
|
||||
static int
|
||||
put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
put_image(struct vf_instance_s* vf, mp_image_t* mpi, double pts){
|
||||
mp_image_t* dmpi;
|
||||
unsigned int bpp = mpi->bpp / 8;
|
||||
unsigned int x, y, w, h;
|
||||
@@ -144,7 +144,7 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){
|
||||
p += dmpi->stride[0];
|
||||
}
|
||||
}
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -771,7 +771,7 @@ static void convert_yv12(const vf_instance_t * const vf, const char * const sour
|
||||
* filter, has the logo removed by the filter, and is then sent to the next
|
||||
* filter.
|
||||
*/
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
dmpi=vf_get_image(vf->next,((vf_priv_s *)vf->priv)->fmt,
|
||||
@@ -810,7 +810,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
return 0;
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -44,7 +44,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -72,7 +72,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
rgb24tobgr24(mpi->planes[0],dmpi->planes[0],mpi->w*mpi->h*3);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -86,7 +86,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,vf->priv->fmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
int x, y;
|
||||
|
||||
@@ -108,7 +108,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
}
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -69,7 +69,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,height,width,d_height,d_width,flags,outfmt);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -94,7 +94,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
dmpi->planes[1] = mpi->planes[1]; // passthrough rgb8 palette
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -236,7 +236,7 @@ if((x/32)&1){
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
|
||||
@@ -250,7 +250,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
blur(dmpi->planes[1], mpi->planes[1], cw , ch , dmpi->stride[1], mpi->stride[1], &vf->priv->chroma);
|
||||
blur(dmpi->planes[2], mpi->planes[2], cw , ch , dmpi->stride[2], mpi->stride[2], &vf->priv->chroma);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -322,7 +322,7 @@ static void draw_slice(struct vf_instance_s* vf,
|
||||
scale(vf->priv->ctx, vf->priv->ctx2, src, stride, y, h, dmpi->planes, dmpi->stride, vf->priv->interlaced);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi=mpi->priv;
|
||||
|
||||
// printf("vf_scale::put_image(): processing whole frame! dmpi=%p flag=%d\n",
|
||||
@@ -346,7 +346,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
if(vf->priv->palette) dmpi->planes[1]=vf->priv->palette; // export palette!
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int control(struct vf_instance_s* vf, int request, void* data){
|
||||
|
||||
@@ -187,7 +187,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->priv=(void*)vf->dmpi;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi = (mp_image_t *)mpi->priv;
|
||||
|
||||
@@ -220,7 +220,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
vf->priv->store_slices = 0;
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
int control (vf_instance_t *vf, int request, void *data)
|
||||
|
||||
@@ -184,7 +184,7 @@ static inline void blur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride,
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int cw= mpi->w >> mpi->chroma_x_shift;
|
||||
int ch= mpi->h >> mpi->chroma_y_shift;
|
||||
FilterParam *f= &vf->priv;
|
||||
@@ -200,7 +200,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
blur(dmpi->planes[1], mpi->planes[1], cw , ch , dmpi->stride[1], mpi->stride[1], &vf->priv->chroma);
|
||||
blur(dmpi->planes[2], mpi->planes[2], cw , ch , dmpi->stride[2], mpi->stride[2], &vf->priv->chroma);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -33,7 +33,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
int ret = 0;
|
||||
@@ -59,7 +59,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
}
|
||||
|
||||
if (state == 0) {
|
||||
ret = vf_next_put_image(vf, mpi);
|
||||
ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
|
||||
vf->priv->out++;
|
||||
if (flags & MP_IMGFIELD_REPEAT_FIRST) {
|
||||
my_memcpy_pic(dmpi->planes[0],
|
||||
@@ -95,10 +95,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height/2,
|
||||
dmpi->stride[2]*2, mpi->stride[2]*2);
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
vf->priv->out++;
|
||||
if (flags & MP_IMGFIELD_REPEAT_FIRST) {
|
||||
ret |= vf_next_put_image(vf, mpi);
|
||||
ret |= vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
|
||||
vf->priv->out++;
|
||||
state=0;
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,7 @@ struct vf_priv_s {
|
||||
int skipflag;
|
||||
};
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
|
||||
@@ -34,7 +34,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->stride[2] = mpi->stride[2];
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, pts);
|
||||
}
|
||||
|
||||
static int control(struct vf_instance_s* vf, int request, void* data)
|
||||
|
||||
@@ -465,7 +465,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
@@ -508,7 +508,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
@@ -53,7 +53,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->priv=(void*)dmpi;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(mpi->flags&MP_IMGFLAG_DIRECT){
|
||||
@@ -72,7 +72,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -30,7 +30,7 @@ static inline void *my_memcpy_pic(void * dst, void * src, int bytesPerLine, int
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
int ret;
|
||||
@@ -58,7 +58,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height/2,
|
||||
dmpi->stride[2]*2, mpi->stride[2]*2);
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
case 1:
|
||||
case 2:
|
||||
memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h,
|
||||
@@ -71,7 +71,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height,
|
||||
dmpi->stride[2], mpi->stride[2]);
|
||||
}
|
||||
return vf_next_put_image(vf, dmpi) || ret;
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE) || ret;
|
||||
case 3:
|
||||
my_memcpy_pic(dmpi->planes[0]+dmpi->stride[0],
|
||||
mpi->planes[0]+mpi->stride[0], mpi->w, mpi->h/2,
|
||||
@@ -86,7 +86,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height/2,
|
||||
dmpi->stride[2]*2, mpi->stride[2]*2);
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
|
||||
dmpi->stride[0]*2, mpi->stride[0]*2);
|
||||
if (mpi->flags & MP_IMGFLAG_PLANAR) {
|
||||
|
||||
@@ -268,7 +268,7 @@ static void ring2Test(uint8_t *dst, int stride, int off)
|
||||
}
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
int frame= vf->priv->frame_num;
|
||||
|
||||
@@ -301,7 +301,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
frame++;
|
||||
vf->priv->frame_num= frame;
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -311,7 +311,7 @@ static void qpel_4tap_C(unsigned char *d, unsigned char *s, int w, int h, int ds
|
||||
static void (*qpel_li)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up);
|
||||
static void (*qpel_4tap)(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up);
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
int i;
|
||||
int ret=0;
|
||||
@@ -356,7 +356,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->stride[1] = 2*mpi->stride[1];
|
||||
dmpi->stride[2] = 2*mpi->stride[2];
|
||||
}
|
||||
ret |= vf_next_put_image(vf, dmpi);
|
||||
ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
|
||||
}
|
||||
break;
|
||||
@@ -383,7 +383,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
deint(dmpi->planes[2], dmpi->stride[2], mpi->planes[2], mpi->stride[2],
|
||||
mpi->chroma_width, mpi->chroma_height, (i^!tff));
|
||||
}
|
||||
ret |= vf_next_put_image(vf, dmpi);
|
||||
ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
|
||||
}
|
||||
break;
|
||||
@@ -406,7 +406,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height/2,
|
||||
dmpi->stride[2], mpi->stride[2]*2, (i^!tff));
|
||||
}
|
||||
ret |= vf_next_put_image(vf, dmpi);
|
||||
ret |= vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
if (!i) vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -93,7 +93,7 @@ static int config(struct vf_instance_s* vf,
|
||||
}
|
||||
|
||||
/* Filter handler */
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
mp_image_t *dmpi;
|
||||
struct vf_priv_s *priv;
|
||||
@@ -170,7 +170,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
/* Display the composition */
|
||||
dmpi->width = xw;
|
||||
dmpi->height = yh;
|
||||
return vf_next_put_image(vf, dmpi);
|
||||
return vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
else {
|
||||
/* Skip the frame */
|
||||
|
||||
@@ -35,7 +35,7 @@ struct vf_priv_s {
|
||||
mp_image_t *dmpi;
|
||||
};
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts)
|
||||
{
|
||||
int ret = 0;
|
||||
mp_image_t *dmpi;
|
||||
@@ -74,16 +74,16 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
mpi->chroma_width, mpi->chroma_height,
|
||||
dmpi->stride[2]*2, mpi->stride[2]);
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (vf->priv->frame & 1)
|
||||
ret = vf_next_put_image(vf, mpi);
|
||||
ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
|
||||
break;
|
||||
case 2:
|
||||
if ((vf->priv->frame & 1) == 0)
|
||||
ret = vf_next_put_image(vf, mpi);
|
||||
ret = vf_next_put_image(vf, mpi, MP_NOPTS_VALUE);
|
||||
break;
|
||||
case 3:
|
||||
dmpi = vf_get_image(vf->next, mpi->imgfmt,
|
||||
@@ -114,7 +114,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi)
|
||||
dmpi->stride[2]*2, mpi->stride[2]);
|
||||
}
|
||||
}
|
||||
ret = vf_next_put_image(vf, dmpi);
|
||||
ret = vf_next_put_image(vf, dmpi, MP_NOPTS_VALUE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ static void get_image( struct vf_instance_s* vf, mp_image_t *mpi ) {
|
||||
mpi->flags |= MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image( struct vf_instance_s* vf, mp_image_t *mpi ) {
|
||||
static int put_image( struct vf_instance_s* vf, mp_image_t *mpi, double pts) {
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if( !(mpi->flags & MP_IMGFLAG_DIRECT) )
|
||||
@@ -206,7 +206,7 @@ static int put_image( struct vf_instance_s* vf, mp_image_t *mpi ) {
|
||||
asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
return vf_next_put_image( vf, dmpi );
|
||||
return vf_next_put_image( vf, dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit( struct vf_instance_s* vf ) {
|
||||
|
||||
@@ -275,7 +275,7 @@ static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
mpi->flags|=MP_IMGFLAG_DIRECT;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
if(!(mpi->flags&MP_IMGFLAG_DIRECT)){
|
||||
@@ -307,7 +307,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static void uninit(struct vf_instance_s* vf){
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ static void get_image(struct vf_instance_s* vf,
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf,
|
||||
mp_image_t *mpi){
|
||||
mp_image_t *mpi, double pts){
|
||||
if(!vo_config_count) return 0; // vo not configured?
|
||||
// first check, maybe the vo/vf plugin implements draw_image using mpi:
|
||||
if(video_out->control(VOCTRL_DRAW_IMAGE,mpi)==VO_TRUE) return 1; // done.
|
||||
|
||||
@@ -30,7 +30,7 @@ static inline int clamp_c(int x){
|
||||
return (x > 240) ? 240 : (x < 16) ? 16 : x;
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
int i,j;
|
||||
uint8_t *y_in, *cb_in, *cr_in;
|
||||
uint8_t *y_out, *cb_out, *cr_out;
|
||||
@@ -58,7 +58,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
cr_out[i*vf->dmpi->stride[2]+j] = clamp_c(cr_in[i*mpi->stride[2]+j]);
|
||||
}
|
||||
|
||||
return vf_next_put_image(vf,vf->dmpi);
|
||||
return vf_next_put_image(vf,vf->dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -30,7 +30,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YUY2);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
|
||||
// hope we'll get DR buffer:
|
||||
@@ -47,7 +47,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -27,7 +27,7 @@ static int config(struct vf_instance_s* vf,
|
||||
return vf_next_config(vf,width,height,d_width,d_height,flags,IMGFMT_YV12);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
mp_image_t *dmpi;
|
||||
int y,w,h;
|
||||
|
||||
@@ -57,7 +57,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@@ -663,7 +663,7 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
|
||||
(priv->fields == 2) ? IMGFMT_ZRMJPEGIT : IMGFMT_ZRMJPEGNI);
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){
|
||||
struct vf_priv_s *priv = vf->priv;
|
||||
int size = 0;
|
||||
int i;
|
||||
@@ -679,7 +679,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||
MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h);
|
||||
dmpi->planes[0] = (uint8_t*)priv->buf;
|
||||
dmpi->planes[1] = (uint8_t*)size;
|
||||
return vf_next_put_image(vf,dmpi);
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
}
|
||||
|
||||
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
|
||||
|
||||
Reference in new issue
Block a user