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

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

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