[cvs] / xvidcore / src / plugins / plugin_psnr.c Repository:
ViewVC logotype

Diff of /xvidcore/src/plugins/plugin_psnr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Sat Mar 15 14:38:34 2003 UTC revision 1.1.2.3, Wed Mar 19 22:32:11 2003 UTC
# Line 0  Line 1 
1    #include <stdio.h>
2    
3    #include "../xvid.h"
4    #include "../image/image.h"
5    
6    
7    int xvid_plugin_psnr(void * handle, int opt, void * param1, void * param2)
8    {
9        switch(opt)
10        {
11        case XVID_PLG_INFO :
12            {
13            xvid_plg_info_t * info = (xvid_plg_info_t*)param1;
14            info->flags = XVID_REQPSNR;
15            return 0;
16            }
17    
18        case XVID_PLG_CREATE :
19        case XVID_PLG_DESTROY :
20        case XVID_PLG_BEFORE :
21           return 0;
22    
23        case XVID_PLG_AFTER :
24           {
25           xvid_plg_data_t * data = (xvid_plg_data_t*)param1;
26    
27           printf("y_psnr=%2.2f u_psnr=%2.2f v_psnr=%2.2f\n",
28               sse_to_PSNR(data->sse_y, data->width*data->height),
29               sse_to_PSNR(data->sse_u, data->width*data->height/4),
30               sse_to_PSNR(data->sse_v, data->width*data->height/4));
31    
32           return 0;
33           }
34        }
35    
36        return XVID_ERR_FAIL;
37    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.3

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4