r830: Fixed a problem whereby the project interlace setting was not being stored...
[cinelerra_cv/mob.git] / quicktime / interlacemodes.h
blob627f9ce8351d827f637d3adfc93d0d09d96e815d
1 /*
2 * This library is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU Lesser General Public License as published
4 * by the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This library is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details.
12 * You should have received a copy of the GNU Lesser General Public
13 * License along with this library; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
15 * USA
18 #ifndef INTERLACEMODES_H
19 #define INTERLACEMODES_H
21 #define BC_ILACE_UNKNOWN_T "Error!"
23 //Interlace Automatic fixing options
24 #define BC_ILACE_AUTOFIXOPTION_MANUAL 0
25 #define BC_ILACE_AUTOFIXOPTION_MANUAL_T "Manual compensation using selection"
26 #define BC_ILACE_AUTOFIXOPTION_AUTO 1
27 #define BC_ILACE_AUTOFIXOPTION_AUTO_T "Automatic compensation using modes"
28 //Note: Do not change what the numbers mean as this will make backward-compatability have erroraneous settings.
30 //Interlace Modes
31 #define BC_ILACE_MODE_UNDETECTED 0
32 #define BC_ILACE_MODE_UNDETECTED_XMLT "UNKNOWN"
33 #define BC_ILACE_MODE_UNDETECTED_T "Unknown"
34 #define BC_ILACE_MODE_TOP_FIRST 1
35 #define BC_ILACE_MODE_TOP_FIRST_XMLT "TOP_FIELD_FIRST"
36 #define BC_ILACE_MODE_TOP_FIRST_T "Top Fields First"
37 #define BC_ILACE_MODE_BOTTOM_FIRST 2
38 #define BC_ILACE_MODE_BOTTOM_FIRST_XMLT "BOTTOM_FIELD_FIRST"
39 #define BC_ILACE_MODE_BOTTOM_FIRST_T "Bottom Fields First"
40 #define BC_ILACE_MODE_NOTINTERLACED 3
41 #define BC_ILACE_MODE_NOTINTERLACED_XMLT "NOTINTERLACED"
42 #define BC_ILACE_MODE_NOTINTERLACED_T "Not Interlaced"
44 #define BC_ILACE_ASSET_MODEDEFAULT BC_ILACE_MODE_UNDETECTED
45 #define BC_ILACE_PROJECT_MODEDEFAULT BC_ILACE_MODE_NOTINTERLACED_T
46 //Note: Do not change what the numbers mean as this will make backward-compatability have erroraneous settings.
48 //Interlace Compensation Methods
49 #define BC_ILACE_FIXMETHOD_NONE 0
50 #define BC_ILACE_FIXMETHOD_NONE_T "Do Nothing"
51 #define BC_ILACE_FIXMETHOD_UPONE 1
52 #define BC_ILACE_FIXMETHOD_UPONE_T "Shift Up 1 pixel"
53 #define BC_ILACE_FIXMETHOD_DOWNONE 2
54 #define BC_ILACE_FIXMETHOD_DOWNONE_T "Shift Down 1 pixel"
55 // the following is for project/asset having odd/even, or even/odd
56 #define BC_ILACE_FIXDEFAULT BC_ILACE_FIXMETHOD_UPONE
57 //Note: Do not change what the numbers mean as this will make backward-compatability have erroraneous settings.
59 // Refer to <mjpegtools/yuv4mpeg.h> (descriptions were cut-and-pasted!)
60 #define BC_ILACE_Y4M_UKNOWN_T "unknown"
61 #define BC_ILACE_Y4M_NONE_T "non-interlaced, progressive frame"
62 #define BC_ILACE_Y4M_TOP_FIRST_T "interlaced, top-field first"
63 #define BC_ILACE_Y4M_BOTTOM_FIRST_T "interlaced, bottom-field first"
64 #define BC_ILACE_Y4M_MIXED_T "mixed, \"refer to frame header\""
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
70 void ilaceautofixoption_to_text(char *string, int autofixoption);
71 int ilaceautofixoption_from_text(char *text, int thedefault);
73 void ilacemode_to_text(char *string, int ilacemode);
74 int ilacemode_from_text(char *text, int thedefault);
76 void ilacemode_to_xmltext(char *string, int ilacemode);
77 int ilacemode_from_xmltext(char *text, int thedefault);
79 void ilacefixmethod_to_text(char *string, int fixmethod);
80 int ilacefixmethod_from_text(char *text, int thedefault);
82 int ilaceautofixmethod(int projectilacemode, int assetilacemode);
83 int ilaceautofixmethod2(int projectilacemode, int assetautofixoption, int assetilacemode, int assetfixmethod);
85 int ilace_bc_to_yuv4mpeg(int ilacemode);
86 int ilace_yuv4mpeg_to_bc(int ilacemode);
88 void ilace_yuv4mpeg_mode_to_text(char *string, int ilacemode);
90 #ifdef __cplusplus
92 #endif
94 #endif // INTERLACEMODES_H