Revision 6b1c886b

View differences:

ffmpeg.c
1381 1381
    ti1 = 1e10;
1382 1382
    vid = 0;
1383 1383
    for(i=0;i<nb_ostreams;i++) {
1384
        float q= -1;
1384 1385
        ost = ost_table[i];
1385 1386
        enc = ost->st->codec;
1387
        if(!ost->st->stream_copy && enc->coded_frame)
1388
            q= enc->coded_frame->quality/(float)FF_QP2LAMBDA;
1386 1389
        if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1387
            snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ",
1388
                     !ost->st->stream_copy ?
1389
                     enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
1390
            snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ", q);
1390 1391
        }
1391 1392
        if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
1392 1393
            float t = (av_gettime()-timer_start) / 1000000.0;
1393 1394

  
1394 1395
            frame_number = ost->frame_number;
1395 1396
            snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "frame=%5d fps=%3d q=%3.1f ",
1396
                     frame_number, (t>1)?(int)(frame_number/t+0.5) : 0,
1397
                     !ost->st->stream_copy ?
1398
                     enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
1397
                     frame_number, (t>1)?(int)(frame_number/t+0.5) : 0, q);
1399 1398
            if(is_last_report)
1400 1399
                snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "L");
1401 1400
            if(qp_hist){
1402 1401
                int j;
1403
                int qp= lrintf(enc->coded_frame->quality/(float)FF_QP2LAMBDA);
1402
                int qp= lrintf(q);
1404 1403
                if(qp>=0 && qp<FF_ARRAY_ELEMS(qp_histogram))
1405 1404
                    qp_histogram[qp]++;
1406 1405
                for(j=0; j<32; j++)

Also available in: Unified diff