[MPlayer-cvslog] r37485 - in branches/1.2/libmpcodecs: vf_lavc.c vf_mcdeint.c vf_uspp.c

rtogni subversion at mplayerhq.hu
Sat Sep 5 22:07:36 CEST 2015


Author: rtogni
Date: Sat Sep  5 22:07:36 2015
New Revision: 37485

Log:
Revert r37453 for release

This reverts the use of encode_video2() in lavc, mcdeint and uspp filters

Modified:
   branches/1.2/libmpcodecs/vf_lavc.c
   branches/1.2/libmpcodecs/vf_mcdeint.c
   branches/1.2/libmpcodecs/vf_uspp.c

Modified: branches/1.2/libmpcodecs/vf_lavc.c
==============================================================================
--- branches/1.2/libmpcodecs/vf_lavc.c	Sat Sep  5 22:06:00 2015	(r37484)
+++ branches/1.2/libmpcodecs/vf_lavc.c	Sat Sep  5 22:07:36 2015	(r37485)
@@ -86,8 +86,6 @@ static int put_image(struct vf_instance
     mp_image_t* dmpi;
     int out_size;
     AVFrame *pic= vf->priv->pic;
-    int ret, got_pkt;
-    AVPacket pkt;
 
     pic->data[0]=mpi->planes[0];
     pic->data[1]=mpi->planes[1];
@@ -96,14 +94,10 @@ static int put_image(struct vf_instance
     pic->linesize[1]=mpi->stride[1];
     pic->linesize[2]=mpi->stride[2];
 
-    av_init_packet(&pkt);
-    pkt.data = vf->priv->outbuf;
-    pkt.size = vf->priv->outbuf_size;
-    ret = avcodec_encode_video2(&lavc_venc_context, &pkt, pic, &got_pkt);
+    out_size = avcodec_encode_video(&lavc_venc_context,
+	vf->priv->outbuf, vf->priv->outbuf_size, pic);
 
-    if(ret<=0) return 1;
-    if(!got_pkt) return 1;
-    out_size =  pkt.size;
+    if(out_size<=0) return 1;
 
     dmpi=vf_get_image(vf->next,IMGFMT_MPEGPES,
 	MP_IMGTYPE_EXPORT, 0,

Modified: branches/1.2/libmpcodecs/vf_mcdeint.c
==============================================================================
--- branches/1.2/libmpcodecs/vf_mcdeint.c	Sat Sep  5 22:06:00 2015	(r37484)
+++ branches/1.2/libmpcodecs/vf_mcdeint.c	Sat Sep  5 22:07:36 2015	(r37485)
@@ -92,8 +92,6 @@ struct vf_priv_s {
 
 static void filter(struct vf_priv_s *p, uint8_t *dst[3], uint8_t *src[3], int dst_stride[3], int src_stride[3], int width, int height){
     int x, y, i;
-    int got_pkt;
-    AVPacket pkt;
 
     for(i=0; i<3; i++){
         p->frame->data[i]= src[i];
@@ -103,10 +101,7 @@ static void filter(struct vf_priv_s *p,
     p->avctx_enc->me_cmp=
     p->avctx_enc->me_sub_cmp= FF_CMP_SAD /*| (p->parity ? FF_CMP_ODD : FF_CMP_EVEN)*/;
     p->frame->quality= p->qp*FF_QP2LAMBDA;
-    av_init_packet(&pkt);
-    pkt.data = p->outbuf;
-    pkt.size = p->outbuf_size;
-    avcodec_encode_video2(p->avctx_enc, &pkt, p->frame, &got_pkt);
+    avcodec_encode_video(p->avctx_enc, p->outbuf, p->outbuf_size, p->frame);
     p->frame_dec = p->avctx_enc->coded_frame;
 
     for(i=0; i<3; i++){

Modified: branches/1.2/libmpcodecs/vf_uspp.c
==============================================================================
--- branches/1.2/libmpcodecs/vf_uspp.c	Sat Sep  5 22:06:00 2015	(r37484)
+++ branches/1.2/libmpcodecs/vf_uspp.c	Sat Sep  5 22:07:36 2015	(r37485)
@@ -177,16 +177,11 @@ static void filter(struct vf_priv_s *p,
         const int x1= offset[i+count-1][0];
         const int y1= offset[i+count-1][1];
         int offset;
-        AVPacket pkt;
-        int ret, got_pkt;
         p->frame->data[0]= p->src[0] + x1 + y1 * p->frame->linesize[0];
         p->frame->data[1]= p->src[1] + x1/2 + y1/2 * p->frame->linesize[1];
         p->frame->data[2]= p->src[2] + x1/2 + y1/2 * p->frame->linesize[2];
 
-        av_init_packet(&pkt);
-        pkt.data = p->outbuf;
-        pkt.size = p->outbuf_size;
-        avcodec_encode_video2(p->avctx_enc[i], &pkt, p->frame, &got_pkt);
+        avcodec_encode_video(p->avctx_enc[i], p->outbuf, p->outbuf_size, p->frame);
         p->frame_dec = p->avctx_enc[i]->coded_frame;
 
         offset= (BLOCK-x1) + (BLOCK-y1)*p->frame_dec->linesize[0];


More information about the MPlayer-cvslog mailing list