summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-06 01:55:32 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-12-06 01:55:32 +0000
commit6109b56de74cfcda6321fcd5e37cac988734119c (patch)
tree29c91c901481a67a7a9e6d3c3b2f122fc919efa2 /src/libffmpeg/libavcodec/dsputil.c
parent4ae936639132b75872ee84444c59d1914cc2292d (diff)
downloadxine-lib-6109b56de74cfcda6321fcd5e37cac988734119c.tar.gz
xine-lib-6109b56de74cfcda6321fcd5e37cac988734119c.tar.bz2
- sync with ffmpeg (that must fix heiko stream, thanks Michael Niedermayer)
- improve ffmpeg support (passing extra data) - aspect ratio still need to be updated to new syntax - use our svq1 decoder since ffmpeg one is segfaulting (buffer overrun - more investigation needed) - img->copy no more CVS patchset: 3437 CVS date: 2002/12/06 01:55:32
Diffstat (limited to 'src/libffmpeg/libavcodec/dsputil.c')
-rw-r--r--src/libffmpeg/libavcodec/dsputil.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/libffmpeg/libavcodec/dsputil.c b/src/libffmpeg/libavcodec/dsputil.c
index 9039d2625..1e177116a 100644
--- a/src/libffmpeg/libavcodec/dsputil.c
+++ b/src/libffmpeg/libavcodec/dsputil.c
@@ -1528,37 +1528,3 @@ void avcodec_set_bit_exact(void)
// dsputil_set_bit_exact_mmx();
#endif
}
-
-void get_psnr(UINT8 *orig_image[3], UINT8 *coded_image[3],
- int orig_linesize[3], int coded_linesize,
- AVCodecContext *avctx)
-{
- int quad, diff, x, y;
- UINT8 *orig, *coded;
- UINT32 *sq = squareTbl + 256;
-
- quad = 0;
- diff = 0;
-
- /* Luminance */
- orig = orig_image[0];
- coded = coded_image[0];
-
- for (y=0;y<avctx->height;y++) {
- for (x=0;x<avctx->width;x++) {
- diff = *(orig + x) - *(coded + x);
- quad += sq[diff];
- }
- orig += orig_linesize[0];
- coded += coded_linesize;
- }
-
- avctx->psnr_y = (float) quad / (float) (avctx->width * avctx->height);
-
- if (avctx->psnr_y) {
- avctx->psnr_y = (float) (255 * 255) / avctx->psnr_y;
- avctx->psnr_y = 10 * (float) log10 (avctx->psnr_y);
- } else
- avctx->psnr_y = 99.99;
-}
-