[svn] / branches / dev-api-4 / xvidcore / src / plugins / plugin_psnr.c Repository:
ViewVC logotype

Annotation of /branches/dev-api-4/xvidcore/src/plugins/plugin_psnr.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 922 - (view) (download)

1 : suxen_drol 921 #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 : suxen_drol 922 info->flags = XVID_REQPSNR;
13 : suxen_drol 921 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 : suxen_drol 922 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 : suxen_drol 921
30 :     return 0;
31 :     }
32 :     }
33 :    
34 :     return XVID_ERR_FAIL;
35 :     }

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