summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorrguyom <rguyom@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-07 13:48:51 +0000
committerrguyom <rguyom@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-07 13:48:51 +0000
commit4dce054011d995d3b38dedcae7b218679f15f4a7 (patch)
tree2a25a3b4d1f63407bf1319ad09032285cb5f4e69 /libmpcodecs
parent9e56d70e6ff1c4c6ae4e8e229990e6b8ad643804 (diff)
downloadmpv-4dce054011d995d3b38dedcae7b218679f15f4a7.tar.bz2
mpv-4dce054011d995d3b38dedcae7b218679f15f4a7.tar.xz
Fix serious breakage, 10000l !
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9869 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ve_lavc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c
index 8149dbf257..02d6109aaf 100644
--- a/libmpcodecs/ve_lavc.c
+++ b/libmpcodecs/ve_lavc.c
@@ -529,6 +529,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
AVFrame *pic= lavc_venc_context->coded_frame;
double f= lavc_venc_context->width*lavc_venc_context->height*255.0*255.0;
double quality=0.0;
+ int8_t *q;
if(!fvstats) {
time_t today2;
@@ -546,18 +547,19 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){
}
// average MB quantizer
- {
+ q = lavc_venc_context->coded_frame->qscale_table;
+ if(q) {
int x, y;
int w = (lavc_venc_context->width+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( x = 0; x < w; x++ )
quality += (double)*(q+x);
q += lavc_venc_context->coded_frame->qstride;
}
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",
lavc_venc_context->coded_frame->coded_picture_number,