annotate libvo/aspecttest.c @ 27362:9020d4c7bd32

Remove checks for HAVE_XVID3, that conditional was removed a long time ago.
author diego
date Sat, 02 Aug 2008 13:59:47 +0000
parents 6559b9364ca3
children 2ffff528c1fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6087
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
1 /* testapp for aspect.[ch] by Atmos
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
2 * gcc aspecttest.c aspect.c -o aspecttest -DASPECT_TEST [-DASPECT_DEBUG]
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
3 */
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
4
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
5 #include <stdio.h>
25516
dd86735178a6 Add missing #include, fixes the warning:
diego
parents: 6087
diff changeset
6 #include <stdlib.h>
6087
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
7
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
8 #include "aspect.h"
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
9
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
10 /* default zoom state 0 off, 1 on */
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
11 #define DEF_ZOOM 1
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
12
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
13 extern float monitor_aspect;
26583
6559b9364ca3 Add compilation rule for libvo/aspecttest and (hackishly) fix linking.
diego
parents: 25516
diff changeset
14 int vo_fs;
6559b9364ca3 Add compilation rule for libvo/aspecttest and (hackishly) fix linking.
diego
parents: 25516
diff changeset
15 float vo_panscan;
6087
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
16
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
17 int main(int argc, char *argv[]) {
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
18 int w,h,z=DEF_ZOOM;
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
19 //printf("argc: %d\n",argc);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
20 switch(argc) {
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
21 case 10:
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
22 z = atoi(argv[9]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
23 case 9:
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
24 monitor_aspect = (float)atoi(argv[7])/(float)atoi(argv[8]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
25 case 7:
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
26 aspect_save_prescale(atoi(argv[5]),atoi(argv[6]));
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
27 printf("prescale size: %sx%s\n",argv[5],argv[6]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
28 case 5:
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
29 aspect_save_screenres(atoi(argv[1]),atoi(argv[2]));
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
30 printf("screenres: %sx%s\n",argv[1],argv[2]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
31 aspect_save_orig(atoi(argv[3]),atoi(argv[4]));
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
32 printf("original size: %sx%s\n",argv[3],argv[4]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
33 w=atoi(argv[3]); h=atoi(argv[4]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
34 break;
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
35 default:
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
36 printf("USAGE: %s <screenw> <screenh> <origw> <origh>\n[<prescalew> "
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
37 "<prescaleh>] [<screenaspectw> <screenaspecth>] [<zoom 0/1>]\n",
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
38 argv[0]);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
39 return 1;
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
40 }
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
41 printf("monitor_aspect: %f\n",monitor_aspect);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
42 aspect(&w,&h,z);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
43 printf("new size: %dx%d\n",w,h);
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
44 return 0;
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
45 }
8be92a9b30a4 Fix a bug in the aspect coden (roudning at wrong point) and allow donwscaling in second pass.
atmos4
parents:
diff changeset
46