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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.2.3 - (view) (download)

1 : edgomez 1.1.2.3 #include <stdio.h>
2 :    
3 : suxen_drol 1.1.2.1 #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 : suxen_drol 1.1.2.2 info->flags = XVID_REQPSNR;
15 : suxen_drol 1.1.2.1 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 : suxen_drol 1.1.2.2 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 : suxen_drol 1.1.2.1
32 :     return 0;
33 :     }
34 :     }
35 :    
36 :     return XVID_ERR_FAIL;
37 :     }

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