mirror of https://github.com/mpv-player/mpv
Fix serious breakage, 10000l !
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9869 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
9e56d70e6f
commit
4dce054011
|
@ -529,6 +529,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||||
AVFrame *pic= lavc_venc_context->coded_frame;
|
AVFrame *pic= lavc_venc_context->coded_frame;
|
||||||
double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0;
|
double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0;
|
||||||
double quality=0.0;
|
double quality=0.0;
|
||||||
|
int8_t *q;
|
||||||
|
|
||||||
if(!fvstats) {
|
if(!fvstats) {
|
||||||
time_t today2;
|
time_t today2;
|
||||||
|
@ -546,18 +547,19 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
|
||||||
}
|
}
|
||||||
|
|
||||||
// average MB quantizer
|
// average MB quantizer
|
||||||
{
|
q = lavc_venc_context->coded_frame->qscale_table;
|
||||||
|
if(q) {
|
||||||
int x, y;
|
int x, y;
|
||||||
int w = (lavc_venc_context->width+15) >> 4;
|
int w = (lavc_venc_context->width+15) >> 4;
|
||||||
int h = (lavc_venc_context->height+15) >> 4;
|
int h = (lavc_venc_context->height+15) >> 4;
|
||||||
int8_t *q = lavc_venc_context->coded_frame->qscale_table;
|
|
||||||
for( y = 0; y < h; y++ ) {
|
for( y = 0; y < h; y++ ) {
|
||||||
for( x = 0; x < w; x++ )
|
for( x = 0; x < w; x++ )
|
||||||
quality += (double)*(q+x);
|
quality += (double)*(q+x);
|
||||||
q += lavc_venc_context->coded_frame->qstride;
|
q += lavc_venc_context->coded_frame->qstride;
|
||||||
}
|
}
|
||||||
quality /= w * h;
|
quality /= w * h;
|
||||||
}
|
} else
|
||||||
|
quality = lavc_venc_context->coded_frame->quality;
|
||||||
|
|
||||||
fprintf(fvstats, "%6d, %2.2f, %6d, %2.2f, %2.2f, %2.2f, %2.2f %c\n",
|
fprintf(fvstats, "%6d, %2.2f, %6d, %2.2f, %2.2f, %2.2f, %2.2f %c\n",
|
||||||
lavc_venc_context->coded_frame->coded_picture_number,
|
lavc_venc_context->coded_frame->coded_picture_number,
|
||||||
|
|
Loading…
Reference in New Issue