comparison mpegvideo.c @ 252:ddb1a0e94cf4 libavcodec

- Added PSNR feature to libavcodec and ffmpeg. By now just Y PSNR until I'm sure it works ok. Also it's slow, so use it only when you _really_ need to measure quality. - Fix libavcodec Makefile to enable profiling.
author pulento
date Tue, 26 Feb 2002 22:14:27 +0000
parents 75091bfc577b
children db20b987c32d
comparison
equal deleted inserted replaced
251:75091bfc577b 252:ddb1a0e94cf4
520 520
521 flush_put_bits(&s->pb); 521 flush_put_bits(&s->pb);
522 s->total_bits += (pbBufPtr(&s->pb) - s->pb.buf) * 8; 522 s->total_bits += (pbBufPtr(&s->pb) - s->pb.buf) * 8;
523 523
524 avctx->quality = s->qscale; 524 avctx->quality = s->qscale;
525 if (avctx->get_psnr) {
526 /* At this point pict->data should have the original frame */
527 /* an s->current_picture should have the coded/decoded frame */
528 get_psnr(pict->data, s->current_picture,
529 pict->linesize, s->linesize, avctx);
530 }
525 return pbBufPtr(&s->pb) - s->pb.buf; 531 return pbBufPtr(&s->pb) - s->pb.buf;
526 } 532 }
527 533
528 static inline int clip(int a, int amin, int amax) 534 static inline int clip(int a, int amin, int amax)
529 { 535 {