[MPlayer-cvslog] r20601 - in trunk/libmpcodecs: vf_fspp.c vf_spp.c

henry subversion at mplayerhq.hu
Wed Nov 1 20:52:42 CET 2006


Author: henry
Date: Wed Nov  1 20:52:42 2006
New Revision: 20601

Modified:
   trunk/libmpcodecs/vf_fspp.c
   trunk/libmpcodecs/vf_spp.c

Log:
qp height should be in macroblocks, not pixels

Modified: trunk/libmpcodecs/vf_fspp.c
==============================================================================
--- trunk/libmpcodecs/vf_fspp.c	(original)
+++ trunk/libmpcodecs/vf_fspp.c	Wed Nov  1 20:52:42 2006
@@ -531,8 +531,8 @@
     vf->priv->mpeg2= mpi->qscale_type;
     if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){
 	if(!vf->priv->non_b_qp)
-	    vf->priv->non_b_qp= malloc(mpi->qstride * mpi->h);
-	memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * mpi->h);
+	    vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4));
+	memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
     }
     if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
 	char *qp_tab= vf->priv->non_b_qp;

Modified: trunk/libmpcodecs/vf_spp.c
==============================================================================
--- trunk/libmpcodecs/vf_spp.c	(original)
+++ trunk/libmpcodecs/vf_spp.c	Wed Nov  1 20:52:42 2006
@@ -477,8 +477,8 @@
         vf->priv->mpeg2= mpi->qscale_type;
         if(mpi->pict_type != 3 && mpi->qscale && !vf->priv->qp){
             if(!vf->priv->non_b_qp)
-                vf->priv->non_b_qp= malloc(mpi->qstride * mpi->h);
-            memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * mpi->h);
+                vf->priv->non_b_qp= malloc(mpi->qstride * ((mpi->h + 15) >> 4));
+            memcpy(vf->priv->non_b_qp, mpi->qscale, mpi->qstride * ((mpi->h + 15) >> 4));
         }
 	if(vf->priv->log2_count || !(mpi->flags&MP_IMGFLAG_DIRECT)){
             char *qp_tab= vf->priv->non_b_qp;



More information about the MPlayer-cvslog mailing list