Mercurial > mplayer.hg
changeset 20585:68b55a823fd4
qp height should be in macroblocks, not pixels
author | henry |
---|---|
date | Wed, 01 Nov 2006 19:52:42 +0000 |
parents | 200ec2faa4e1 |
children | d9558d78179d |
files | libmpcodecs/vf_fspp.c libmpcodecs/vf_spp.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vf_fspp.c Wed Nov 01 19:44:35 2006 +0000 +++ b/libmpcodecs/vf_fspp.c Wed Nov 01 19:52:42 2006 +0000 @@ -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;
--- a/libmpcodecs/vf_spp.c Wed Nov 01 19:44:35 2006 +0000 +++ b/libmpcodecs/vf_spp.c Wed Nov 01 19:52:42 2006 +0000 @@ -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;