Mercurial > mplayer.hg
changeset 36745:b85aab929951
Switch to av_frame_get_qp_table API.
author | reimar |
---|---|
date | Sat, 15 Feb 2014 17:24:26 +0000 |
parents | a86b7ed5f1dc |
children | d9371aa0293f |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Sat Feb 15 16:52:59 2014 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Feb 15 17:24:26 2014 +0000 @@ -992,11 +992,13 @@ int x, y; int w = ((avctx->width << lavc_param_lowres)+15) >> 4; int h = ((avctx->height << lavc_param_lowres)+15) >> 4; - int8_t *q = pic->qscale_table; + int qstride; + int dummy; + int8_t *q = av_frame_get_qp_table(pic, &qstride, &dummy); for(y = 0; y < h; y++) { for(x = 0; x < w; x++) quality += (double)*(q+x); - q += pic->qstride; + q += qstride; } quality /= w * h; } @@ -1089,10 +1091,8 @@ swap_palette(mpi->planes[1]); #endif /* to comfirm with newer lavc style */ - mpi->qscale =pic->qscale_table; - mpi->qstride=pic->qstride; + mpi->qscale = av_frame_get_qp_table(pic, &mpi->qstride, &mpi->qscale_type); mpi->pict_type=pic->pict_type; - mpi->qscale_type= pic->qscale_type; mpi->fields = MP_IMGFIELD_ORDERED; if(pic->interlaced_frame) mpi->fields |= MP_IMGFIELD_INTERLACED; if(pic->top_field_first ) mpi->fields |= MP_IMGFIELD_TOP_FIRST;