Mercurial > libavcodec.hg
diff 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 |
line wrap: on
line diff
--- a/mpegvideo.c Fri Feb 22 19:19:01 2002 +0000 +++ b/mpegvideo.c Tue Feb 26 22:14:27 2002 +0000 @@ -522,6 +522,12 @@ s->total_bits += (pbBufPtr(&s->pb) - s->pb.buf) * 8; avctx->quality = s->qscale; + if (avctx->get_psnr) { + /* At this point pict->data should have the original frame */ + /* an s->current_picture should have the coded/decoded frame */ + get_psnr(pict->data, s->current_picture, + pict->linesize, s->linesize, avctx); + } return pbBufPtr(&s->pb) - s->pb.buf; }