├── LICENSE ├── README.md ├── aviutl.hpp ├── aviutl ├── AviFileHandle.hpp ├── Color.hpp ├── ColorPlugin.hpp ├── ColorProcInfo.hpp ├── EditHandle.hpp ├── Exfunc.hpp ├── FileInfo.hpp ├── FilterPlugin.hpp ├── FilterProcInfo.hpp ├── FrameStatus.hpp ├── InputHandle.hpp ├── InputInfo.hpp ├── InputPlugin.hpp ├── LangResources.hpp ├── MultiThreadFunc.hpp ├── OutputInfo.hpp ├── OutputPlugin.hpp ├── SharedMemory.hpp ├── SysInfo.hpp ├── aviutl_window_info_t.hpp ├── filter.hpp ├── flag.hpp ├── input.hpp ├── output.hpp └── pixel.hpp ├── exedit.hpp └── exedit ├── BackupFileHandler.hpp ├── CameraZbuffer.hpp ├── CommandId.hpp ├── Exfunc.hpp ├── Filter.hpp ├── FilterProcInfo.hpp ├── Object.hpp ├── ObjectFilterIndex.hpp ├── SubFilterProcInfo.hpp ├── cache.hpp ├── exdata.hpp ├── exo.hpp ├── layer.hpp ├── output_rgba.hpp ├── pixel.hpp ├── save.hpp ├── scene.hpp ├── structs.hpp ├── susie.hpp └── undo.hpp /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 2 | ePi All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | THIS SOFTWARE IS PROVIDED BY ePi “AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ePi BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aviutl_exedit_sdk v1.2 2 | ## これは何? 3 | AviUtlと拡張編集の中身をガチャガチャするときに使うライブラリ 4 | 5 | ## 使用方法 6 | `aviutl.hpp`と`exedit.hpp`があるディレクトリをインクルードパスに追加 7 | AviUtlっぽいことをしたければとりあえず`aviutl.hpp`を、拡張編集っぽいことをしたければ`exedit.hpp`を読めば全部持ってくる 8 | 欲しい型を個別に`aviutl/*.hpp`などから取ってきてもよい 9 | 10 | ## ライセンス 11 | 1条項BSD 12 | 詳細は LICENSE を見ること 13 | 14 | ## 更新履歴 15 | 16 | ### v1.2 17 | - 変更: `ExEdit::FilterProcInfo`の詳細を反映 18 | - 変更: `ExEdit::Filter::Flag::bit11`を削除 19 | - 修正: `PixelBGRA`→`PixelYCA`の変換係数がおかしかった 20 | - 修正: `ExEdit::ExdataUse::Type`の基底を指定してなかったのでレイアウトが壊れてた 21 | 22 | ### v1.1 23 | - 変更: `AviUtl::Exfunc`の1.10での共有メモリ関連の追加関数の詳細を反映 24 | - 変更: `ExEdit::Cache`の詳細を反映 25 | - 変更: `ExEdit::UndoInfo`の詳細を反映 26 | - 変更: `Exedit::Exdata`の`efAudioFile,efWaveForm`の詳細を反映 27 | - 変更: `ExEdit::FilterProcInfo`の`unknown_camera_idx`を`v_func_idx`に変更 28 | - 修正: `AviUtl::OutputPlugin`の`name2,information2,filefilter2`の型は`char[256]`ではなく`char[260]` 29 | - 修正: `AviUtl::Exfunc::yc2rgb`の引数型が壊れてた 30 | - 修正: 規格外のVLAISを1要素配列にした (これでも範囲外参照はダメなんだけど) 31 | - 修正: 実装依存であるところのmulticharacter literalを排除 32 | - 修正: MS拡張であるところのP1280依存を排除 33 | - 修正: `ExEdit::Filter::func_window_init`の戻り値型は`BOOL`ではなく`int` 34 | -------------------------------------------------------------------------------- /aviutl.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | -------------------------------------------------------------------------------- /aviutl/AviFileHandle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace AviUtl { 4 | // exfunc.avi_file_open で作る入力ファイルハンドル 5 | struct AviFileHandle; 6 | } 7 | -------------------------------------------------------------------------------- /aviutl/Color.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace AviUtl { 6 | using GetColorPluginTable_t = ColorPluginDLL*(__stdcall*)(); 7 | const char GetColorTableName[] = "GetColorPluginTable"; 8 | 9 | using GetColorPluginTableYUY2_t = ColorPluginDLL*(__stdcall*)(); 10 | const char GetColorTableYUY2Name[] = "GetColorPluginTableYUY2"; 11 | } 12 | -------------------------------------------------------------------------------- /aviutl/ColorPlugin.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace AviUtl { 9 | namespace detail { 10 | enum class ColorPluginFlag : uint32_t { 11 | None = 0, 12 | Builtin = 1 << 28, 13 | }; 14 | } 15 | 16 | struct ColorPlugin { 17 | using Flag = detail::ColorPluginFlag; 18 | Flag flag; 19 | const char* name; 20 | const char* information; 21 | BOOL (*func_init)(); 22 | BOOL (*func_exit)(); 23 | BOOL (*func_pixel2yc)(ColorProcInfo* cpip); 24 | BOOL (*func_yc2pixel)(ColorProcInfo* cpip); 25 | 26 | int reserve[16]; 27 | 28 | HMODULE dll_hinst; 29 | char path[260]; 30 | }; 31 | 32 | struct ColorPluginDLL { 33 | using Flag = detail::ColorPluginFlag; 34 | Flag flag; 35 | const char* name; 36 | const char* information; 37 | BOOL (*func_init)(); 38 | BOOL (*func_exit)(); 39 | 40 | BOOL (*func_pixel2yc)(ColorProcInfo* cpip); 41 | 42 | BOOL (*func_yc2pixel)(ColorProcInfo* cpip); 43 | 44 | uint32_t reserve[16]; 45 | }; 46 | template<> struct detail::flag::ops_def: std::true_type {}; 47 | } 48 | -------------------------------------------------------------------------------- /aviutl/ColorProcInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | namespace AviUtl { 10 | struct ColorProcInfo { 11 | enum class Flag : uint32_t { 12 | InvertHeight = 1 << 0, 13 | UseSSE = 1 << 8, 14 | UseSSE2 = 1 << 9, 15 | } flag; 16 | 17 | PixelYC* ycp; 18 | void* pixelp; 19 | DWORD format; 20 | int32_t w, h; 21 | int32_t line_size; 22 | int32_t yc_size; 23 | BOOL (*exec_multi_thread_func)(MultiThreadFunc func, void* param1, void* param2); 24 | 25 | int32_t reserve[16]; 26 | }; 27 | template<> struct detail::flag::ops_def: std::true_type {}; 28 | } 29 | -------------------------------------------------------------------------------- /aviutl/EditHandle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace AviUtl { 9 | struct SAV3 { 10 | char name[260]; 11 | byte unknown1[16380]; 12 | int32_t int_4100; 13 | byte unknown2[32]; 14 | }; 15 | 16 | struct EditHandle { 17 | enum class Flag : uint32_t { 18 | Editing = 1, 19 | FilterWindowDisp = 2, 20 | Saving = 5, 21 | bit4 = 1 << 4, 22 | 23 | } flag; 24 | char edit_filename[260]; 25 | char output_filename[260]; 26 | char project_filename[260]; 27 | int32_t w, h; 28 | int32_t frame_n; 29 | int32_t select_frame_start, select_frame_end; 30 | int32_t field_324; 31 | int32_t w1, h1; 32 | int32_t disp_frame; 33 | PixelYC* ycp_edit; 34 | int32_t field_338; 35 | int32_t w2, h2; 36 | int32_t field_344; 37 | DWORD format; 38 | int32_t field_34c[8]; 39 | aviutl_window_info_t aviutl_window_info; 40 | int32_t field_3bc; 41 | int32_t field_3c0_flag; 42 | int32_t fleld_3c4[6]; 43 | int16_t field_3dc; 44 | uint16_t video_decode_bit; 45 | DWORD video_decode_format; 46 | int32_t field_3e4[5]; 47 | int16_t field_3f8; 48 | uint16_t audio_ch; 49 | int32_t audio_rate; 50 | int32_t field_400[3]; 51 | void* unknown_input_struct; 52 | int32_t field_410[23]; 53 | int32_t video_scale; 54 | int32_t video_rate; 55 | int32_t field_470[25008]; 56 | byte sav_1[24704]; 57 | byte sav_2[8548]; 58 | int32_t field_20d14; 59 | char some_paths[96][260]; 60 | int32_t field_26e98[1093758]; 61 | int32_t field_453090; 62 | int32_t field_453094[107329]; 63 | HGLOBAL some_hglobals[256]; 64 | int32_t field_4bc198[193]; 65 | SAV3 sav_3; 66 | int32_t field_4c05c0[256]; 67 | int32_t* video; 68 | int32_t* audio; 69 | int32_t* field_4c09c8; 70 | int32_t* field_4c09cc; 71 | byte* inter; 72 | byte* index24fps; 73 | byte* edit_flag; 74 | byte* config; 75 | byte* vcm; 76 | byte* field_4c09e4; 77 | }; 78 | template<>struct detail::flag::ops_def:std::true_type{}; 79 | } 80 | -------------------------------------------------------------------------------- /aviutl/Exfunc.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace AviUtl{ 15 | 16 | struct FilterPlugin; 17 | 18 | struct ExFunc { 19 | [[deprecated("use get_ycp_source_cache.")]] 20 | void (*get_ycp_ofs)(EditHandle* editp, int32_t n, int32_t ofs); 21 | 22 | [[deprecated("use get_ycp_source_cache.")]] 23 | void* (*get_ycp)(EditHandle* editp, int32_t n); 24 | 25 | void* (*get_pixelp)(EditHandle* editp, int32_t n); 26 | 27 | int32_t (*get_audio)(EditHandle* editp, int32_t n, void* buf); 28 | 29 | BOOL (*is_editing)(EditHandle* editp); 30 | 31 | BOOL (*is_saving)(EditHandle* editp); 32 | 33 | int32_t (*get_frame)(EditHandle* editp); 34 | 35 | int32_t (*get_frame_n)(EditHandle* editp); 36 | 37 | BOOL (*get_frame_size)(EditHandle* editp, int32_t* w, int32_t* h); 38 | 39 | int32_t (*set_frame)(EditHandle* editp, int32_t n); 40 | 41 | int32_t (*set_frame_n)(EditHandle* editp, int32_t n); 42 | 43 | BOOL (*copy_frame)(EditHandle* editp, int32_t d, int32_t s); 44 | 45 | BOOL (*copy_video)(EditHandle* editp, int32_t d, int32_t s); 46 | 47 | BOOL (*copy_audio)(EditHandle* editp, int32_t d, int32_t s); 48 | 49 | BOOL (*copy_clip)(HWND hwnd, PixelBGR* pixelp, int32_t w, int32_t h); 50 | 51 | BOOL (*paste_clip)(HWND hwnd, EditHandle* editp, int32_t n); 52 | 53 | BOOL (*get_frame_status)(EditHandle* editp, int32_t n, FrameStatus* fsp); 54 | 55 | BOOL (*set_frame_status)(EditHandle* editp, int32_t n, FrameStatus* fsp); 56 | 57 | BOOL (*is_saveframe)(EditHandle* editp, int32_t n); 58 | 59 | BOOL (*is_keyframe)(EditHandle* editp, int32_t n); 60 | 61 | BOOL (*is_recompress)(EditHandle* editp, int32_t n); 62 | 63 | BOOL (*filter_window_update)(FilterPlugin* fp); 64 | 65 | BOOL (*is_filter_window_disp)(FilterPlugin* fp); 66 | 67 | BOOL (*get_file_info)(EditHandle* editp, FileInfo* fip); 68 | 69 | LPSTR (*get_config_name)(EditHandle* editp, int32_t n); 70 | 71 | BOOL (*is_filter_active)(FilterPlugin* fp); 72 | 73 | BOOL (*get_pixel_filtered)(EditHandle* editp, int32_t n, PixelBGR* pixelp, int32_t* w, int32_t* h); 74 | 75 | int32_t (*get_audio_filtered)(EditHandle* editp, int32_t n, void* buf); 76 | 77 | BOOL (*get_select_frame)(EditHandle* editp, int32_t* s, int32_t* e); 78 | 79 | BOOL (*set_select_frame)(EditHandle* editp, int32_t s, int32_t e); 80 | 81 | BOOL (*rgb2yc)(PixelYC* ycp, PixelBGR* pixelp, int32_t w); 82 | 83 | BOOL (*yc2rgb)(PixelBGR* pixelp, PixelYC* ycp, int32_t w); 84 | 85 | BOOL (*dlg_get_load_name)(LPSTR name, LPCSTR filter, LPCSTR def); 86 | 87 | BOOL (*dlg_get_save_name)(LPSTR name, LPCSTR filter, LPCSTR def); 88 | 89 | int32_t (*ini_load_int)(FilterPlugin* fp, LPCSTR key, int32_t n); 90 | 91 | int32_t (*ini_save_int)(FilterPlugin* fp, LPCSTR key, int32_t n); 92 | 93 | BOOL (*ini_load_str)(FilterPlugin* fp, LPCSTR key, LPSTR str, LPCSTR def); 94 | 95 | BOOL (*ini_save_str)(FilterPlugin* fp, LPCSTR key, LPCSTR str); 96 | 97 | BOOL (*get_source_file_info)(EditHandle* editp, FileInfo* fip, int32_t source_file_id); 98 | 99 | BOOL (*get_source_video_number)(EditHandle* editp, int32_t n, int32_t* source_file_id, int32_t* source_video_number); 100 | 101 | BOOL (*get_sys_info)(EditHandle* editp, SysInfo* sip); 102 | 103 | FilterPlugin* (*get_filterp)(int32_t filter_id); 104 | 105 | [[deprecated("use get_ycp_filtering_cache_ex.")]] 106 | void* (*get_ycp_filtering)(FilterPlugin* fp, EditHandle* editp, int32_t n, void* reserve); 107 | 108 | int32_t (*get_audio_filtering)(FilterPlugin* fp, EditHandle* editp, int32_t n, int16_t* buf); 109 | 110 | BOOL (*set_ycp_filtering_cache_size)(FilterPlugin* fp, int32_t w, int32_t h, int32_t d, int32_t flag); 111 | 112 | [[deprecated("use get_ycp_filtering_cache_ex.")]] 113 | void* (*get_ycp_filtering_cache)(FilterPlugin* fp, EditHandle* editp, int32_t n); 114 | 115 | void* (*get_ycp_source_cache)(EditHandle* editp, int32_t n, int32_t ofs); 116 | 117 | void* (*get_disp_pixelp)(EditHandle* editp, DWORD format); 118 | 119 | BOOL (*get_pixel_source)(EditHandle* editp, int32_t n, void* pixelp, DWORD format); 120 | 121 | BOOL (*get_pixel_filtered_ex)(EditHandle* editp, int32_t n, void* pixelp, int32_t* w, int32_t* h, DWORD format); 122 | 123 | PixelYC* (*get_ycp_filtering_cache_ex)(FilterPlugin* fp, EditHandle* editp, int32_t n, int32_t* w, int32_t* h); 124 | 125 | BOOL (*exec_multi_thread_func)(MultiThreadFunc func, void* param1, void* param2); 126 | 127 | PixelYC* (*create_yc)(); 128 | 129 | void (*delete_yc)(PixelYC* ycp); 130 | 131 | enum class LoadImageFlag : uint32_t { 132 | None = 0 133 | }; 134 | BOOL(*load_image)(PixelYC* ycp, LPSTR file, int32_t* w, int32_t* h, LoadImageFlag flag); 135 | 136 | void (*resize_yc)(PixelYC* ycp, int32_t w, int32_t h, PixelYC* ycp_src, int32_t sx, int32_t sy, int32_t sw, int32_t sh); 137 | 138 | void (*copy_yc)(PixelYC* ycp, int32_t x, int32_t y, PixelYC* ycp_src, int32_t sx, int32_t sy, int32_t sw, int32_t sh, int32_t tr); 139 | 140 | void (*draw_text)(PixelYC* ycp, int32_t x, int32_t y, LPSTR text, int32_t r, int32_t g, int32_t b, int32_t tr, HFONT hfont, int32_t* w, int32_t* h); 141 | 142 | enum class AVIFileOpenFlag : uint32_t { 143 | VideoOnly = 1 << 4, 144 | AudioOnly = 1 << 5, 145 | ForceAVI = 1 << 6, // private 強制的にAVIs_File_Readerに食わせる 146 | YUY2 = 1 << 16, 147 | RGB24 = 1 << 17, 148 | RGB32 = 1 << 18, 149 | }; 150 | AviFileHandle* (*avi_file_open)(LPSTR file, FileInfo* fip, AVIFileOpenFlag flag); 151 | 152 | void (*avi_file_close)(AviFileHandle* afh); 153 | BOOL (*avi_file_read_video)(AviFileHandle* afh, PixelYC* ycp, int32_t n); 154 | 155 | int32_t (*avi_file_read_audio)(AviFileHandle* afh, void* buf, int32_t n); 156 | 157 | void* (*avi_file_get_video_pixelp)(AviFileHandle* afh, int32_t n); 158 | 159 | enum class GetAVIFileFilterType : uint32_t { 160 | Video = 0, 161 | Audio = 1, 162 | }; 163 | const char* (*get_avi_file_filter)(GetAVIFileFilterType type); 164 | 165 | int32_t (*avi_file_read_audio_sample)(AviFileHandle* afh, int32_t start, int32_t length, int16_t* buf); 166 | 167 | int32_t (*avi_file_set_audio_sample_rate)(AviFileHandle* afh, int32_t audio_rate, int32_t audio_ch); 168 | 169 | enum class FrameStatusType : uint32_t { 170 | EditFlag = 0, 171 | Inter = 1 172 | }; 173 | BYTE* (*get_frame_status_table)(EditHandle* editp, FrameStatusType type); 174 | 175 | BOOL (*set_undo)(EditHandle* editp); 176 | 177 | enum class AddMenuItemFlag : uint32_t { 178 | None = 0, 179 | Shift = 1, 180 | Ctrl = 2, 181 | Alt = 4, 182 | }; 183 | BOOL (*add_menu_item)(FilterPlugin* fp, LPCSTR name, HWND hwnd, int32_t id, int32_t def_key, AddMenuItemFlag flag); 184 | 185 | enum class EditOpenFlag : uint32_t { 186 | None = 0, 187 | Add = 1 << 1, 188 | Flag_0x2= 1 << 2, 189 | Audio = 1 << 4, 190 | Project = 1 << 9, 191 | Dialog = 1 << 16, 192 | }; 193 | BOOL (*edit_open)(EditHandle* editp, LPSTR file, EditOpenFlag flag); 194 | 195 | BOOL (*edit_close)(EditHandle* editp); 196 | 197 | enum class EditOutputFlag : uint32_t { 198 | NoDialog = 1 << 1, 199 | Wav = 1 << 2 200 | }; 201 | BOOL (*edit_output)(EditHandle* editp, const char* file, int32_t flag, const char* type); 202 | 203 | BOOL (*set_config)(EditHandle* editp, int32_t n, LPSTR name); 204 | 205 | void* (*create_shared_mem)(int32_t key1, int32_t key2, int32_t size, SharedMemoryInfo** handle_ptr); 206 | 207 | void* (*get_shared_mem)(int32_t key1, int32_t key2, SharedMemoryInfo* handle); 208 | 209 | void (*delete_shared_mem)(int32_t key1, SharedMemoryInfo* handle); 210 | 211 | int32_t reserve[4]; 212 | }; 213 | template<> struct detail::flag::ops_def: std::true_type {}; 214 | template<> struct detail::flag::ops_def: std::true_type {}; 215 | template<> struct detail::flag::ops_def: std::true_type {}; 216 | template<> struct detail::flag::ops_def: std::true_type {}; 217 | template<> struct detail::flag::ops_def: std::true_type {}; 218 | } 219 | -------------------------------------------------------------------------------- /aviutl/FileInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace AviUtl { 7 | struct FileInfo { 8 | enum class Flag : uint32_t { 9 | Video = 1, 10 | Audio = 2, 11 | } flag; 12 | 13 | const char* name; 14 | int32_t w, h; 15 | int32_t video_rate, video_scale; 16 | 17 | int32_t audio_rate; 18 | int32_t audio_ch; 19 | 20 | int32_t frame_n; 21 | 22 | DWORD video_decode_format; 23 | int32_t video_decode_bit; 24 | 25 | int32_t audio_n; 26 | 27 | int32_t reserve[4]; 28 | }; 29 | 30 | template<> struct detail::flag::ops_def: std::true_type {}; 31 | } 32 | -------------------------------------------------------------------------------- /aviutl/FilterPlugin.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace AviUtl{ 11 | namespace detail{ 12 | enum class FilterPluginFlag : uint32_t { 13 | Active = 1 << 0, 14 | WindowActive = 1 << 1, // フィルタの設定ウィンドウが表示されている時 ON になる. 15 | AlwaysActive = 1 << 2, 16 | ConfigPopup = 1 << 3, 17 | ConfigCheck = 1 << 4, 18 | ConfigRadio = 1 << 5, 19 | Unknown = 1 << 8, // 42416a 20 | Exdata = 1 << 10, 21 | PriorityHighest = 1 << 11, 22 | PriorityLowest = 1 << 12, 23 | WindowThickFrame = 1 << 13, 24 | WindowSize = 1 << 14, 25 | DispFilter = 1 << 15, 26 | MultiFilter = 1 << 16, // 1つのファイルで複数のフィルタを登録するとき,2つ目以降のFilterPluginに設定される. 27 | Redraw = 1 << 17, 28 | ExInformation = 1 << 18, 29 | Information = 1 << 19, 30 | NoConfig = 1 << 20, 31 | AudioFilter = 1 << 21, 32 | RadioButton = 1 << 22, 33 | WindowHScrool = 1 << 23, 34 | WindowVScrool = 1 << 24, 35 | Builtin = 1 << 25, // AviUtl 本体に組み込まれているフィルタなら ON になっている. 36 | InterlaceFilter = 1 << 26, 37 | NoInitData = 1 << 27, 38 | Import = 1 << 28, 39 | Export = 1 << 29, 40 | MainMessage = 1 << 30, 41 | }; 42 | template<>struct detail::flag::ops_def:std::true_type{}; 43 | 44 | enum class FilterPluginUpdateStatus : uint32_t { 45 | All = 0, 46 | Track = 1 << 16, 47 | Check = 1 << 17, 48 | }; 49 | template<>struct detail::flag::ops_def:std::true_type{}; 50 | 51 | // 変更されたトラックバー/チェックボックスのインデックスを返す 52 | // 全項目が変更された場合は0 53 | inline constexpr int32_t get_updated_idx(FilterPluginUpdateStatus status) { 54 | constexpr auto mask = ~(FilterPluginUpdateStatus::Track | FilterPluginUpdateStatus::Check); 55 | return static_cast(status & mask); 56 | } 57 | 58 | struct FilterPluginWindowMessage { 59 | constexpr static inline UINT Update = WM_USER + 100; // 464H 1124 60 | constexpr static inline UINT FileOpen = WM_USER + 101; // 465H 1125 61 | constexpr static inline UINT FileClose = WM_USER + 102; // 466H 1126 62 | constexpr static inline UINT Init = WM_USER + 103; // 467H 1127 63 | constexpr static inline UINT Exit = WM_USER + 104; // 468H 1128 64 | constexpr static inline UINT SaveStart = WM_USER + 105; // 469H 1129 65 | constexpr static inline UINT SaveEnd = WM_USER + 106; // 46AH 1130 66 | constexpr static inline UINT Import = WM_USER + 107; // 46BH 1131 67 | constexpr static inline UINT Export = WM_USER + 108; // 46CH 1132 68 | constexpr static inline UINT ChangeActive = WM_USER + 109; // 46DH 1133 69 | constexpr static inline UINT ChangeWindow = WM_USER + 110; // 46EH 1134 70 | constexpr static inline UINT ChangeParam = WM_USER + 111; // 46FH 1135 71 | constexpr static inline UINT ChangeEdit = WM_USER + 112; // 470H 1136 72 | constexpr static inline UINT Command = WM_USER + 113; // 471H 1137 73 | constexpr static inline UINT FileUpdate = WM_USER + 114; // 472H 1138 74 | 75 | constexpr static inline UINT MainMouseDown = WM_USER + 120; // 478H 1144 76 | constexpr static inline UINT MainMouseUp = WM_USER + 121; // 479H 1145 77 | constexpr static inline UINT MainMouseMove = WM_USER + 122; // 47AH 1146 78 | constexpr static inline UINT MainKeyDown = WM_USER + 123; // 47BH 1147 79 | constexpr static inline UINT MainKeyUp = WM_USER + 124; // 47CH 1148 80 | constexpr static inline UINT MainMoveSize = WM_USER + 125; // 47DH 1149 81 | constexpr static inline UINT MainMouseDblclk = WM_USER + 126; // 47EH 1150 82 | constexpr static inline UINT MainMouseRDown = WM_USER + 127; // 47FH 1151 83 | constexpr static inline UINT MainMouseRUp = WM_USER + 128; // 480H 1152 84 | constexpr static inline UINT MainMouseWheel = WM_USER + 129; // 481H 1153 85 | constexpr static inline UINT MainContextMenu = WM_USER + 130; // 482H 1154 86 | }; 87 | } 88 | 89 | struct FilterPlugin; 90 | 91 | struct FilterPluginDLL { 92 | using Flag = detail::FilterPluginFlag; 93 | using UpdateStatus = detail::FilterPluginUpdateStatus; 94 | using WindowMessage = detail::FilterPluginWindowMessage; 95 | 96 | Flag flag; 97 | 98 | static const int32_t WindowSizeClient = 0x10000000; 99 | static const int32_t WindowSizeAdd = 0x30000000; 100 | 101 | int32_t x, y; 102 | 103 | const char* name; 104 | 105 | int32_t track_n; 106 | const char** track_name; 107 | int32_t* track_default; 108 | int32_t *track_s, *track_e; 109 | 110 | int32_t check_n; 111 | const char** check_name; 112 | int32_t* check_default; 113 | 114 | BOOL (*func_proc)(FilterPlugin* fp, FilterProcInfo* fpip); 115 | BOOL (*func_init)(FilterPlugin* fp); 116 | BOOL (*func_exit)(FilterPlugin* fp); 117 | BOOL (*func_update)(FilterPlugin* fp, UpdateStatus status); 118 | 119 | // check_defaultに-1を指定してボタンにした際,n番目のボタン(配列上の位置ではない 1-indexed)が押されたときに 120 | // msg に WM_COMMAND, wparam に MidFilterButton+n-1 がfunc_WndProcへ渡される. 121 | static const int32_t MidFilterButton = 12004; 122 | 123 | BOOL (*func_WndProc)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, EditHandle* editp, FilterPlugin* fp); 124 | 125 | int32_t* track; 126 | int32_t* check; 127 | 128 | void* ex_data_ptr; 129 | int32_t ex_data_size; 130 | 131 | const char* information; 132 | 133 | BOOL (*func_save_start)(FilterPlugin* fp, int32_t s, int32_t e, EditHandle* editp); 134 | 135 | BOOL (*func_save_end)(FilterPlugin* fp, EditHandle* editp); 136 | 137 | ExFunc* exfunc; 138 | HWND hwnd; 139 | HINSTANCE dll_hinst; 140 | 141 | void* ex_data_def; 142 | 143 | BOOL(*func_is_saveframe)(FilterPlugin* fp, EditHandle* editp, int32_t saveno, int32_t frame, int32_t fps, int32_t edit_flag, int32_t inter); 144 | 145 | BOOL(*func_project_load)(FilterPlugin* fp, EditHandle* editp, void* data, int32_t size); 146 | 147 | BOOL(*func_project_save)(FilterPlugin* fp, EditHandle* editp, void* data, int32_t* size); 148 | 149 | BOOL(*func_modify_title)(FilterPlugin* fp, EditHandle* editp, LPSTR title, int32_t max_title); 150 | 151 | char* path; 152 | 153 | int32_t reserve[2]; 154 | }; 155 | 156 | struct FilterPlugin { 157 | using Flag = detail::FilterPluginFlag; 158 | using UpdateStatus = detail::FilterPluginUpdateStatus; 159 | using WindowMessage = detail::FilterPluginWindowMessage; 160 | 161 | Flag flag; 162 | int32_t x, y; 163 | const char* name; 164 | int32_t track_n; 165 | const char** track_name; 166 | int32_t* track_default; 167 | int32_t *track_s, *track_e; 168 | int32_t check_n; 169 | const char** check_name; 170 | int32_t* check_default; 171 | BOOL (*func_proc)(FilterPlugin* fp, FilterProcInfo* fpip); 172 | BOOL (*func_init)(FilterPlugin* fp); 173 | BOOL (*func_exit)(FilterPlugin* fp); 174 | BOOL (*func_update)(FilterPlugin* fp, UpdateStatus status); 175 | static const int32_t MidFilterButton = 12004; 176 | BOOL (*func_WndProc)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, EditHandle* editp, FilterPlugin* fp); 177 | int32_t* track; 178 | int32_t* check; 179 | void* ex_data_ptr; 180 | int32_t ex_data_size; 181 | const char* information; 182 | BOOL (*func_save_start)(FilterPlugin* fp, int32_t s, int32_t e, EditHandle* editp); 183 | BOOL (*func_save_end)(FilterPlugin* fp, EditHandle* editp); 184 | ExFunc* exfunc; 185 | HWND hwnd; 186 | HINSTANCE dll_hinst; 187 | void* ex_data_def; 188 | BOOL(*func_is_saveframe)(FilterPlugin* fp, EditHandle* editp, int32_t saveno, int32_t frame, int32_t fps, int32_t edit_flag, int32_t inter); 189 | BOOL(*func_project_load)(FilterPlugin* fp, EditHandle* editp, void* data, int32_t size); 190 | BOOL(*func_project_save)(FilterPlugin* fp, EditHandle* editp, void* data, int32_t* size); 191 | BOOL(*func_modify_title)(FilterPlugin* fp, EditHandle* editp, LPSTR title, int32_t max_title); 192 | struct{ 193 | char path[260]; 194 | HMENU menu1; 195 | HMENU menu2; 196 | } *path; 197 | int32_t reserve[2]; 198 | int32_t menu_index; 199 | HWND hwnd_parent; 200 | HWND unknown_hwnd; 201 | HWND track_trackbar_hwnd[32]; 202 | HWND track_edit_hwnd[32]; 203 | HWND track_aviutlbutton1_hwnd[32]; 204 | HWND track_aviutlbutton2_hwnd[32]; 205 | HWND track_static_hwnd[32]; 206 | HWND check_hwnd[32]; 207 | int32_t track_array[32]; 208 | int32_t check_array[32]; 209 | HMENU hmenu; 210 | int32_t unknown; 211 | HINSTANCE hinst_parent; 212 | PixelYC* cache_edit; 213 | PixelYC* cache_temp; 214 | void* cache_ptr; 215 | int32_t cache_w, cache_h; 216 | int32_t cache_d; 217 | int32_t cache_flag; 218 | DWORD mode_yuy2; 219 | 220 | inline static constexpr int32_t get_updated_idx(UpdateStatus status) { 221 | return detail::get_updated_idx(status); 222 | } 223 | }; 224 | } 225 | -------------------------------------------------------------------------------- /aviutl/FilterProcInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace AviUtl{ 9 | struct FilterProcInfo { 10 | enum class Flag : uint32_t { 11 | InvertFieldOrder = 1 << 16, 12 | InvertInterlace = 1 << 17, 13 | } flag; 14 | 15 | void *ycp_edit, *ycp_temp; 16 | int32_t w, h; 17 | int32_t max_w, max_h; 18 | 19 | int32_t frame; 20 | int32_t frame_n; 21 | 22 | int32_t org_w, org_h; 23 | 24 | short* audiop; 25 | int32_t audio_n; 26 | int32_t audio_ch; 27 | 28 | [[deprecated("現在は使用されていません")]] 29 | PixelBGR* pixelp; 30 | EditHandle* editp; 31 | int32_t yc_size; 32 | int32_t line_size; 33 | uint32_t reserve[8]; 34 | }; 35 | 36 | template<> struct detail::flag::ops_def: std::true_type {}; 37 | } 38 | -------------------------------------------------------------------------------- /aviutl/FrameStatus.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace AviUtl { 7 | struct FrameStatus { 8 | int32_t video; 9 | int32_t audio; 10 | enum class Interlace : uint32_t { 11 | Normal = 0, 12 | Reverse = 1, 13 | Odd = 2, 14 | Even = 3, 15 | Mix = 4, 16 | Auto = 5, 17 | } inter; 18 | 19 | [[deprecated]] 20 | int32_t index24fps; 21 | 22 | int32_t config; 23 | int32_t vcm; 24 | 25 | enum class EditFlag : uint32_t { 26 | KeyFrame = 1 << 0, 27 | MarkFrame = 1 << 1, 28 | DelFrame = 1 << 2, 29 | NullFrame = 1 << 3, 30 | } edit_flag; 31 | 32 | uint32_t reserve[9]; 33 | }; 34 | template<> struct detail::flag::ops_def: std::true_type {}; 35 | } 36 | -------------------------------------------------------------------------------- /aviutl/InputHandle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace AviUtl { 4 | using InputHandle = void*; 5 | } 6 | -------------------------------------------------------------------------------- /aviutl/InputInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace AviUtl{ 8 | struct InputInfo{ 9 | enum class Flag : uint32_t { 10 | Video = 1 << 0, 11 | Audio = 1 << 1, 12 | VideoRandomAccess = 1 << 3, 13 | } flag; 14 | 15 | int32_t rate,scale; 16 | int32_t n; 17 | BITMAPINFOHEADER* format; 18 | int32_t format_size; 19 | int32_t audio_n; 20 | WAVEFORMATEX* audio_format; 21 | int32_t audio_format_size; 22 | DWORD handler; 23 | 24 | int32_t reserve[7]; 25 | }; 26 | template<> struct detail::flag::ops_def: std::true_type {}; 27 | } 28 | -------------------------------------------------------------------------------- /aviutl/InputPlugin.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace AviUtl{ 9 | namespace detail { 10 | enum class InputPluginFlag : uint32_t { 11 | Video = 1 << 0, 12 | Audio = 1 << 1, 13 | HasConfig = 1 << 8, 14 | Builtin = 1 << 20, 15 | VFPlugin = 1 << 22, 16 | }; 17 | template<> struct flag::ops_def: std::true_type {}; 18 | } 19 | 20 | struct InputPluginDLL { 21 | using Flag = detail::InputPluginFlag; 22 | 23 | Flag flag; 24 | const char* name; 25 | const char* filefilter; 26 | const char* information; 27 | BOOL (*func_init)(); 28 | BOOL (*func_exit)(); 29 | InputHandle (*func_open)(const char* file); 30 | BOOL (*func_close)(InputHandle ih); 31 | BOOL (*func_info_get)(InputHandle ih, InputInfo* iip); 32 | int32_t (*func_read_video)(InputHandle ih, int32_t frame, void* buf); 33 | int32_t (*func_read_audio)(InputHandle ih, int32_t start, int32_t length, void* buf); 34 | BOOL (*func_is_keyframe)(InputHandle ih, int32_t frame); 35 | BOOL (*func_config)(HWND hwnd, HINSTANCE dll_hinst); 36 | int32_t reserve[16]; 37 | }; 38 | 39 | struct InputPlugin { 40 | using Flag = detail::InputPluginFlag; 41 | 42 | Flag flag; 43 | const char* name; 44 | const char* filefilter; 45 | const char* information; 46 | BOOL (*func_init)(); 47 | BOOL (*func_exit)(); 48 | InputHandle (*func_open)(const char* file); 49 | BOOL (*func_close)(InputHandle ih); 50 | BOOL (*func_info_get)(InputHandle ih, InputInfo* iip); 51 | int32_t (*func_read_video)(InputHandle ih, int32_t frame, void* buf); 52 | int32_t (*func_read_audio)(InputHandle ih, int32_t start, int32_t length, void* buf); 53 | BOOL (*func_is_keyframe)(InputHandle ih, int32_t frame); 54 | BOOL (*func_config)(HWND hwnd, HINSTANCE dll_hinst); 55 | int32_t reserve[16]; 56 | char path[260]; 57 | char name2[256]; 58 | char filefilter2[256]; 59 | char information2[256]; 60 | HMODULE hmodule; 61 | int32_t ref_count; 62 | int32_t index; 63 | int32_t unknown1; 64 | int32_t unknown2; 65 | FARPROC proc; 66 | int32_t unknown3[3]; 67 | }; 68 | } 69 | -------------------------------------------------------------------------------- /aviutl/LangResources.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace AviUtl { 6 | struct LangResources { 7 | HMODULE hmodule; 8 | int32_t param; 9 | char name[256]; 10 | char path[256]; 11 | char information[256]; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /aviutl/MultiThreadFunc.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace AviUtl{ 4 | using MultiThreadFunc = void(*)(int thread_id, int thread_num, void* param1, void* param2); 5 | } 6 | -------------------------------------------------------------------------------- /aviutl/OutputInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace AviUtl{ 8 | struct OutputInfo { 9 | enum class Flag : uint32_t { 10 | Video = 1 << 0, // 画像データあり 11 | Audio = 1 << 1, // 音声データあり 12 | Batch = 1 << 2, // バッチ出力中 13 | } flag; 14 | 15 | int32_t w, h; // 縦横サイズ 16 | int32_t rate, scale; // フレームレート 17 | int32_t n; 18 | int32_t size; 19 | int32_t audio_rate; 20 | int32_t audio_ch; 21 | int32_t audio_n; 22 | int32_t audio_size; 23 | const char* savefile; 24 | 25 | void* (*func_get_video)(int32_t frame); 26 | void* (*func_get_audio)(int32_t start, int32_t length, int32_t* readed); 27 | 28 | BOOL (*func_is_abort)(); 29 | BOOL (*func_rest_time_disp)(int32_t now, int32_t total); 30 | 31 | enum class FrameFlag : uint32_t { 32 | KeyFrame = 1 << 0, 33 | CopyFrame = 1 << 1, 34 | }; 35 | int32_t (*func_get_flag)(FrameFlag frame); 36 | 37 | BOOL (*func_update_preview)(); 38 | void* (*func_get_video_ex)(int32_t frame, DWORD format); 39 | }; 40 | template<> struct detail::flag::ops_def: std::true_type {}; 41 | template<> struct detail::flag::ops_def: std::true_type {}; 42 | } 43 | -------------------------------------------------------------------------------- /aviutl/OutputPlugin.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | namespace AviUtl{ 9 | namespace detail { 10 | enum class OutputPluginFlag : uint32_t { 11 | Video = 1 << 0, 12 | Audio = 1 << 1, 13 | Builtin = 1 << 20, 14 | }; 15 | template<> struct flag::ops_def: std::true_type {}; 16 | } 17 | 18 | struct OutputPluginDLL { 19 | using Flag = detail::OutputPluginFlag; 20 | Flag flag; 21 | char const * name; 22 | char const * filefilter; 23 | char const * information; 24 | 25 | BOOL (*func_init)() = nullptr; 26 | BOOL (*func_exit)() = nullptr; 27 | BOOL (*func_output)(OutputInfo* oip); 28 | BOOL (*func_config)(HWND hwnd, HINSTANCE dll_hinst); 29 | int32_t (*func_config_get)(void* data, int32_t size); 30 | int32_t (*func_config_set)(void* data, int32_t size); 31 | int32_t reserve[16]; 32 | }; 33 | struct OutputPlugin { 34 | using Flag = detail::OutputPluginFlag; 35 | Flag flag; 36 | char const* name; 37 | char const* filefilter; 38 | char const* information; 39 | 40 | BOOL (*func_init)(); 41 | BOOL (*func_exit)(); 42 | BOOL (*func_output)(OutputInfo* oip); 43 | BOOL (*func_config)(HWND hwnd, HINSTANCE dll_hinst); 44 | int32_t (*func_config_set)(void* data, int32_t size); 45 | int32_t (*func_config_get)(void* data, int32_t size); 46 | int32_t reserve[16]; 47 | int32_t unknown; 48 | char path[260]; 49 | char name2[260]; 50 | char filefilter2[260]; 51 | char information2[260]; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /aviutl/SharedMemory.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace AviUtl { 5 | struct SharedMemoryInfo { 6 | HANDLE hFileMappingObject; 7 | void* mem_ptr; 8 | SIZE_T size; 9 | SharedMemoryInfo** this_handle_ptr; 10 | int key1; 11 | int key2; 12 | int id; 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /aviutl/SysInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace AviUtl { 8 | struct SysInfo { 9 | enum class Flag { 10 | Edit = 1, 11 | VFAPI = 2, 12 | UseSSE = 4, 13 | UseSSE2 = 8, 14 | } flag; 15 | 16 | const char* info; 17 | int32_t filter_n; 18 | int32_t min_w, min_h; 19 | int32_t max_w, max_h; 20 | int32_t max_frame; 21 | const char* edit_name; 22 | const char* project_name; 23 | const char* output_name; 24 | int32_t vram_w, vram_h; 25 | int32_t vram_yc_size; 26 | int32_t vram_line_size; 27 | HFONT hfont; 28 | int32_t build; 29 | int32_t reserve[2]; 30 | }; 31 | 32 | template<> struct detail::flag::ops_def: std::true_type {}; 33 | } 34 | -------------------------------------------------------------------------------- /aviutl/aviutl_window_info_t.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include "flag.hpp" 6 | 7 | namespace AviUtl { 8 | 9 | struct aviutl_window_info_t { 10 | enum class Flag { 11 | AudioWave = 1 << 3, 12 | Preview = 1 << 4, // 0x2391 13 | DeleteFrame = 1 << 5, // 0x2392 14 | Overray = 1 << 9, // 0x2397 15 | AlwaysTop = 1 << 11, // 0x2399 HWND_NOTOPMOST / HWND_TOPMOST 16 | AviKeyframe = 1 << 12, // 0x2395 17 | RecompressFrame = 1 << 13, // 0x2396 18 | Time = 1 << 14, // 0x239a 19 | Nofilter = 1 << 15, // 0x1418 20 | DataRate = 1 << 16, // 0x239b 21 | SizeAuto = 1 << 19, // 0x239c 22 | } flag; 23 | int32_t x, y, w, h; 24 | int32_t zoom; 25 | HWND main_window; 26 | HWND time_trackbar; 27 | HWND back; 28 | HWND forward; 29 | HWND in; 30 | HWND out; 31 | HWND hwnd1; 32 | int32_t x2, y2, w2, h2; 33 | HWND hwnd2; 34 | HWND hwnd3; 35 | HWND play; 36 | }; 37 | template<>struct detail::flag::ops_def:std::true_type{}; 38 | } 39 | -------------------------------------------------------------------------------- /aviutl/filter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace AviUtl{ 6 | using GetFilterTable_t = FilterPluginDLL*(__stdcall*)(); 7 | constexpr char GetFilterTableName[] = "GetFilterTable"; 8 | using GetFilterTableList_t = FilterPluginDLL**(__stdcall*)(); 9 | constexpr char GetFilterTableListName[] = "GetFilterTableList"; 10 | 11 | using GetFilterTableYUY2_t = FilterPluginDLL*(__stdcall*)(); 12 | constexpr char GetFilterTableYUY2Name[] = "GetFilterTableYUY2"; 13 | using GetFilterTableListYUY2_t = FilterPluginDLL**(__stdcall*)(); 14 | constexpr char GetFilterTableListYUY2Name[] = "GetFilterTableListYUY2"; 15 | } 16 | -------------------------------------------------------------------------------- /aviutl/flag.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace AviUtl { 6 | namespace detail::flag { 7 | templatestruct ops_def:std::false_type{}; 8 | 9 | template 10 | concept enum_c = std::is_enum_v; 11 | 12 | template 13 | concept defined = ops_def::value || ops_def::value; 14 | 15 | template constexpr auto to_underlying(T x) { return x; } 16 | template constexpr auto to_underlying(T x) { return static_cast>(x); } 17 | 18 | template using my_underlying_type_t = decltype(to_underlying(std::declval)); 19 | 20 | template 21 | using flag_result_t = std::conditional_t, T1, T2>; 22 | 23 | template 24 | concept is_enable = defined && std::same_as, my_underlying_type_t>; 25 | 26 | template 27 | concept is_enable_tri = is_enable && is_enable && is_enable; 28 | 29 | 30 | template requires is_enable constexpr bool operator!(T x) { return to_underlying(x) == 0; } 31 | template requires is_enable constexpr auto operator+(T x) { return to_underlying(x); } 32 | template requires is_enable constexpr T operator~(T x) { return static_cast(~to_underlying(x)); } 33 | 34 | template requires is_enable constexpr auto operator&(T1 x, T2 y) { return static_cast>(to_underlying(x) & to_underlying(y)); } 35 | template requires is_enable constexpr auto operator|(T1 x, T2 y) { return static_cast>(to_underlying(x) | to_underlying(y)); } 36 | template requires is_enable constexpr auto operator^(T1 x, T2 y) { return static_cast>(to_underlying(x) ^ to_underlying(y)); } 37 | 38 | template requires is_enable constexpr T1& operator&=(T1& x, T2 y) { return x = static_cast(to_underlying(x) & to_underlying(y)); } 39 | template requires is_enable constexpr T1& operator|=(T1& x, T2 y) { return x = static_cast(to_underlying(x) | to_underlying(y)); } 40 | template requires is_enable constexpr T1& operator^=(T1& x, T2 y) { return x = static_cast(to_underlying(x) ^ to_underlying(y)); } 41 | 42 | template requires is_enable constexpr bool has_flag_or(T1 x, T2 y) { return (to_underlying(x) & to_underlying(y)) != 0; } 43 | template requires is_enable constexpr bool has_flag_and(T1 x, T2 y) { return (to_underlying(x) & to_underlying(y)) == to_underlying(y); } 44 | template requires is_enable constexpr bool has_flag(T1 x, T2 y) { return has_flag_and(x, y); } 45 | template requires is_enable_tri constexpr bool masked_eq(T1 x, T2 y, T3 mask) { return (to_underlying(x) ^ to_underlying(y)) & to_underlying(mask); } 46 | } 47 | } 48 | 49 | using AviUtl::detail::flag::operator!; 50 | using AviUtl::detail::flag::operator+; 51 | using AviUtl::detail::flag::operator~; 52 | using AviUtl::detail::flag::operator&; 53 | using AviUtl::detail::flag::operator|; 54 | using AviUtl::detail::flag::operator^; 55 | using AviUtl::detail::flag::operator&=; 56 | using AviUtl::detail::flag::operator|=; 57 | using AviUtl::detail::flag::operator^=; 58 | using AviUtl::detail::flag::has_flag; 59 | using AviUtl::detail::flag::has_flag_and; 60 | using AviUtl::detail::flag::has_flag_or; 61 | using AviUtl::detail::flag::masked_eq; 62 | -------------------------------------------------------------------------------- /aviutl/input.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace AviUtl{ 6 | using GetInputPluginTable_t = InputPluginDLL*(__stdcall*)(); 7 | constexpr char GetInputPluginTableName[] = "GetInputPluginTable"; 8 | } 9 | -------------------------------------------------------------------------------- /aviutl/output.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | namespace AviUtl{ 7 | using GetOutputPluginTable_t = OutputPluginDLL*(__stdcall*)(); 8 | constexpr char GetOutputPluginTableName[] = "GetOutputPluginTable"; 9 | } 10 | -------------------------------------------------------------------------------- /aviutl/pixel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace AviUtl{ 5 | struct PixelBGR { 6 | uint8_t b,g,r; 7 | }; 8 | 9 | struct PixelYC { 10 | int16_t y,cb,cr; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /exedit.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | -------------------------------------------------------------------------------- /exedit/BackupFileHandler.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit 5 | { 6 | struct BackupFileHandler{ 7 | uint32_t version1,version2; 8 | int32_t frame_num; 9 | int32_t w,h; 10 | int32_t framerate_nu,framerate_de; 11 | int32_t audiorate; 12 | int32_t size; 13 | }; 14 | } // namespace ExEdit 15 | -------------------------------------------------------------------------------- /exedit/CameraZbuffer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace ExEdit { 7 | struct ZBufferElm { 8 | static constexpr uint32_t distance_base = 2000000000; 9 | static constexpr uint32_t rotate_max = 0x4000; 10 | 11 | uint32_t distance; 12 | uint32_t rotate; 13 | uint32_t overlapped; 14 | PixelYCA color; 15 | }; 16 | static_assert(sizeof(ZBufferElm) == 20U); 17 | } 18 | -------------------------------------------------------------------------------- /exedit/CommandId.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace ExEdit { 6 | namespace CommandId { 7 | inline static constexpr const DWORD FRAME_MOVE_BEGIN = 1102; // ICON_LL 8 | inline static constexpr const DWORD FRAME_MOVE_END = 1103; // ICON_RR 9 | 10 | inline static constexpr const DWORD FILTER_INIT = 1105; 11 | 12 | inline static constexpr const DWORD FILTER_SET_DEFVALUE = 1108; 13 | inline static constexpr const DWORD FILTER_MAKE_ALIAS = 1109; 14 | 15 | inline static constexpr const DWORD FILTER_MOVEUP = 1116; 16 | inline static constexpr const DWORD FILTER_MOVEDOWN = 1117; 17 | 18 | inline static constexpr const DWORD id1106 = 1106; 19 | inline static constexpr const DWORD id1107 = 1107; // ICON_PL 20 | 21 | inline static constexpr const DWORD id1115 = 1115; // ICON_CH 22 | 23 | inline static constexpr const DWORD id1120 = 1120; // ICON_CA0 24 | inline static constexpr const DWORD id1121 = 1121; // ICON_CL0 25 | 26 | inline static constexpr const DWORD FILTER_DELETE = 4300; 27 | 28 | inline static constexpr const DWORD FILTER_VALIDATE = 4400; 29 | 30 | inline static constexpr const DWORD FILTER_FOLD = 4500; 31 | 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /exedit/Exfunc.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ExEdit { 11 | struct Exfunc { 12 | void (*x00)(ObjectFilterIndex idx); 13 | BOOL (*getvalue)(ObjectFilterIndex idx, void* struct_ptr); 14 | ObjectFilterIndex (*x08)(ObjectFilterIndex idx); 15 | ObjectFilterIndex (*x0c)(ObjectFilterIndex idx); 16 | ObjectFilterIndex (*get_start_idx)(ObjectFilterIndex idx); 17 | ObjectFilterIndex (*x14)(ObjectFilterIndex idx); 18 | int32_t (*count_section_num)(ObjectFilterIndex idx); 19 | ObjectFilterIndex (*x1c)(int32_t frame, int32_t layer, int32_t scene, const char* filter_name, int32_t flag); 20 | ObjectFilterIndex (*x20)(ObjectFilterIndex idx, LPCSTR str, int32_t flag); 21 | void (*x24)(uint32_t, int32_t, int32_t, int32_t, int32_t, int16_t, int16_t, int16_t, int16_t, int32_t, int32_t); 22 | void (*x28)(int32_t, int32_t, int32_t, int32_t, int16_t, int16_t, int16_t, int16_t, uint32_t); 23 | void (*x2c)(uint32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int32_t, int16_t, int16_t, int16_t, int16_t, uint32_t, int32_t); 24 | void (*x30)(int32_t x, int32_t y, int32_t z, int32_t tx, int32_t ty, int32_t tz, int32_t rz, int32_t, int32_t ux1, int32_t ux2, int32_t uy1, int32_t uy2, int32_t uz1, int32_t uz2); 25 | int32_t (*draw)(void* dst, int32_t ox, int32_t oy, int32_t oz, int32_t rx, int32_t ry, int32_t rz, int32_t zoom, int32_t aspect, int32_t alpha, void* src, int32_t src_w, int32_t src_h, int32_t w, int32_t h, int32_t w_times2048, int32_t h_times2048, int32_t, uint32_t flag, FilterProcInfo::PolyData* polydata); 26 | int32_t (*load_image)(PixelYCA* buf, char* path, int32_t* w, int32_t* h, int32_t, uint32_t); 27 | char* (*get_loadable_image_extension)(); 28 | void (*x40)(void* dst, uint32_t, int32_t, wchar_t* text, AviUtl::PixelBGR col1, AviUtl::PixelBGR col2, int32_t, HFONT hfont, int32_t* w, int32_t* h, int32_t type, int32_t speed, int32_t align, int32_t*, int32_t flag); 29 | BOOL (*bufcpy)(void* dst, int32_t dst_w, int32_t dst_h, void* src, int32_t src_w, int32_t src_h, int32_t w, int32_t h, int32_t alpha, int32_t flag); 30 | uint32_t (*fill)(void* ycp, int32_t wo, int32_t ho, int32_t w, int32_t h, int16_t y, int16_t cb, int16_t cr, int16_t a, int32_t flag); 31 | HWND (*get_hwnd)(ObjectFilterIndex idx, int32_t type, int32_t idx2); 32 | BOOL (*x50)(ObjectFilterIndex idx, int32_t, int32_t, int32_t framex100, int32_t); 33 | BOOL (*rename_object)(ObjectFilterIndex idx, char* name); 34 | void (*x58)(void* dst, int32_t* array, int32_t n, void* obj, int32_t, int32_t flag); 35 | void (*yc2rgb)(void *dst, void *src, int32_t w, int32_t h, int32_t pixelsize, int32_t linesize); 36 | int32_t unused; 37 | BOOL (*calc_trackbar)(ObjectFilterIndex idx, int32_t frame, int32_t subframe, int32_t* result, char* name); //name は256未満の正数を入れても良い その場合は直接インデックス指定 38 | BOOL (*x68)(ObjectFilterIndex idx, int32_t); 39 | BOOL (*x6c)(Filter* efp, void* pixel, uint32_t flag); 40 | uint32_t (*get_object_length)(ObjectFilterIndex idx, int32_t, int32_t flag); 41 | void (*x74)(void* struct_ptr); 42 | int32_t (*get_frame_a)(); 43 | int32_t (*set_frame_a)(int32_t n); 44 | void (*set_undo)(ObjectFilterIndex idx, int32_t _unused_flag); 45 | BOOL (*x84)(ObjectFilterIndex idx); 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /exedit/Filter.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ExEdit { 11 | struct Exfunc; 12 | struct FilterProcInfo; 13 | struct Object; 14 | struct Filter { 15 | enum class Flag : uint32_t { 16 | Input = 1 << 3, 17 | Output = 1 << 4, 18 | Effect = 1 << 5, 19 | Unputable = 1 << 7, // タイムライン配置メニューには出てこない 20 | Unaddable = 1 << 8, // タイムライン配置メニューにのみ出現、エフェクト追加メニューには出てこない 21 | Unknown1 = 1 << 9, // これを外すとマスク、ディスプレイスメントマップでシーンが使えなくなる。拡張色設定で色が変化しなくなる。 22 | HasExdata = 1 << 10, 23 | BasicEffect = 1 << 15, 24 | Audio = 1 << 21, 25 | Control = 1 << 24, 26 | ExEditFilter = 1 << 26, 27 | 28 | Unknown3 = 1 << 30, 29 | } flag; 30 | int32_t x, y; 31 | const char* name; 32 | 33 | int32_t track_n; 34 | char** track_name; 35 | int32_t* track_default; // -1:ボタン化 -2:ドロップダウンリスト化 36 | int32_t *track_s, *track_e; 37 | 38 | int32_t check_n; 39 | char** check_name; 40 | int32_t* check_default; 41 | 42 | BOOL(*func_proc)(Filter* efp, FilterProcInfo* efpip); 43 | BOOL(*func_init)(Filter* efp); 44 | BOOL(*func_exit)(Filter* efp); 45 | BOOL(*func_update)(Filter* efp, int32_t status); 46 | BOOL(*func_WndProc)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, AviUtl::EditHandle* editp, Filter* efp); 47 | 48 | int32_t* track; 49 | int32_t* check; 50 | void* exdata_ptr; 51 | int32_t exdata_size; 52 | char* information; 53 | int(*func_window_init)(HINSTANCE hinstance, HWND hwnd, int32_t y, int32_t base_id, int32_t sw_param, Filter* efp); 54 | BOOL(*func_window_hide)(); // save_end 55 | AviUtl::ExFunc* aviutl_exfunc; 56 | Exfunc* exfunc; 57 | void* dll_hinst; 58 | void* exdata_def; 59 | 60 | using ExdataUse = ExdataUse; 61 | const ExdataUse* exdata_use; 62 | struct TrackExtra { 63 | int32_t* track_scale; 64 | int32_t* track_link; 65 | int32_t* track_drag_min; 66 | int32_t* track_drag_max; 67 | }*track_extra; 68 | struct TrackGuiIdx { 69 | static const int32_t invalid = -1; 70 | 71 | int32_t bx, by, bz; 72 | int32_t rx, ry, rz; 73 | int32_t cx, cy, cz; 74 | int32_t zoom; 75 | int32_t aspect; 76 | int32_t alpha; 77 | }*track_gui; 78 | int32_t unknown; 79 | char* unknown_str; 80 | int32_t unknown3[18]; 81 | int32_t* track_scale; 82 | int32_t* track_link; 83 | int32_t* track_drag_min; 84 | int32_t* track_drag_max; 85 | AviUtl::FilterPlugin* exedit_fp; 86 | Object* objectp; 87 | ObjectFilterIndex processing; 88 | ObjectFilterIndex objdlg; 89 | int32_t frame_start; 90 | int32_t frame_end; 91 | int32_t* track_value_left; 92 | int32_t* track_value_right; 93 | int32_t* track_mode; 94 | int32_t* check_value; 95 | void* exdata2; 96 | int32_t* track_param; 97 | int32_t unknown2[3]; 98 | int32_t frame_start_chain; 99 | int32_t frame_end_chain; 100 | int32_t layer_set; 101 | int32_t scene_set; 102 | }; 103 | constexpr auto a = sizeof(Filter); 104 | } 105 | template<> struct AviUtl::detail::flag::ops_def : std::true_type {}; 106 | -------------------------------------------------------------------------------- /exedit/FilterProcInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ExEdit { 11 | struct FilterProcInfo { 12 | enum Flag : uint32_t { 13 | bit3 = 1 << 3, 14 | bit6 = 1 << 6, // efMovieFileなど 15 | fast_preview = 1 << 9, 16 | early_filter = 1 << 10, // obj.effect()(引数なし) などを実行するときに設定される 17 | effect_noarg = 1 << 11, // obj_effect_noarg するときに設定される 18 | bit12 = 1 << 12, // video_func_main 19 | 20 | } flag; 21 | void* frame_edit; 22 | void* frame_temp; 23 | int32_t scene_w; 24 | int32_t scene_h; 25 | int32_t scene_line; // scene_maxw 26 | int32_t scene_maxh; 27 | int32_t frame; 28 | int32_t frame_n; 29 | int32_t project_w; 30 | int32_t project_h; 31 | int16_t* audio_p; 32 | int32_t audio_n; 33 | int32_t audio_ch; 34 | void* pixelp; 35 | void* editp; 36 | int32_t yc_size; 37 | int32_t line_size; 38 | int32_t unknown[24]; 39 | int32_t frame_num; // タイムライン上の現在フレーム 40 | PixelYCA* obj_edit; 41 | PixelYCA* obj_temp; 42 | int32_t obj_w; 43 | int32_t obj_h; 44 | struct Geometry { 45 | int32_t ox, oy, oz; 46 | int32_t rx, ry, rz; 47 | int32_t cx, cy, cz; 48 | int32_t zoom; 49 | int32_t aspect; 50 | int32_t alpha; 51 | } obj_data; 52 | int32_t obj_line; // obj_max_w 53 | int32_t obj_max_h; 54 | int32_t xf4; // 直前オブジェクトが有効かどうか? 55 | enum class ObjectFlag { 56 | bit16 = 1 << 16 57 | } object_flag; 58 | int32_t framerate_nu; 59 | int32_t framerate_de; 60 | int16_t* audio_data; 61 | int16_t* audio_temp; 62 | int32_t audio_rate; 63 | int32_t add_frame; // frame_numに対して計算上の加算 64 | int32_t subframe; // 計算上の加算subframe 65 | int32_t object_start_frame; 66 | int32_t v_func_idx; 67 | int32_t obj_index; 68 | int32_t obj_num; 69 | int32_t* layer_clipping_flag; // 1:上のオブジェクト, 2:クリッピングするオブジェクト 70 | int32_t* layer_subframe; // 時間制御を考慮したsubframe 71 | Object** layer_effect_objectp; 72 | Object** layer_group_objectp; 73 | Object* obj_layerp; 74 | Object* objectp; 75 | int32_t unknown5; 76 | struct PolyData { 77 | int32_t x, y, z, u, v; 78 | }polydata[4]; 79 | int32_t tick_count; 80 | ObjectFilterIndex scene_ofi; 81 | int32_t audio_milliframe; 82 | int32_t audio_speed; // 等速=1000000 83 | int32_t sub_size_x; // (root_w - fpip->w) / 2 84 | int32_t sub_size_y; // (root_h - fpip->h) / 2 85 | int32_t clipping_data_exists; 86 | }; 87 | } 88 | template<> struct AviUtl::detail::flag::ops_def : std::true_type {}; 89 | -------------------------------------------------------------------------------- /exedit/Object.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace ExEdit { 8 | struct Object { 9 | static constexpr size_t MAX_DISPNAME = 64; 10 | static constexpr size_t MAX_FILTER = 12; 11 | static constexpr size_t MAX_TRACK = 64; 12 | static constexpr size_t MAX_CHECK = 48; 13 | 14 | enum class Flag : uint32_t { 15 | Exist = 1 << 0, // 多分あれば全部1 16 | 17 | 18 | Clipping = 1 << 8, // 上のオブジェクトでクリッピング 19 | Camera = 1 << 9, // カメラ制御の対象 20 | 21 | Media = 0, // メディアオブジェクト 22 | Filter = 1 << 16, // フィルタオブジェクト Filter::Flag::Output|Filter::Flag::Input 23 | 24 | Image = 0, // 画像へのフィルタ 25 | Sound = 1 << 17, // 音声へのフィルタ Filter::Flag::Audio 26 | Effect = 1 << 18, // メディアオブジェクトのフィルタ効果 Filter::Flag::Effect 27 | 28 | Control = 1 << 19, // グループ制御、カメラ制御(カメラエフェクト含む)、時間制御 Filter::Flag::Control 29 | ShowRange = 1 << 20, // 対象レイヤー範囲がタイムライン上に表示される Filter::ExdataUse[0]::name=="range" 30 | 31 | // 100337b5 (?) 32 | bit31 = 1U << 31, 33 | } flag; 34 | 35 | int32_t layer_disp; 36 | int32_t frame_begin; 37 | int32_t frame_end; 38 | char dispname[MAX_DISPNAME]; 39 | int32_t index_midpt_leader; 40 | 41 | struct FilterParam { 42 | static const int32_t None = -1; 43 | int32_t id; 44 | int16_t track_begin; 45 | int16_t check_begin; 46 | DWORD exdata_offset; 47 | constexpr bool is_valid()const { return id>=0; } 48 | } filter_param[MAX_FILTER]; 49 | 50 | enum class FilterStatus : unsigned char { 51 | Active = 1 << 0, 52 | Folding = 1 << 1, 53 | Gui = 1 << 2, Unknown = 1 << 2, 54 | } filter_status[MAX_FILTER]; 55 | 56 | int16_t track_n; 57 | int16_t check_n; 58 | DWORD exdata_size; 59 | int32_t track_value_left[MAX_TRACK]; 60 | int32_t track_value_right[MAX_TRACK]; 61 | 62 | struct TrackMode { 63 | static const int16_t isScript = 0x0f; 64 | static const int16_t isDecelerate = 0x20; 65 | static const int16_t isAccelerate = 0x40; 66 | 67 | int16_t num; 68 | int16_t script_idx; 69 | } track_mode[MAX_TRACK]; 70 | 71 | int32_t check_value[MAX_CHECK]; 72 | DWORD exdata_offset; 73 | int32_t group_belong; 74 | int32_t track_param[MAX_TRACK]; 75 | int32_t layer_set; 76 | int32_t scene_set; 77 | 78 | int32_t countFilters() const { 79 | int32_t ret = 0; 80 | for (const auto& v : this->filter_param) { 81 | if(!v.is_valid()) break; 82 | ret++; 83 | } 84 | return ret; 85 | } 86 | }; 87 | 88 | } 89 | template<>struct AviUtl::detail::flag::ops_def:std::true_type{}; 90 | template<>struct AviUtl::detail::flag::ops_def:std::true_type{}; 91 | -------------------------------------------------------------------------------- /exedit/ObjectFilterIndex.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace ExEdit { 6 | enum class ObjectFilterIndex : uint32_t {}; 7 | 8 | inline uint16_t& object(ObjectFilterIndex& val) { return *reinterpret_cast(&val); } 9 | inline uint16_t& filter(ObjectFilterIndex& val) { return *(reinterpret_cast(&val) + 1); } 10 | inline bool is_valid(ObjectFilterIndex val) { return static_cast(val) != 0; } 11 | } 12 | -------------------------------------------------------------------------------- /exedit/SubFilterProcInfo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit { 5 | struct SubFilterProcInfo { 6 | int32_t flag; // 0x100 アルファ有無 7 | void* buf_edit; 8 | void* buf_temp; 9 | int32_t w, h; 10 | int32_t max_w, max_h; 11 | int32_t frame, frame_n; 12 | int32_t org_w, org_h; 13 | int32_t audiop; 14 | int32_t audio_n, audio_ch; 15 | int32_t pixelp; 16 | int32_t editp; 17 | int32_t yc_size; 18 | int32_t line_size; 19 | int32_t reserve[8]; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /exedit/cache.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit { 5 | struct CacheDataInfo { // size = 276 6 | uint32_t w; 7 | uint32_t h; 8 | uint32_t bitcount; 9 | void* ptr; 10 | char name[260]; 11 | }; 12 | struct CacheInfo { // size = 9120 13 | uint32_t priority; 14 | CacheDataInfo main; 15 | uint32_t offset; 16 | uint32_t sub_num; 17 | CacheDataInfo sub[32]; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /exedit/exdata.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit { 5 | struct ExdataUse { 6 | enum class Type : int16_t { 7 | Padding = 0, 8 | Number = 1, 9 | String = 2, 10 | Binary = 3 11 | }; 12 | 13 | Type type; 14 | int16_t size; 15 | const char* name; 16 | }; 17 | 18 | namespace Exdata { 19 | struct ExdataColor { 20 | unsigned char b, g, r; 21 | unsigned char padding; 22 | }; 23 | 24 | struct ExdataColorOpt { 25 | unsigned char b, g, r; 26 | unsigned char no_color; 27 | }; 28 | 29 | struct ExdataColorYC { 30 | int16_t y, cb, cr; 31 | int16_t padding; 32 | }; 33 | 34 | struct ExdataColorYCOpt { 35 | int16_t y, cb, cr; 36 | int16_t status; 37 | }; 38 | 39 | struct ExdataBase {}; 40 | 41 | struct efMovieFile : ExdataBase { 42 | char file[260]; 43 | int32_t i1; 44 | int32_t i2; 45 | int32_t frame_n; 46 | int32_t video_rate; 47 | int32_t video_scale; 48 | int32_t i3; 49 | }; 50 | 51 | struct efImageFile : ExdataBase { 52 | int32_t unknown; 53 | char file[256]; 54 | }; 55 | 56 | struct efAudioFile : ExdataBase { 57 | char file[260]; 58 | int32_t i1; 59 | int32_t i2; 60 | int32_t frame_n; 61 | int32_t i4; 62 | int32_t i5; 63 | }; 64 | 65 | struct efText : ExdataBase { 66 | unsigned char type; 67 | unsigned char autoadjust; 68 | unsigned char soft; 69 | unsigned char monospace; 70 | signed char align; 71 | signed char spacing_x; 72 | signed char spacing_y; 73 | unsigned char precision; 74 | ExdataColor color; 75 | ExdataColor color2; 76 | char font[32]; 77 | wchar_t text[1024]; 78 | }; 79 | 80 | struct efFigure : ExdataBase { 81 | int32_t type; 82 | ExdataColor color; 83 | unsigned char padding; 84 | char name[256]; 85 | }; 86 | 87 | struct efWaveForm : ExdataBase { 88 | char file[260]; 89 | int32_t i1; 90 | int32_t i2; 91 | int32_t frame_n; 92 | int32_t i4; 93 | int32_t i5; 94 | int16_t type; 95 | int16_t mode; 96 | int16_t res_W; 97 | int16_t res_h; 98 | ExdataColor color; 99 | int32_t sample_n; 100 | char mirror; 101 | char padding[3]; 102 | }; 103 | 104 | struct efScene : ExdataBase { 105 | int32_t scene; 106 | }; 107 | 108 | struct efSceneAudio : ExdataBase { 109 | int32_t scene; 110 | }; 111 | 112 | struct efNormalDraw : ExdataBase { 113 | int32_t blend; 114 | }; 115 | 116 | struct efExtendedDraw : ExdataBase { 117 | int32_t blend; 118 | }; 119 | 120 | struct efParticle : ExdataBase { 121 | int32_t blend; 122 | }; 123 | 124 | struct efSceneChange : ExdataBase { 125 | int16_t type; 126 | int16_t filter; 127 | char name[256]; 128 | char param[256]; 129 | }; 130 | 131 | struct efLightEmission : ExdataBase { 132 | ExdataColorOpt color; 133 | }; 134 | 135 | struct efFlash : ExdataBase { 136 | ExdataColorOpt color; 137 | int32_t mode; 138 | }; 139 | 140 | struct efGlow : ExdataBase { 141 | ExdataColorOpt color; 142 | int32_t type; 143 | }; 144 | 145 | struct efChromakey : ExdataBase { 146 | ExdataColorYC color; 147 | int32_t status; 148 | }; 149 | 150 | struct efColorKey : ExdataBase { 151 | ExdataColorYC color; 152 | int32_t status; 153 | }; 154 | 155 | struct efLuminanskey : ExdataBase { 156 | int32_t type; 157 | }; 158 | 159 | struct efLight : ExdataBase { 160 | ExdataColor color; 161 | }; 162 | 163 | struct efShadow : ExdataBase { 164 | ExdataColor color; 165 | char file[256]; 166 | }; 167 | 168 | struct efBorder : ExdataBase { 169 | ExdataColor color; 170 | char file[256]; 171 | }; 172 | 173 | struct efExtractEdge : ExdataBase { 174 | ExdataColor color; 175 | }; 176 | 177 | struct efWipe : ExdataBase { 178 | int32_t type; 179 | char name[256]; 180 | }; 181 | 182 | struct efMask : ExdataBase { 183 | int32_t type; 184 | char name[256]; 185 | int32_t mode; 186 | }; 187 | 188 | struct efMirror : ExdataBase { 189 | int32_t type; 190 | char name[256]; 191 | }; 192 | 193 | struct efRipple : ExdataBase { 194 | int32_t num; 195 | int32_t interval; 196 | int32_t add; 197 | }; 198 | 199 | struct efDisplacementMap : ExdataBase { 200 | int32_t type; 201 | char name[256]; 202 | int32_t mode; 203 | int32_t calc; 204 | }; 205 | 206 | struct efNoise : ExdataBase { 207 | int32_t type; 208 | int32_t mode; 209 | int32_t seed; 210 | }; 211 | 212 | struct efColorDrift : ExdataBase { 213 | int32_t type; 214 | }; 215 | 216 | struct efMonochromatic : ExdataBase { 217 | ExdataColor color; 218 | }; 219 | 220 | struct efGradation : ExdataBase { 221 | int32_t blend; 222 | ExdataColorOpt color; 223 | ExdataColorOpt color2; 224 | int32_t type; 225 | }; 226 | 227 | struct efSpecialColorConversion : ExdataBase { 228 | ExdataColorYCOpt color_yc; 229 | ExdataColorYCOpt color_yc2; 230 | }; 231 | 232 | struct efAnimationEffect : ExdataBase { 233 | int16_t type; 234 | int16_t filter; 235 | char name[256]; 236 | char param[256]; 237 | }; 238 | 239 | struct efScriptControl : ExdataBase { 240 | wchar_t text[1024]; 241 | }; 242 | 243 | struct efMovieSynthesis : ExdataBase { 244 | char file[260]; 245 | int32_t i1; 246 | int32_t i2; 247 | int32_t frame_n; 248 | int32_t video_rate; 249 | int32_t video_scale; 250 | int32_t i3; 251 | int32_t mode; 252 | }; 253 | 254 | struct efImageSynthesis : ExdataBase { 255 | int32_t mode; 256 | char file[256]; 257 | }; 258 | 259 | struct efDeinterlacing : ExdataBase { 260 | int32_t type; 261 | }; 262 | 263 | struct efPortionFilter : ExdataBase { 264 | int32_t type; 265 | char name[256]; 266 | }; 267 | 268 | struct efTimeControl : ExdataBase { 269 | int32_t range; 270 | int32_t unknown[4]; 271 | }; 272 | 273 | struct efGroupControl : ExdataBase { 274 | int32_t range; 275 | int32_t unknown[4]; 276 | }; 277 | 278 | struct efCameraControl : ExdataBase { 279 | int32_t range; 280 | int32_t unknown[4]; 281 | }; 282 | 283 | struct efCameraControlExDraw : ExdataBase { 284 | int32_t target; 285 | }; 286 | } 287 | 288 | namespace ExdataUseConst { 289 | inline const ExdataUse efMovieFile[] { 290 | { .type = ExdataUse::Type::String, .size = 260, .name = "file" }, 291 | { .type = ExdataUse::Type::Padding, .size = 24, .name = nullptr }, 292 | }; 293 | 294 | inline const ExdataUse efImageFile[] { 295 | { .type = ExdataUse::Type::Padding, .size = 4, .name = nullptr }, 296 | { .type = ExdataUse::Type::String, .size = 256, .name = "file" }, 297 | }; 298 | 299 | inline const ExdataUse efAudioFile[] { 300 | { .type = ExdataUse::Type::String, .size = 260, .name = "file" }, 301 | { .type = ExdataUse::Type::Padding, .size = 20, .name = nullptr }, 302 | }; 303 | 304 | inline const ExdataUse efText[] { 305 | { .type = ExdataUse::Type::Number, .size = 1, .name = "type" }, 306 | { .type = ExdataUse::Type::Number, .size = 1, .name = "autoadjust" }, 307 | { .type = ExdataUse::Type::Number, .size = 1, .name = "soft" }, 308 | { .type = ExdataUse::Type::Number, .size = 1, .name = "monospace" }, 309 | { .type = ExdataUse::Type::Number, .size = 1, .name = "align" }, 310 | { .type = ExdataUse::Type::Number, .size = 1, .name = "spacing_x" }, 311 | { .type = ExdataUse::Type::Number, .size = 1, .name = "spacing_y" }, 312 | { .type = ExdataUse::Type::Number, .size = 1, .name = "precision" }, 313 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 314 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 315 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color2" }, 316 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 317 | { .type = ExdataUse::Type::String, .size = 32, .name = "font" }, 318 | { .type = ExdataUse::Type::Binary, .size = 2048, .name = "text" }, 319 | }; 320 | 321 | inline const ExdataUse efFigure[] { 322 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 323 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 324 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 325 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 326 | }; 327 | 328 | inline const ExdataUse efWaveForm[] { 329 | { .type = ExdataUse::Type::String, .size = 260, .name = "file" }, 330 | { .type = ExdataUse::Type::Padding, .size = 20, .name = nullptr }, 331 | { .type = ExdataUse::Type::Number, .size = 2, .name = "type" }, 332 | { .type = ExdataUse::Type::Number, .size = 2, .name = "mode" }, 333 | { .type = ExdataUse::Type::Number, .size = 2, .name = "res_w" }, 334 | { .type = ExdataUse::Type::Number, .size = 2, .name = "res_h" }, 335 | { .type = ExdataUse::Type::Number, .size = 2, .name = "pad_w" }, 336 | { .type = ExdataUse::Type::Number, .size = 2, .name = "pad_h" }, 337 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 338 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 339 | { .type = ExdataUse::Type::Number, .size = 4, .name = "sample_n" }, 340 | { .type = ExdataUse::Type::Number, .size = 1, .name = "mirror" }, 341 | { .type = ExdataUse::Type::Padding, .size = 3, .name = nullptr }, 342 | }; 343 | 344 | inline const ExdataUse efScene[]{ 345 | { .type = ExdataUse::Type::Number, .size = 4, .name = "scene" }, 346 | }; 347 | 348 | inline const ExdataUse efSceneAudio[]{ 349 | { .type = ExdataUse::Type::Number, .size = 4, .name = "scene" }, 350 | }; 351 | 352 | inline const ExdataUse efNormalDraw[]{ 353 | { .type = ExdataUse::Type::Number, .size = 4, .name = "blend" }, 354 | }; 355 | 356 | inline const ExdataUse efExtendedDraw[]{ 357 | { .type = ExdataUse::Type::Number, .size = 4, .name = "blend" }, 358 | }; 359 | 360 | inline const ExdataUse efParticle[]{ 361 | { .type = ExdataUse::Type::Number, .size = 4, .name = "blend" }, 362 | }; 363 | 364 | inline const ExdataUse efSceneChange[]{ 365 | { .type = ExdataUse::Type::Number, .size = 2, .name = "type" }, 366 | { .type = ExdataUse::Type::Number, .size = 2, .name = "filter" }, 367 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 368 | { .type = ExdataUse::Type::String, .size = 256, .name = "param" }, 369 | }; 370 | 371 | inline const ExdataUse efLightEmission[]{ 372 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 373 | { .type = ExdataUse::Type::Number, .size = 1, .name = "no_color" }, 374 | }; 375 | 376 | inline const ExdataUse efFlash[]{ 377 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 378 | { .type = ExdataUse::Type::Number, .size = 1, .name = "no_color" }, 379 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" }, 380 | }; 381 | 382 | inline const ExdataUse efGlow[]{ 383 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 384 | { .type = ExdataUse::Type::Number, .size = 1, .name = "no_color" }, 385 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 386 | }; 387 | 388 | inline const ExdataUse efChromakey[]{ 389 | { .type = ExdataUse::Type::Binary, .size = 6, .name = "color_yc" }, 390 | { .type = ExdataUse::Type::Padding, .size = 2, .name = nullptr }, 391 | { .type = ExdataUse::Type::Number, .size = 4, .name = "status" }, 392 | }; 393 | 394 | inline const ExdataUse efColorKey[]{ 395 | { .type = ExdataUse::Type::Binary, .size = 6, .name = "color_yc" }, 396 | { .type = ExdataUse::Type::Padding, .size = 2, .name = nullptr }, 397 | { .type = ExdataUse::Type::Number, .size = 4, .name = "status" }, 398 | }; 399 | 400 | inline const ExdataUse efLuminanskey[] { 401 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" } 402 | }; 403 | 404 | inline const ExdataUse efLight[] { 405 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 406 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr } 407 | }; 408 | 409 | inline const ExdataUse efShadow[] { 410 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 411 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 412 | { .type = ExdataUse::Type::String, .size = 256, .name = "file" }, 413 | }; 414 | 415 | inline const ExdataUse efBorder[] { 416 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 417 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr }, 418 | { .type = ExdataUse::Type::String, .size = 256, .name = "file" }, 419 | }; 420 | 421 | inline const ExdataUse efExtractEdge[] { 422 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 423 | { .type = ExdataUse::Type::Padding, .size = 1, .name = nullptr } 424 | }; 425 | 426 | 427 | inline const ExdataUse efWipe[] { 428 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 429 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" } 430 | }; 431 | 432 | inline const ExdataUse efMask[] { 433 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 434 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 435 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" } 436 | }; 437 | 438 | inline const ExdataUse efMirror[] { 439 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" } 440 | }; 441 | 442 | inline const ExdataUse efRipple[] { 443 | { .type = ExdataUse::Type::Number, .size = 4, .name = "num" }, 444 | { .type = ExdataUse::Type::Number, .size = 4, .name = "interval" }, 445 | { .type = ExdataUse::Type::Number, .size = 4, .name = "add" } 446 | }; 447 | 448 | inline const ExdataUse efDisplacementMap[] { 449 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 450 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 451 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" }, 452 | { .type = ExdataUse::Type::Number, .size = 4, .name = "calc" } 453 | }; 454 | 455 | inline const ExdataUse efNoise[] { 456 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 457 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" }, 458 | { .type = ExdataUse::Type::Number, .size = 4, .name = "seed" }, 459 | { .type = ExdataUse::Type::Padding, .size = 4, .name = nullptr } 460 | }; 461 | 462 | inline const ExdataUse efColorDrift[] { 463 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 464 | }; 465 | 466 | inline const ExdataUse efGradation[] { 467 | { .type = ExdataUse::Type::Number, .size = 4, .name = "blend" }, 468 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color" }, 469 | { .type = ExdataUse::Type::Number, .size = 1, .name = "no_color" }, 470 | { .type = ExdataUse::Type::Binary, .size = 3, .name = "color2" }, 471 | { .type = ExdataUse::Type::Number, .size = 1, .name = "no_color2" }, 472 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 473 | }; 474 | 475 | inline const ExdataUse efSpecialColorConversion[] { 476 | { .type = ExdataUse::Type::Binary, .size = 6, .name = "color" }, 477 | { .type = ExdataUse::Type::Number, .size = 2, .name = "status" }, 478 | { .type = ExdataUse::Type::Binary, .size = 6, .name = "color2" }, 479 | { .type = ExdataUse::Type::Number, .size = 2, .name = "status2" }, 480 | }; 481 | 482 | inline const ExdataUse efAnimationEffect[] { 483 | { .type = ExdataUse::Type::Number, .size = 2, .name = "type" }, 484 | { .type = ExdataUse::Type::Number, .size = 2, .name = "filter" }, 485 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 486 | { .type = ExdataUse::Type::String, .size = 256, .name = "param" }, 487 | }; 488 | 489 | inline const auto& efCustomObject = efAnimationEffect; 490 | 491 | inline const ExdataUse efScriptControl[] { 492 | { .type = ExdataUse::Type::Binary, .size = 2048, .name = "text" } 493 | }; 494 | 495 | inline const ExdataUse efMovieSynthesis[] { 496 | { .type = ExdataUse::Type::String, .size = 260, .name = "file" }, 497 | { .type = ExdataUse::Type::Padding, .size = 24, .name = nullptr }, 498 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" } 499 | }; 500 | 501 | inline const ExdataUse efImageSynthesis[] { 502 | { .type = ExdataUse::Type::Number, .size = 4, .name = "mode" }, 503 | { .type = ExdataUse::Type::String, .size = 256, .name = "file" }, 504 | }; 505 | 506 | inline const ExdataUse efDeinterlacing[] { 507 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" } 508 | }; 509 | 510 | inline const ExdataUse efPortionFilter[] { 511 | { .type = ExdataUse::Type::Number, .size = 4, .name = "type" }, 512 | { .type = ExdataUse::Type::String, .size = 256, .name = "name" }, 513 | }; 514 | 515 | inline const ExdataUse efTimeControl[] { 516 | { .type = ExdataUse::Type::Number, .size = 4, .name = "range" }, 517 | { .type = ExdataUse::Type::Padding, .size = 16, .name = nullptr }, 518 | }; 519 | 520 | inline const ExdataUse efGroupControl[] { 521 | { .type = ExdataUse::Type::Number, .size = 4, .name = "range" }, 522 | { .type = ExdataUse::Type::Padding, .size = 16, .name = nullptr }, 523 | }; 524 | 525 | inline const ExdataUse efCameraControl[] { 526 | { .type = ExdataUse::Type::Number, .size = 4, .name = "range" }, 527 | { .type = ExdataUse::Type::Padding, .size = 16, .name = nullptr }, 528 | }; 529 | 530 | inline const ExdataUse efCameraControlExDraw[] { 531 | { .type = ExdataUse::Type::Number, .size = 4, .name = "target" }, 532 | }; 533 | } 534 | 535 | } // namespace ExEdit 536 | -------------------------------------------------------------------------------- /exedit/exo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit { 5 | struct ExoHeader { 6 | uint32_t flag; 7 | char* name; 8 | int32_t width; 9 | int32_t height; 10 | int32_t rate; 11 | int32_t scale; 12 | int32_t audio_rate; 13 | int32_t audio_ch; 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /exedit/layer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace ExEdit { 7 | namespace detail { 8 | enum class LayerFlag : uint32_t { 9 | UnDisp = 1 << 0, 10 | Locked = 1 << 1, 11 | CoordLink = 1 << 4, 12 | Clip = 1 << 5 13 | }; 14 | } 15 | 16 | struct LayerSetting { 17 | using Flag = detail::LayerFlag; 18 | Flag flag; 19 | const char* name; 20 | }; 21 | 22 | }; 23 | 24 | template<>struct AviUtl::detail::flag::ops_def:std::true_type{}; 25 | -------------------------------------------------------------------------------- /exedit/output_rgba.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | namespace ExEdit { 9 | struct OutputData { 10 | int32_t frame_begin; 11 | int32_t frame_end; 12 | int32_t width; 13 | int32_t height; 14 | int32_t rate; 15 | int32_t scale; 16 | }; 17 | 18 | struct OutputFactory { 19 | BOOL (*output_start)(OutputData* data); 20 | void (*output_end)(); 21 | PixelBGRA* (*get_image)(int32_t frame); 22 | }; 23 | 24 | class OutputHelper { 25 | OutputFactory factory; 26 | 27 | public: 28 | OutputData data; 29 | 30 | OutputHelper() { 31 | const auto exedit_map_ver = 0x3031; // '01' 32 | char name[256]; 33 | wsprintfA(name, "exedit_%d_%d", exedit_map_ver, GetCurrentProcessId()); 34 | auto hfmo = OpenFileMappingA(FILE_MAP_WRITE, FALSE, name); 35 | if (!hfmo) throw std::runtime_error("拡張編集プラグインのバージョンが違うか認識されていません"); 36 | 37 | auto mapping = MapViewOfFile(hfmo, FILE_MAP_WRITE, 0, 0, sizeof(factory)); 38 | if(!mapping) { 39 | CloseHandle(hfmo); 40 | throw std::runtime_error("拡張編集プラグインのバージョンが違うか認識されていません"); 41 | } 42 | memcpy(&factory, mapping, sizeof(factory)); 43 | UnmapViewOfFile(mapping); 44 | CloseHandle(hfmo); 45 | 46 | auto start_ret = factory.output_start(&data); 47 | if (start_ret == FALSE) throw std::runtime_error("拡張編集プラグインの情報が取得できません"); 48 | } 49 | 50 | ~OutputHelper() { 51 | factory.output_end(); 52 | } 53 | 54 | auto get_image(int32_t frame) { 55 | auto ret = factory.get_image(frame); 56 | if(!ret) throw std::runtime_error("拡張編集プラグインから画像の取得に失敗しました"); 57 | return ret; 58 | } 59 | 60 | auto operator->() { return &data; } 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /exedit/pixel.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace ExEdit{ 6 | using PixelBGR = AviUtl::PixelBGR; 7 | using PixelYC = AviUtl::PixelYC; 8 | 9 | struct PixelBGRA; 10 | struct PixelYCA; 11 | 12 | struct PixelBGRA { 13 | uint8_t b,g,r,a; 14 | PixelBGRA& operator=(const PixelBGR& bgr) { this->b=bgr.b;this->g=bgr.g;this->r=bgr.r;this->a=255;return *this; } 15 | constexpr operator PixelYCA() const; 16 | }; 17 | struct PixelYCA { 18 | int16_t y,cb,cr,a; 19 | PixelYCA& operator=(const PixelYC& yc) { this->y=yc.y;this->cb=yc.cb;this->cr=yc.cr;this->a=4096;return *this; } 20 | constexpr operator PixelBGRA() const { 21 | return { 22 | static_cast((3+((y*16320)>>16)+((cb*28919)>>16) )>>2), 23 | static_cast((3+((y*16320)>>16)+((cb*-5616)>>16)+((cr*-11655)>>16))>>2), 24 | static_cast((3+((y*16320)>>16)+ ((cr* 22881)>>16))>>2), 25 | static_cast((3+((a*16320)>>16) )>>2) 26 | }; 27 | } 28 | }; 29 | 30 | inline constexpr PixelBGRA::operator PixelYCA() const { 31 | auto r_ = (r << 6) + 18; 32 | auto g_ = (g << 6) + 18; 33 | auto b_ = (b << 6) + 18; 34 | auto a_ = (a << 6) + 1; 35 | return { 36 | static_cast(((r_* 4918)>>16)+((g_* 9655)>>16)+((b_* 1875)>>16)-3), 37 | static_cast(((r_*-2775)>>16)+((g_*-5449)>>16)+((b_* 8224)>>16)+1), 38 | static_cast(((r_* 8224)>>16)+((g_*-6887)>>16)+((b_*-1337)>>16)+1), 39 | static_cast( (a_*16448)>>16 ) 40 | }; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /exedit/save.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace ExEdit { 9 | struct SaveHeader { 10 | std::uint32_t magic; 11 | int32_t filter_n; 12 | int32_t object_n; 13 | int32_t x0c; 14 | int32_t timeline_zoom; 15 | int32_t timeline_frame; 16 | int32_t selecting_object_idx; 17 | size_t object_size; 18 | size_t track_max; 19 | size_t check_max; 20 | size_t filter_max; 21 | uint32_t exedit_version; 22 | int32_t grid; 23 | int32_t grid_tempo; 24 | int32_t grid_base; 25 | int32_t grid2d; 26 | int32_t grid2d_w; 27 | int32_t grid2d_h; 28 | int32_t grid3d; 29 | int32_t grid3d_size; 30 | int32_t grid3d_num; 31 | int32_t out_of_area; 32 | int32_t out_of_scale; 33 | int32_t grid_time; 34 | int32_t i10196764; 35 | int32_t selecting_scene; 36 | int32_t scene_n; 37 | int32_t layer_n; 38 | int32_t x70; 39 | int32_t x74; 40 | int32_t timeline_layer; 41 | int32_t trascript_n; 42 | int32_t reserved[32]; 43 | }; 44 | 45 | // func_project_save/load用データ 46 | struct FilterSave { 47 | using Flag = ExEdit::Filter::Flag; 48 | Flag flag; 49 | int32_t track_n; 50 | int32_t check_n; 51 | int32_t exdata_size; 52 | char filter_name[64]; 53 | char unknown_s[32]; 54 | }; 55 | 56 | struct SceneSettingSave { 57 | using Flag = detail::SceneFlag; 58 | int32_t index; 59 | Flag flag; 60 | char name[64]; 61 | int32_t width, height; 62 | int32_t max_frame; 63 | int32_t current_frame; 64 | int32_t timeline_scale; 65 | int32_t timeline_disp_begin_pos; 66 | int32_t selected_object; 67 | int32_t selected_frame_begin; 68 | int32_t selected_frame_end; 69 | BOOL disp_bpm_grid; 70 | int32_t bpm_grid_tempo; 71 | int32_t bpm_grid_base; 72 | BOOL disp_xy_grid; 73 | int32_t xy_grid_width; 74 | int32_t xy_grid_height; 75 | BOOL disp_camera_grid; 76 | int32_t camera_grid_size; 77 | int32_t camera_grid_num; 78 | BOOL disp_out_of_frame; 79 | int32_t out_of_frame_scale; 80 | int32_t bpm_grid_beat; 81 | int32_t disp_begin_layer; 82 | int32_t reserved[15]; 83 | }; 84 | 85 | struct LayerSettingSave { 86 | using Flag = detail::LayerFlag; 87 | int32_t scene; 88 | int32_t layer; 89 | Flag flag; 90 | char name[64]; 91 | }; 92 | } 93 | -------------------------------------------------------------------------------- /exedit/scene.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | namespace ExEdit { 8 | namespace detail { 9 | enum class SceneFlag : uint32_t { 10 | Disped = 1 << 0, 11 | Alpha = 1 << 1, 12 | }; 13 | } 14 | 15 | struct SceneSetting { 16 | using Flag = detail::SceneFlag; 17 | Flag flag; 18 | const char* name; 19 | int32_t width, height; 20 | int32_t max_frame; 21 | int32_t current_frame; 22 | int32_t timeline_scale; 23 | int32_t timeline_disp_begin_pos; 24 | int32_t selected_object; 25 | int32_t selected_frame_begin; 26 | int32_t selected_frame_end; 27 | BOOL disp_bpm_grid; 28 | int32_t bpm_grid_tempo; 29 | int32_t bpm_grid_base; 30 | BOOL disp_xy_grid; 31 | int32_t xy_grid_width; 32 | int32_t xy_grid_height; 33 | BOOL disp_camera_grid; 34 | int32_t camera_grid_size; 35 | int32_t camera_grid_num; 36 | BOOL disp_out_of_frame; 37 | int32_t out_of_frame_scale; 38 | int32_t bpm_grid_beat; 39 | int32_t disp_begin_layer; 40 | }; 41 | } 42 | 43 | template<>struct AviUtl::detail::flag::ops_def:std::true_type{}; 44 | -------------------------------------------------------------------------------- /exedit/structs.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace ExEdit { 7 | struct struct_exfunc0x04 { 8 | int32_t* frame_begin; 9 | int32_t* frame_end; 10 | int32_t* frame_value_left; 11 | int32_t* frame_value_right; 12 | Object::TrackMode* track_mode; 13 | int32_t* check_value; 14 | int32_t something_exdata; 15 | int32_t* track_param; 16 | }; 17 | 18 | struct struct_exfunc0x74 { 19 | int32_t field_0x0; 20 | int32_t exedit_max_w; 21 | int32_t exedit_max_h; 22 | int32_t exedit_max_w_add_8; 23 | int32_t exedit_max_h_add_8; 24 | int32_t exedit_max_w_add_8_times_8; 25 | int32_t frame_n; 26 | int32_t framerate_nu; 27 | int32_t framerate_de; 28 | int32_t field_0x24; 29 | int32_t field_0x28; 30 | }; 31 | 32 | struct TrackbarData { 33 | DWORD track_val; 34 | DWORD field_0x4; 35 | DWORD field_0x8; 36 | int32_t field_0xc; 37 | DWORD field_0x10; 38 | HWND field_0x14; 39 | HWND field_0x18; 40 | HWND field_0x1c; 41 | DWORD field_0x20; 42 | DWORD field_0x24; 43 | }; 44 | 45 | struct CheckboxData { 46 | DWORD check_val; 47 | DWORD field_0x4; 48 | HWND hwnd_bt1; 49 | HWND hwnd_st; 50 | HWND hwnd_bt2; 51 | HWND hwnd_cb; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /exedit/susie.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | namespace ExEdit { 5 | using SpiGetPicture = int(PASCAL*)(LPSTR buf, long len, unsigned int flag, HANDLE *pHBInfo, HANDLE *pHBm, FARPROC lpPrgressCallback, long lData); 6 | using SpiGetPluginInfo = int(PASCAL*)(int infono, LPSTR buf, int buflen); 7 | 8 | struct SpiImageData { 9 | HLOCAL l_info; 10 | HLOCAL l_image; 11 | BITMAPINFO* p_info; 12 | void* p_image; 13 | }; 14 | 15 | struct structSPI { 16 | HMODULE hmodule; 17 | char information[256]; 18 | char extension[256]; 19 | SpiGetPicture GetPicture; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /exedit/undo.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace ExEdit { 6 | 7 | struct UndoData { 8 | int32_t data_id; 9 | int32_t object_id; 10 | int32_t data_size; 11 | int32_t object_flag_opt; 12 | int32_t object_layer_disp_opt; 13 | int32_t object_frame_begin_opt; 14 | int32_t object_frame_end_opt; 15 | std::byte data[1]; 16 | }; 17 | } 18 | --------------------------------------------------------------------------------