Parent Directory | Revision Log
Revision 1216 - (view) (download)
1 : | edgomez | 1054 | /***************************************************************************** |
2 : | * | ||
3 : | * XVID MPEG-4 VIDEO CODEC | ||
4 : | * - XviD plugin: outputs PSNR to stdout (should disapear soon) - | ||
5 : | * | ||
6 : | * Copyright(C) 2003 Peter Ross <pross@xvid.org> | ||
7 : | * | ||
8 : | * This program is free software ; you can redistribute it and/or modify | ||
9 : | * it under the terms of the GNU General Public License as published by | ||
10 : | * the Free Software Foundation ; either version 2 of the License, or | ||
11 : | * (at your option) any later version. | ||
12 : | * | ||
13 : | * This program is distributed in the hope that it will be useful, | ||
14 : | * but WITHOUT ANY WARRANTY ; without even the implied warranty of | ||
15 : | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 : | * GNU General Public License for more details. | ||
17 : | * | ||
18 : | * You should have received a copy of the GNU General Public License | ||
19 : | * along with this program ; if not, write to the Free Software | ||
20 : | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 : | * | ||
22 : | syskin | 1216 | * $Id: plugin_psnr.c,v 1.1.2.6 2003-11-19 15:42:38 syskin Exp $ |
23 : | edgomez | 1054 | * |
24 : | ****************************************************************************/ | ||
25 : | |||
26 : | edgomez | 929 | #include <stdio.h> |
27 : | |||
28 : | suxen_drol | 921 | #include "../xvid.h" |
29 : | #include "../image/image.h" | ||
30 : | |||
31 : | |||
32 : | int xvid_plugin_psnr(void * handle, int opt, void * param1, void * param2) | ||
33 : | { | ||
34 : | switch(opt) | ||
35 : | { | ||
36 : | case XVID_PLG_INFO : | ||
37 : | { | ||
38 : | xvid_plg_info_t * info = (xvid_plg_info_t*)param1; | ||
39 : | suxen_drol | 922 | info->flags = XVID_REQPSNR; |
40 : | suxen_drol | 921 | return 0; |
41 : | } | ||
42 : | |||
43 : | case XVID_PLG_CREATE : | ||
44 : | case XVID_PLG_DESTROY : | ||
45 : | case XVID_PLG_BEFORE : | ||
46 : | syskin | 1216 | case XVID_PLG_FRAME : |
47 : | suxen_drol | 921 | return 0; |
48 : | |||
49 : | case XVID_PLG_AFTER : | ||
50 : | { | ||
51 : | xvid_plg_data_t * data = (xvid_plg_data_t*)param1; | ||
52 : | |||
53 : | edgomez | 1161 | printf("y_psnr=%2.2f u_psnr=%2.2f v_psnr=%2.2f\n", |
54 : | suxen_drol | 922 | sse_to_PSNR(data->sse_y, data->width*data->height), |
55 : | sse_to_PSNR(data->sse_u, data->width*data->height/4), | ||
56 : | sse_to_PSNR(data->sse_v, data->width*data->height/4)); | ||
57 : | suxen_drol | 921 | |
58 : | return 0; | ||
59 : | } | ||
60 : | } | ||
61 : | |||
62 : | return XVID_ERR_FAIL; | ||
63 : | } |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |