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.
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
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.
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_XMLT "DO_NOTHING"
51 #define BC_ILACE_FIXMETHOD_NONE_T "Do Nothing"
52 #define BC_ILACE_FIXMETHOD_UPONE 1
53 #define BC_ILACE_FIXMETHOD_UPONE_XMLT "SHIFT_UPONE"
54 #define BC_ILACE_FIXMETHOD_UPONE_T "Shift Up 1 pixel"
55 #define BC_ILACE_FIXMETHOD_DOWNONE 2
56 #define BC_ILACE_FIXMETHOD_DOWNONE_XMLT "SHIFT_DOWNONE"
57 #define BC_ILACE_FIXMETHOD_DOWNONE_T "Shift Down 1 pixel"
59 // the following is for project/asset having odd/even, or even/odd
60 #define BC_ILACE_FIXDEFAULT BC_ILACE_FIXMETHOD_UPONE
61 //Note: Do not change what the numbers mean as this will make backward-compatability have erroraneous settings.
63 // Refer to <mjpegtools/yuv4mpeg.h> (descriptions were cut-and-pasted!)
64 #define BC_ILACE_Y4M_UKNOWN_T "unknown"
65 #define BC_ILACE_Y4M_NONE_T "non-interlaced, progressive frame"
66 #define BC_ILACE_Y4M_TOP_FIRST_T "interlaced, top-field first"
67 #define BC_ILACE_Y4M_BOTTOM_FIRST_T "interlaced, bottom-field first"
68 #define BC_ILACE_Y4M_MIXED_T "mixed, \"refer to frame header\""
70 void ilaceautofixoption_to_text(char *string, int autofixoption);
71 int ilaceautofixoption_from_text(const char *text, int thedefault);
73 void ilacemode_to_text(char *string, int ilacemode);
74 int ilacemode_from_text(const char *text, int thedefault);
75 void ilacemode_to_xmltext(char *string, int ilacemode);
76 int ilacemode_from_xmltext(const char *text, int thedefault);
78 void ilacefixmethod_to_text(char *string, int fixmethod);
79 int ilacefixmethod_from_text(const char *text, int thedefault);
80 void ilacefixmethod_to_xmltext(char *string, int fixmethod);
81 int ilacefixmethod_from_xmltext(const char *text, int thedefault);
84 int ilaceautofixmethod(int projectilacemode, int assetilacemode);
85 int ilaceautofixmethod2(int projectilacemode, int assetautofixoption, int assetilacemode, int assetfixmethod);
87 int ilace_bc_to_yuv4mpeg(int ilacemode);
88 int ilace_yuv4mpeg_to_bc(int ilacemode);
90 void ilace_yuv4mpeg_mode_to_text(char *string, int ilacemode);
92 #endif // INTERLACEMODES_H