[MPlayer-cvslog] r36841 - trunk/libmpcodecs/vd_ffmpeg.c
reimar
subversion at mplayerhq.hu
Sat Feb 15 18:24:26 CET 2014
Author: reimar
Date: Sat Feb 15 18:24:26 2014
New Revision: 36841
Log:
Switch to av_frame_get_qp_table API.
Modified:
trunk/libmpcodecs/vd_ffmpeg.c
Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c Sat Feb 15 17:52:59 2014 (r36840)
+++ trunk/libmpcodecs/vd_ffmpeg.c Sat Feb 15 18:24:26 2014 (r36841)
@@ -992,11 +992,13 @@ static mp_image_t *decode(sh_video_t *sh
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 @@ static mp_image_t *decode(sh_video_t *sh
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;
More information about the MPlayer-cvslog
mailing list