FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
avisynth_c.h
Go to the documentation of this file.
1 // Avisynth C Interface Version 0.20
2 // Copyright 2003 Kevin Atkinson
3 
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 // MA 02110-1301 USA, or visit
18 // http://www.gnu.org/copyleft/gpl.html .
19 //
20 // As a special exception, I give you permission to link to the
21 // Avisynth C interface with independent modules that communicate with
22 // the Avisynth C interface solely through the interfaces defined in
23 // avisynth_c.h, regardless of the license terms of these independent
24 // modules, and to copy and distribute the resulting combined work
25 // under terms of your choice, provided that every copy of the
26 // combined work is accompanied by a complete copy of the source code
27 // of the Avisynth C interface and Avisynth itself (with the version
28 // used to produce the combined work), being distributed under the
29 // terms of the GNU General Public License plus this exception. An
30 // independent module is a module which is not derived from or based
31 // on Avisynth C Interface, such as 3rd-party filters, import and
32 // export plugins, or graphical user interfaces.
33 
34 // NOTE: this is a partial update of the Avisynth C interface to recognize
35 // new color spaces added in Avisynth 2.60. By no means is this document
36 // completely Avisynth 2.60 compliant.
37 
38 #ifndef __AVISYNTH_C__
39 #define __AVISYNTH_C__
40 
41 #include "avs/config.h"
42 #include "avs/capi.h"
43 #include "avs/types.h"
44 
45 
46 /////////////////////////////////////////////////////////////////////
47 //
48 // Constants
49 //
50 
51 #ifndef __AVISYNTH_6_H__
53 #endif
54 
55 enum {AVS_SAMPLE_INT8 = 1<<0,
60 
61 enum {AVS_PLANAR_Y=1<<0,
76 
77  // Colorspace properties.
78 enum {AVS_CS_BGR = 1<<28,
79  AVS_CS_YUV = 1<<29,
81  AVS_CS_PLANAR = 1<<31,
82 
86 
89  AVS_CS_SUB_WIDTH_2 = 0 << AVS_CS_SHIFT_SUB_WIDTH, // YV12, I420, YV16
91 
92  AVS_CS_VPLANEFIRST = 1 << 3, // YV12, YV16, YV24, YV411, YUV9
93  AVS_CS_UPLANEFIRST = 1 << 4, // I420
94 
96  AVS_CS_SUB_HEIGHT_1 = 3 << AVS_CS_SHIFT_SUB_HEIGHT, // YV16, YV24, YV411
99 
104 
107 
108  // Specific colorformats
109 enum {
114  // AVS_CS_YV12 = 1<<3 Reserved
115  // AVS_CS_I420 = 1<<4 Reserved
117 
126 };
127 
128 enum {
129  AVS_IT_BFF = 1<<0,
130  AVS_IT_TFF = 1<<1,
132 
133 enum {
144 
145 enum { //SUBTYPES
150 
151 enum {
152  // New 2.6 explicitly defined cache hints.
153  AVS_CACHE_NOTHING=10, // Do not cache video.
154  AVS_CACHE_WINDOW=11, // Hard protect upto X frames within a range of X from the current frame N.
155  AVS_CACHE_GENERIC=12, // LRU cache upto X frames.
156  AVS_CACHE_FORCE_GENERIC=13, // LRU cache upto X frames, override any previous CACHE_WINDOW.
157 
158  AVS_CACHE_GET_POLICY=30, // Get the current policy.
159  AVS_CACHE_GET_WINDOW=31, // Get the current window h_span.
160  AVS_CACHE_GET_RANGE=32, // Get the current generic frame range.
161 
162  AVS_CACHE_AUDIO=50, // Explicitly do cache audio, X byte cache.
163  AVS_CACHE_AUDIO_NOTHING=51, // Explicitly do not cache audio.
164  AVS_CACHE_AUDIO_NONE=52, // Audio cache off (auto mode), X byte intial cache.
165  AVS_CACHE_AUDIO_AUTO=53, // Audio cache on (auto mode), X byte intial cache.
166 
167  AVS_CACHE_GET_AUDIO_POLICY=70, // Get the current audio policy.
168  AVS_CACHE_GET_AUDIO_SIZE=71, // Get the current audio cache size.
169 
170  AVS_CACHE_PREFETCH_FRAME=100, // Queue request to prefetch frame N.
171  AVS_CACHE_PREFETCH_GO=101, // Action video prefetches.
172 
173  AVS_CACHE_PREFETCH_AUDIO_BEGIN=120, // Begin queue request transaction to prefetch audio (take critical section).
174  AVS_CACHE_PREFETCH_AUDIO_STARTLO=121, // Set low 32 bits of start.
175  AVS_CACHE_PREFETCH_AUDIO_STARTHI=122, // Set high 32 bits of start.
176  AVS_CACHE_PREFETCH_AUDIO_COUNT=123, // Set low 32 bits of length.
177  AVS_CACHE_PREFETCH_AUDIO_COMMIT=124, // Enqueue request transaction to prefetch audio (release critical section).
178  AVS_CACHE_PREFETCH_AUDIO_GO=125, // Action audio prefetches.
179 
180  AVS_CACHE_GETCHILD_CACHE_MODE=200, // Cache ask Child for desired video cache mode.
181  AVS_CACHE_GETCHILD_CACHE_SIZE=201, // Cache ask Child for desired video cache size.
182  AVS_CACHE_GETCHILD_AUDIO_MODE=202, // Cache ask Child for desired audio cache mode.
183  AVS_CACHE_GETCHILD_AUDIO_SIZE=203, // Cache ask Child for desired audio cache size.
184 
185  AVS_CACHE_GETCHILD_COST=220, // Cache ask Child for estimated processing cost.
186  AVS_CACHE_COST_ZERO=221, // Child response of zero cost (ptr arithmetic only).
187  AVS_CACHE_COST_UNIT=222, // Child response of unit cost (less than or equal 1 full frame blit).
188  AVS_CACHE_COST_LOW=223, // Child response of light cost. (Fast)
189  AVS_CACHE_COST_MED=224, // Child response of medium cost. (Real time)
190  AVS_CACHE_COST_HI=225, // Child response of heavy cost. (Slow)
191 
192  AVS_CACHE_GETCHILD_THREAD_MODE=240, // Cache ask Child for thread safetyness.
193  AVS_CACHE_THREAD_UNSAFE=241, // Only 1 thread allowed for all instances. 2.5 filters default!
194  AVS_CACHE_THREAD_CLASS=242, // Only 1 thread allowed for each instance. 2.6 filters default!
195  AVS_CACHE_THREAD_SAFE=243, // Allow all threads in any instance.
196  AVS_CACHE_THREAD_OWN=244, // Safe but limit to 1 thread, internally threaded.
197 
198  AVS_CACHE_GETCHILD_ACCESS_COST=260, // Cache ask Child for preferred access pattern.
199  AVS_CACHE_ACCESS_RAND=261, // Filter is access order agnostic.
200  AVS_CACHE_ACCESS_SEQ0=262, // Filter prefers sequential access (low cost)
201  AVS_CACHE_ACCESS_SEQ1=263, // Filter needs sequential access (high cost)
202  };
203 
204 #ifdef BUILDING_AVSCORE
205 struct AVS_ScriptEnvironment {
206  IScriptEnvironment * env;
207  const char * error;
208  AVS_ScriptEnvironment(IScriptEnvironment * e = 0)
209  : env(e), error(0) {}
210 };
211 #endif
212 
213 typedef struct AVS_Clip AVS_Clip;
215 
216 /////////////////////////////////////////////////////////////////////
217 //
218 // AVS_VideoInfo
219 //
220 
221 // AVS_VideoInfo is layed out identicly to VideoInfo
222 typedef struct AVS_VideoInfo {
223  int width, height; // width=0 means no video
226 
228 
229  int audio_samples_per_second; // 0 means no audio
233 
234  // Imagetype properties
235 
237 } AVS_VideoInfo;
238 
239 // useful functions of the above
241  { return (p->width!=0); }
242 
244  { return (p->audio_samples_per_second!=0); }
245 
247  { return !!(p->pixel_type&AVS_CS_BGR); }
248 
250  { return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
251 
253  { return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
254 
256  { return !!(p->pixel_type&AVS_CS_YUV ); }
257 
259  { return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }
260 
261 AVSC_API(int, avs_is_yv24)(const AVS_VideoInfo * p);
262 
263 AVSC_API(int, avs_is_yv16)(const AVS_VideoInfo * p);
264 
265 AVSC_API(int, avs_is_yv12)(const AVS_VideoInfo * p) ;
266 
267 AVSC_API(int, avs_is_yv411)(const AVS_VideoInfo * p);
268 
269 AVSC_API(int, avs_is_y8)(const AVS_VideoInfo * p);
270 
271 AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property)
272  { return ((p->image_type & property)==property ); }
273 
275  { return !!(p->pixel_type & AVS_CS_PLANAR); }
276 
278 
280  { return !!(p->image_type & AVS_IT_FIELDBASED); }
281 
283  { return ((p->image_type & AVS_IT_FIELDBASED)&&(p->image_type & (AVS_IT_BFF | AVS_IT_TFF))); }
284 
286  { return !!(p->image_type & AVS_IT_BFF); }
287 
289  { return !!(p->image_type & AVS_IT_TFF); }
290 
291 AVSC_API(int, avs_get_plane_width_subsampling)(const AVS_VideoInfo * p, int plane);
292 
293 AVSC_API(int, avs_get_plane_height_subsampling)(const AVS_VideoInfo * p, int plane);
294 
295 
296 AVSC_API(int, avs_bits_per_pixel)(const AVS_VideoInfo * p);
297 
299 
300 AVSC_API(int, avs_row_size)(const AVS_VideoInfo * p, int plane);
301 
302 AVSC_API(int, avs_bmp_size)(const AVS_VideoInfo * vi);
303 
305  { return p->audio_samples_per_second; }
306 
307 
309 {
310  switch (p->sample_type) {
311  case AVS_SAMPLE_INT8: return sizeof(signed char);
312  case AVS_SAMPLE_INT16: return sizeof(signed short);
313  case AVS_SAMPLE_INT24: return 3;
314  case AVS_SAMPLE_INT32: return sizeof(signed int);
315  case AVS_SAMPLE_FLOAT: return sizeof(float);
316  default: return 0;
317  }
318 }
320  { return p->nchannels*avs_bytes_per_channel_sample(p);}
321 
323  { return ((INT64)(frames) * p->audio_samples_per_second * p->fps_denominator / p->fps_numerator); }
324 
326  { return (int)(samples * (INT64)p->fps_numerator / (INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
327 
329  { return bytes / avs_bytes_per_audio_sample(p); }
330 
332  { return samples * avs_bytes_per_audio_sample(p); }
333 
335  { return p->nchannels; }
336 
338  { return p->sample_type;}
339 
340 // useful mutator
342  { p->image_type|=property; }
343 
345  { p->image_type&=~property; }
346 
347 AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased)
348  { if (isfieldbased) p->image_type|=AVS_IT_FIELDBASED; else p->image_type&=~AVS_IT_FIELDBASED; }
349 
350 AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsigned denominator)
351 {
352  unsigned x=numerator, y=denominator;
353  while (y) { // find gcd
354  unsigned t = x%y; x = y; y = t;
355  }
356  p->fps_numerator = numerator/x;
357  p->fps_denominator = denominator/x;
358 }
359 
360 #ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
362 {
363  return (x->pixel_type == y->pixel_type)
364  || (avs_is_yv12(x) && avs_is_yv12(y));
365 }
366 #endif
367 
368 /////////////////////////////////////////////////////////////////////
369 //
370 // AVS_VideoFrame
371 //
372 
373 // VideoFrameBuffer holds information about a memory block which is used
374 // for video data. For efficiency, instances of this class are not deleted
375 // when the refcount reaches zero; instead they're stored in a linked list
376 // to be reused. The instances are deleted when the corresponding AVS
377 // file is closed.
378 
379 // AVS_VideoFrameBuffer is layed out identicly to VideoFrameBuffer
380 // DO NOT USE THIS STRUCTURE DIRECTLY
381 typedef struct AVS_VideoFrameBuffer {
384  // sequence_number is incremented every time the buffer is changed, so
385  // that stale views can tell they're no longer valid.
386  volatile long sequence_number;
387 
388  volatile long refcount;
390 
391 // VideoFrame holds a "window" into a VideoFrameBuffer.
392 
393 // AVS_VideoFrame is layed out identicly to IVideoFrame
394 // DO NOT USE THIS STRUCTURE DIRECTLY
395 typedef struct AVS_VideoFrame {
396  volatile long refcount;
398  int offset, pitch, row_size, height, offsetU, offsetV, pitchUV; // U&V offsets are from top of picture.
401 
402 // Access functions for AVS_VideoFrame
403 AVSC_API(int, avs_get_pitch_p)(const AVS_VideoFrame * p, int plane);
404 
405 #ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
407  return avs_get_pitch_p(p, 0);}
408 #endif
409 
410 AVSC_API(int, avs_get_row_size_p)(const AVS_VideoFrame * p, int plane);
411 
413  return p->row_size; }
414 
415 AVSC_API(int, avs_get_height_p)(const AVS_VideoFrame * p, int plane);
416 
418  return p->height;}
419 
420 AVSC_API(const BYTE *, avs_get_read_ptr_p)(const AVS_VideoFrame * p, int plane);
421 
422 #ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
424  return avs_get_read_ptr_p(p, 0);}
425 #endif
426 
427 AVSC_API(int, avs_is_writable)(const AVS_VideoFrame * p);
428 
430 
431 #ifdef AVS_IMPLICIT_FUNCTION_DECLARATION_ERROR
433  return avs_get_write_ptr_p(p, 0);}
434 #endif
435 
436 AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *);
437 // makes a shallow copy of a video frame
438 AVSC_API(AVS_VideoFrame *, avs_copy_video_frame)(AVS_VideoFrame *);
439 
440 #ifndef AVSC_NO_DECLSPEC
442  {avs_release_video_frame(f);}
444  {return avs_copy_video_frame(f);}
445 #endif
446 
447 /////////////////////////////////////////////////////////////////////
448 //
449 // AVS_Value
450 //
451 
452 // Treat AVS_Value as a fat pointer. That is use avs_copy_value
453 // and avs_release_value appropiaty as you would if AVS_Value was
454 // a pointer.
455 
456 // To maintain source code compatibility with future versions of the
457 // avisynth_c API don't use the AVS_Value directly. Use the helper
458 // functions below.
459 
460 // AVS_Value is layed out identicly to AVSValue
461 typedef struct AVS_Value AVS_Value;
462 struct AVS_Value {
463  short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
464  // for some function e'rror
465  short array_size;
466  union {
467  void * clip; // do not use directly, use avs_take_clip
468  char boolean;
469  int integer;
470  float floating_pt;
471  const char * string;
472  const AVS_Value * array;
473  } d;
474 };
475 
476 // AVS_Value should be initilized with avs_void.
477 // Should also set to avs_void after the value is released
478 // with avs_copy_value. Consider it the equalvent of setting
479 // a pointer to NULL
480 static const AVS_Value avs_void = {'v'};
481 
482 AVSC_API(void, avs_copy_value)(AVS_Value * dest, AVS_Value src);
483 AVSC_API(void, avs_release_value)(AVS_Value);
484 
485 AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; }
486 AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
487 AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; }
488 AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; }
489 AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.type == 'i'; }
490 AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; }
491 AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; }
492 AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; }
493 
494 AVSC_API(AVS_Clip *, avs_take_clip)(AVS_Value, AVS_ScriptEnvironment *);
495 AVSC_API(void, avs_set_to_clip)(AVS_Value *, AVS_Clip *);
496 
498  { return v.d.boolean; }
500  { return v.d.integer; }
502  { return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
504  { return avs_is_int(v) ? v.d.integer : v.d.floating_pt; }
506  { return avs_is_error(v) ? v.d.string : 0; }
508  { return v.d.array; }
510  { return avs_is_array(v) ? v.array_size : 1; }
512  { return avs_is_array(v) ? v.d.array[index] : v; }
513 
514 // only use these functions on an AVS_Value that does not already have
515 // an active value. Remember, treat AVS_Value as a fat pointer.
517  { AVS_Value v; v.type = 'b'; v.d.boolean = v0 == 0 ? 0 : 1; return v; }
519  { AVS_Value v; v.type = 'i'; v.d.integer = v0; return v; }
521  { AVS_Value v; v.type = 's'; v.d.string = v0; return v; }
523  { AVS_Value v; v.type = 'f'; v.d.floating_pt = v0; return v;}
525  { AVS_Value v; v.type = 'e'; v.d.string = v0; return v; }
526 #ifndef AVSC_NO_DECLSPEC
528  { AVS_Value v; avs_set_to_clip(&v, v0); return v; }
529 #endif
531  { AVS_Value v; v.type = 'a'; v.d.array = v0; v.array_size = size; return v; }
532 
533 /////////////////////////////////////////////////////////////////////
534 //
535 // AVS_Clip
536 //
537 
538 AVSC_API(void, avs_release_clip)(AVS_Clip *);
539 AVSC_API(AVS_Clip *, avs_copy_clip)(AVS_Clip *);
540 
541 AVSC_API(const char *, avs_clip_get_error)(AVS_Clip *); // return 0 if no error
542 
543 AVSC_API(const AVS_VideoInfo *, avs_get_video_info)(AVS_Clip *);
544 
545 AVSC_API(int, avs_get_version)(AVS_Clip *);
546 
547 AVSC_API(AVS_VideoFrame *, avs_get_frame)(AVS_Clip *, int n);
548 // The returned video frame must be released with avs_release_video_frame
549 
550 AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
551 // return field parity if field_based, else parity of first field in frame
552 
553 AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
555 // start and count are in samples
556 
557 AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
559 
560 // This is the callback type used by avs_add_function
561 typedef AVS_Value (AVSC_CC * AVS_ApplyFunc)
563 
564 typedef struct AVS_FilterInfo AVS_FilterInfo;
566 {
567  // these members should not be modified outside of the AVS_ApplyFunc callback
573  int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
575  int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
576  int frame_range);
577  void (AVSC_CC * free_filter)(AVS_FilterInfo *);
578 
579  // Should be set when ever there is an error to report.
580  // It is cleared before any of the above methods are called
581  const char * error;
582  // this is to store whatever and may be modified at will
583  void * user_data;
584 };
585 
586 // Create a new filter
587 // fi is set to point to the AVS_FilterInfo so that you can
588 // modify it once it is initilized.
589 // store_child should generally be set to true. If it is not
590 // set than ALL methods (the function pointers) must be defined
591 // If it is set than you do not need to worry about freeing the child
592 // clip.
593 AVSC_API(AVS_Clip *, avs_new_c_filter)(AVS_ScriptEnvironment * e,
596 
597 /////////////////////////////////////////////////////////////////////
598 //
599 // AVS_ScriptEnvironment
600 //
601 
602 // For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
603 enum {
604  /* slowest CPU to support extension */
605  AVS_CPU_FORCE = 0x01, // N/A
606  AVS_CPU_FPU = 0x02, // 386/486DX
607  AVS_CPU_MMX = 0x04, // P55C, K6, PII
608  AVS_CPU_INTEGER_SSE = 0x08, // PIII, Athlon
609  AVS_CPU_SSE = 0x10, // PIII, Athlon XP/MP
610  AVS_CPU_SSE2 = 0x20, // PIV, Hammer
611  AVS_CPU_3DNOW = 0x40, // K6-2
612  AVS_CPU_3DNOW_EXT = 0x80, // Athlon
613  AVS_CPU_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2,
614  // which only Hammer will have anyway)
615  AVS_CPUF_SSE3 = 0x100, // PIV+, K8 Venice
616  AVS_CPUF_SSSE3 = 0x200, // Core 2
617  AVS_CPUF_SSE4 = 0x400, // Penryn, Wolfdale, Yorkfield
619 //AVS_CPUF_AVX = 0x800, // Sandy Bridge, Bulldozer
620  AVS_CPUF_SSE4_2 = 0x1000, // Nehalem
621 //AVS_CPUF_AVX2 = 0x2000, // Haswell
622 //AVS_CPUF_AVX512 = 0x4000, // Knights Landing
623 };
624 
625 
626 AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error
627 
628 AVSC_API(int, avs_get_cpu_flags)(AVS_ScriptEnvironment *);
629 AVSC_API(int, avs_check_version)(AVS_ScriptEnvironment *, int version);
630 
631 AVSC_API(char *, avs_save_string)(AVS_ScriptEnvironment *, const char* s, int length);
632 AVSC_API(char *, avs_sprintf)(AVS_ScriptEnvironment *, const char * fmt, ...);
633 
634 AVSC_API(char *, avs_vsprintf)(AVS_ScriptEnvironment *, const char * fmt, void* val);
635  // note: val is really a va_list; I hope everyone typedefs va_list to a pointer
636 
637 AVSC_API(int, avs_add_function)(AVS_ScriptEnvironment *,
638  const char * name, const char * params,
639  AVS_ApplyFunc apply, void * user_data);
640 
641 AVSC_API(int, avs_function_exists)(AVS_ScriptEnvironment *, const char * name);
642 
643 AVSC_API(AVS_Value, avs_invoke)(AVS_ScriptEnvironment *, const char * name,
644  AVS_Value args, const char** arg_names);
645 // The returned value must be be released with avs_release_value
646 
647 AVSC_API(AVS_Value, avs_get_var)(AVS_ScriptEnvironment *, const char* name);
648 // The returned value must be be released with avs_release_value
649 
650 AVSC_API(int, avs_set_var)(AVS_ScriptEnvironment *, const char* name, AVS_Value val);
651 
652 AVSC_API(int, avs_set_global_var)(AVS_ScriptEnvironment *, const char* name, const AVS_Value val);
653 
654 //void avs_push_context(AVS_ScriptEnvironment *, int level=0);
655 //void avs_pop_context(AVS_ScriptEnvironment *);
656 
657 AVSC_API(AVS_VideoFrame *, avs_new_video_frame_a)(AVS_ScriptEnvironment *,
658  const AVS_VideoInfo * vi, int align);
659 // align should be at least 16
660 
661 #ifndef AVSC_NO_DECLSPEC
664  const AVS_VideoInfo * vi)
665  {return avs_new_video_frame_a(env,vi,FRAME_ALIGN);}
666 
669  const AVS_VideoInfo * vi)
670  {return avs_new_video_frame_a(env,vi,FRAME_ALIGN);}
671 #endif
672 
673 
674 AVSC_API(int, avs_make_writable)(AVS_ScriptEnvironment *, AVS_VideoFrame * * pvf);
675 
676 AVSC_API(void, avs_bit_blt)(AVS_ScriptEnvironment *, BYTE* dstp, int dst_pitch, const BYTE* srcp, int src_pitch, int row_size, int height);
677 
679 AVSC_API(void, avs_at_exit)(AVS_ScriptEnvironment *, AVS_ShutdownFunc function, void * user_data);
680 
682 // The returned video frame must be be released
683 
684 AVSC_API(int, avs_set_memory_max)(AVS_ScriptEnvironment *, int mem);
685 
686 AVSC_API(int, avs_set_working_dir)(AVS_ScriptEnvironment *, const char * newdir);
687 
688 // avisynth.dll exports this; it's a way to use it as a library, without
689 // writing an AVS script or without going through AVIFile.
690 AVSC_API(AVS_ScriptEnvironment *, avs_create_script_environment)(int version);
691 
692 // this symbol is the entry point for the plugin and must
693 // be defined
696 
697 
698 AVSC_API(void, avs_delete_script_environment)(AVS_ScriptEnvironment *);
699 
700 
702 // The returned video frame must be be released
703 
704 #ifdef AVSC_NO_DECLSPEC
705 // use LoadLibrary and related functions to dynamically load Avisynth instead of declspec(dllimport)
706 /*
707  The following functions needs to have been declared, probably from windows.h
708 
709  void* malloc(size_t)
710  void free(void*);
711 
712  HMODULE LoadLibrary(const char*);
713  void* GetProcAddress(HMODULE, const char*);
714  FreeLibrary(HMODULE);
715 */
716 
717 
718 typedef struct AVS_Library AVS_Library;
719 
720 #define AVSC_DECLARE_FUNC(name) name##_func name
721 
722 struct AVS_Library {
723  HMODULE handle;
724 
725  AVSC_DECLARE_FUNC(avs_add_function);
726  AVSC_DECLARE_FUNC(avs_at_exit);
727  AVSC_DECLARE_FUNC(avs_bit_blt);
728  AVSC_DECLARE_FUNC(avs_check_version);
729  AVSC_DECLARE_FUNC(avs_clip_get_error);
730  AVSC_DECLARE_FUNC(avs_copy_clip);
731  AVSC_DECLARE_FUNC(avs_copy_value);
732  AVSC_DECLARE_FUNC(avs_copy_video_frame);
733  AVSC_DECLARE_FUNC(avs_create_script_environment);
734  AVSC_DECLARE_FUNC(avs_delete_script_environment);
735  AVSC_DECLARE_FUNC(avs_function_exists);
736  AVSC_DECLARE_FUNC(avs_get_audio);
737  AVSC_DECLARE_FUNC(avs_get_cpu_flags);
738  AVSC_DECLARE_FUNC(avs_get_frame);
739  AVSC_DECLARE_FUNC(avs_get_parity);
740  AVSC_DECLARE_FUNC(avs_get_var);
741  AVSC_DECLARE_FUNC(avs_get_version);
742  AVSC_DECLARE_FUNC(avs_get_video_info);
743  AVSC_DECLARE_FUNC(avs_invoke);
744  AVSC_DECLARE_FUNC(avs_make_writable);
745  AVSC_DECLARE_FUNC(avs_new_c_filter);
746  AVSC_DECLARE_FUNC(avs_new_video_frame_a);
747  AVSC_DECLARE_FUNC(avs_release_clip);
748  AVSC_DECLARE_FUNC(avs_release_value);
749  AVSC_DECLARE_FUNC(avs_release_video_frame);
750  AVSC_DECLARE_FUNC(avs_save_string);
751  AVSC_DECLARE_FUNC(avs_set_cache_hints);
752  AVSC_DECLARE_FUNC(avs_set_global_var);
753  AVSC_DECLARE_FUNC(avs_set_memory_max);
754  AVSC_DECLARE_FUNC(avs_set_to_clip);
755  AVSC_DECLARE_FUNC(avs_set_var);
756  AVSC_DECLARE_FUNC(avs_set_working_dir);
757  AVSC_DECLARE_FUNC(avs_sprintf);
758  AVSC_DECLARE_FUNC(avs_subframe);
759  AVSC_DECLARE_FUNC(avs_subframe_planar);
760  AVSC_DECLARE_FUNC(avs_take_clip);
761  AVSC_DECLARE_FUNC(avs_vsprintf);
762 
763  AVSC_DECLARE_FUNC(avs_get_error);
764  AVSC_DECLARE_FUNC(avs_is_yv24);
765  AVSC_DECLARE_FUNC(avs_is_yv16);
767  AVSC_DECLARE_FUNC(avs_is_yv411);
768  AVSC_DECLARE_FUNC(avs_is_y8);
770 
771  AVSC_DECLARE_FUNC(avs_get_plane_width_subsampling);
772  AVSC_DECLARE_FUNC(avs_get_plane_height_subsampling);
783 };
784 
785 #undef AVSC_DECLARE_FUNC
786 
787 
788 AVSC_INLINE AVS_Library * avs_load_library() {
789  AVS_Library *library = (AVS_Library *)malloc(sizeof(AVS_Library));
790  if (library == NULL)
791  return NULL;
792  library->handle = LoadLibrary("avisynth");
793  if (library->handle == NULL)
794  goto fail;
795 
796 #define __AVSC_STRINGIFY(x) #x
797 #define AVSC_STRINGIFY(x) __AVSC_STRINGIFY(x)
798 #define AVSC_LOAD_FUNC(name) {\
799  library->name = (name##_func) GetProcAddress(library->handle, AVSC_STRINGIFY(name));\
800  if (library->name == NULL)\
801  goto fail;\
802 }
803 
804  AVSC_LOAD_FUNC(avs_add_function);
805  AVSC_LOAD_FUNC(avs_at_exit);
806  AVSC_LOAD_FUNC(avs_bit_blt);
807  AVSC_LOAD_FUNC(avs_check_version);
808  AVSC_LOAD_FUNC(avs_clip_get_error);
809  AVSC_LOAD_FUNC(avs_copy_clip);
810  AVSC_LOAD_FUNC(avs_copy_value);
811  AVSC_LOAD_FUNC(avs_copy_video_frame);
812  AVSC_LOAD_FUNC(avs_create_script_environment);
813  AVSC_LOAD_FUNC(avs_delete_script_environment);
814  AVSC_LOAD_FUNC(avs_function_exists);
815  AVSC_LOAD_FUNC(avs_get_audio);
816  AVSC_LOAD_FUNC(avs_get_cpu_flags);
817  AVSC_LOAD_FUNC(avs_get_frame);
818  AVSC_LOAD_FUNC(avs_get_parity);
819  AVSC_LOAD_FUNC(avs_get_var);
820  AVSC_LOAD_FUNC(avs_get_version);
821  AVSC_LOAD_FUNC(avs_get_video_info);
822  AVSC_LOAD_FUNC(avs_invoke);
823  AVSC_LOAD_FUNC(avs_make_writable);
824  AVSC_LOAD_FUNC(avs_new_c_filter);
825  AVSC_LOAD_FUNC(avs_new_video_frame_a);
826  AVSC_LOAD_FUNC(avs_release_clip);
827  AVSC_LOAD_FUNC(avs_release_value);
828  AVSC_LOAD_FUNC(avs_release_video_frame);
829  AVSC_LOAD_FUNC(avs_save_string);
830  AVSC_LOAD_FUNC(avs_set_cache_hints);
831  AVSC_LOAD_FUNC(avs_set_global_var);
832  AVSC_LOAD_FUNC(avs_set_memory_max);
833  AVSC_LOAD_FUNC(avs_set_to_clip);
834  AVSC_LOAD_FUNC(avs_set_var);
835  AVSC_LOAD_FUNC(avs_set_working_dir);
836  AVSC_LOAD_FUNC(avs_sprintf);
837  AVSC_LOAD_FUNC(avs_subframe);
838  AVSC_LOAD_FUNC(avs_subframe_planar);
839  AVSC_LOAD_FUNC(avs_take_clip);
840  AVSC_LOAD_FUNC(avs_vsprintf);
841 
842  AVSC_LOAD_FUNC(avs_get_error);
843  AVSC_LOAD_FUNC(avs_is_yv24);
844  AVSC_LOAD_FUNC(avs_is_yv16);
845  AVSC_LOAD_FUNC(avs_is_yv12);
846  AVSC_LOAD_FUNC(avs_is_yv411);
847  AVSC_LOAD_FUNC(avs_is_y8);
848  AVSC_LOAD_FUNC(avs_is_color_space);
849 
850  AVSC_LOAD_FUNC(avs_get_plane_width_subsampling);
851  AVSC_LOAD_FUNC(avs_get_plane_height_subsampling);
852  AVSC_LOAD_FUNC(avs_bits_per_pixel);
853  AVSC_LOAD_FUNC(avs_bytes_from_pixels);
854  AVSC_LOAD_FUNC(avs_row_size);
855  AVSC_LOAD_FUNC(avs_bmp_size);
856  AVSC_LOAD_FUNC(avs_get_pitch_p);
857  AVSC_LOAD_FUNC(avs_get_row_size_p);
858  AVSC_LOAD_FUNC(avs_get_height_p);
859  AVSC_LOAD_FUNC(avs_get_read_ptr_p);
860  AVSC_LOAD_FUNC(avs_is_writable);
861  AVSC_LOAD_FUNC(avs_get_write_ptr_p);
862 
863 #undef __AVSC_STRINGIFY
864 #undef AVSC_STRINGIFY
865 #undef AVSC_LOAD_FUNC
866 
867  return library;
868 
869 fail:
870  free(library);
871  return NULL;
872 }
873 
874 AVSC_INLINE void avs_free_library(AVS_Library *library) {
875  if (library == NULL)
876  return;
877  FreeLibrary(library->handle);
878  free(library);
879 }
880 #endif
881 
882 #endif
void INT64 INT64 count
Definition: avisynth_c.h:573
int plane
Definition: avisynth_c.h:291
int cachehints
Definition: avisynth_c.h:558
#define NULL
Definition: coverity.c:32
const char const char void * val
Definition: avisynth_c.h:634
float v
const char * s
Definition: avisynth_c.h:631
AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo *p)
Definition: avisynth_c.h:252
BYTE int const BYTE int int row_size
Definition: avisynth_c.h:676
AVSC_INLINE AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment *env, const AVS_VideoInfo *vi)
Definition: avisynth_c.h:663
volatile long sequence_number
Definition: avisynth_c.h:386
BYTE int const BYTE int src_pitch
Definition: avisynth_c.h:676
AVS_VideoFrame *AVSC_CC * get_frame(AVS_FilterInfo *, int n)
AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v)
Definition: avisynth_c.h:507
const char AVS_Value const char ** arg_names
Definition: avisynth_c.h:643
const char * fmt
Definition: avisynth_c.h:632
AVSC_INLINE const char * avs_as_string(AVS_Value v)
Definition: avisynth_c.h:501
AVSC_INLINE int avs_is_tff(const AVS_VideoInfo *p)
Definition: avisynth_c.h:288
short array_size
Definition: avisynth_c.h:465
AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo *p)
Definition: avisynth_c.h:319
AVS_VideoFrame int int int int int int rel_offsetV
Definition: avisynth_c.h:701
AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame *f)
Definition: avisynth_c.h:443
AVSC_INLINE int avs_bytes_from_pixels(const AVS_VideoInfo *p, int pixels)
Definition: avxsynth_c.h:232
AVSC_INLINE AVS_Value avs_new_value_error(const char *v0)
Definition: avisynth_c.h:524
char boolean
Definition: avisynth_c.h:468
static const AVS_Value avs_void
Definition: avisynth_c.h:480
AVS_VideoFrame int int int int new_height
Definition: avisynth_c.h:681
int version
Definition: avisynth_c.h:629
AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo *p, INT64 bytes)
Definition: avisynth_c.h:328
GLfloat v0
Definition: opengl_enc.c:107
AVSC_INLINE void avs_set_fps(AVS_VideoInfo *p, unsigned numerator, unsigned denominator)
Definition: avisynth_c.h:350
AVSC_INLINE AVS_Value avs_new_value_int(int v0)
Definition: avisynth_c.h:518
const char * string
Definition: avisynth_c.h:471
long long int INT64
Definition: types.h:46
AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo *p)
Definition: avisynth_c.h:282
AVSC_INLINE int avs_bmp_size(const AVS_VideoInfo *vi)
Definition: avxsynth_c.h:238
BYTE int const BYTE * srcp
Definition: avisynth_c.h:676
short type
Definition: avisynth_c.h:463
#define AVSC_EXPORT
Definition: capi.h:54
typedef AVS_Value(AVSC_CC *AVS_ApplyFunc)(AVS_ScriptEnvironment *
int mem
Definition: avisynth_c.h:684
AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo *p)
Definition: avisynth_c.h:334
AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo *p)
Definition: avisynth_c.h:304
AVS_FilterInfo AVS_Value child
Definition: avisynth_c.h:594
#define AVSC_DECLARE_FUNC(name)
Definition: avisynth.c:50
AVSC_INLINE int avs_is_property(const AVS_VideoInfo *p, int property)
Definition: avisynth_c.h:271
const AVS_Value * array
Definition: avisynth_c.h:472
AVS_VideoFrame int int int int int rel_offsetU
Definition: avisynth_c.h:701
AVS_ScriptEnvironment * env
Definition: avisynth_c.h:570
AVSC_INLINE int avs_is_int(AVS_Value v)
Definition: avisynth_c.h:488
const char * newdir
Definition: avisynth_c.h:686
AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo *p)
Definition: avisynth_c.h:246
AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index)
Definition: avisynth_c.h:511
AVSC_INLINE int avs_array_size(AVS_Value v)
Definition: avisynth_c.h:509
AVSC_INLINE int avs_as_int(AVS_Value v)
Definition: avisynth_c.h:499
AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo *p, INT64 samples)
Definition: avisynth_c.h:331
volatile long refcount
Definition: avisynth_c.h:396
AVSC_API(int, avs_is_yv24)(const AVS_VideoInfo *p)
void * clip
Definition: avisynth_c.h:467
AVSC_INLINE int avs_is_array(AVS_Value v)
Definition: avisynth_c.h:491
volatile long refcount
Definition: avisynth_c.h:388
ptrdiff_t size
Definition: opengl_enc.c:101
AVSC_INLINE int avs_is_bool(AVS_Value v)
Definition: avisynth_c.h:487
AVSC_INLINE int avs_get_height(const AVS_VideoFrame *p)
Definition: avisynth_c.h:417
int int frame_range
Definition: avisynth_c.h:558
AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame *p, int plane)
Definition: avxsynth_c.h:340
AVSC_INLINE int avs_is_float(AVS_Value v)
Definition: avisynth_c.h:489
INT64 num_audio_samples
Definition: avisynth_c.h:231
AVSC_INLINE AVS_Value avs_new_value_float(float v0)
Definition: avisynth_c.h:522
AVS_Clip * child
Definition: avisynth_c.h:568
AVS_FilterInfo ** fi
Definition: avisynth_c.h:594
const AVS_VideoInfo * vi
Definition: avisynth_c.h:658
AVSC_INLINE int avs_is_planar(const AVS_VideoInfo *p)
Definition: avisynth_c.h:274
AVSC_EXPORT const char *AVSC_CC avisynth_c_plugin_init(AVS_ScriptEnvironment *env)
AVSC_INLINE void avs_set_property(AVS_VideoInfo *p, int property)
Definition: avisynth_c.h:341
BYTE * dstp
Definition: avisynth_c.h:676
void * HMODULE
AVSC_INLINE const unsigned char * avs_get_read_ptr(const AVS_VideoFrame *p)
Definition: avxsynth_c.h:381
AVS_Value void * user_data
Definition: avisynth_c.h:562
AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo *p)
Definition: avisynth_c.h:249
AVSC_INLINE int avs_has_video(const AVS_VideoInfo *p)
Definition: avisynth_c.h:240
struct AVS_Clip AVS_Clip
Definition: avisynth_c.h:213
AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo *p, int c_space)
Definition: avxsynth_c.h:200
union AVS_Value::@12 d
AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame *p)
Definition: avxsynth_c.h:337
#define fail()
Definition: checkasm.h:57
const char * name
Definition: avisynth_c.h:638
unsigned fps_numerator
Definition: avisynth_c.h:224
AVSC_INLINE int avs_defined(AVS_Value v)
Definition: avisynth_c.h:485
AVSC_INLINE AVS_Value avs_new_value_bool(int v0)
Definition: avisynth_c.h:516
int int frame_range
Definition: avisynth_c.h:575
AVSC_INLINE int avs_is_clip(AVS_Value v)
Definition: avisynth_c.h:486
AVSC_INLINE unsigned char * avs_get_write_ptr_p(const AVS_VideoFrame *p, int plane)
Definition: avxsynth_c.h:404
float y
AVSC_INLINE AVS_Value avs_new_value_string(const char *v0)
Definition: avisynth_c.h:520
AVSC_INLINE const char * avs_as_error(AVS_Value v)
Definition: avisynth_c.h:505
typedef void(APIENTRY *FF_PFNGLACTIVETEXTUREPROC)(GLenum texture)
AVS_Value args
Definition: avisynth_c.h:562
AVS_VideoInfo vi
Definition: avisynth_c.h:569
AVSC_INLINE int avs_is_bff(const AVS_VideoInfo *p)
Definition: avisynth_c.h:285
int n
Definition: avisynth_c.h:547
#define LoadLibrary(x)
Definition: avisynth.c:43
AVSC_INLINE double avs_as_float(AVS_Value v)
Definition: avisynth_c.h:503
AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame *p)
Definition: avisynth_c.h:412
AVSC_INLINE int avs_bits_per_pixel(const AVS_VideoInfo *p)
Definition: avxsynth_c.h:221
const AVS_VideoInfo int align
Definition: avisynth_c.h:658
void INT64 start
Definition: avisynth_c.h:573
unsigned char BYTE
Definition: types.h:40
AVS_Value src
Definition: avisynth_c.h:482
AVSC_INLINE const unsigned char * avs_get_read_ptr_p(const AVS_VideoFrame *p, int plane)
Definition: avxsynth_c.h:384
AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo *p)
Definition: avxsynth_c.h:197
AVSC_INLINE int avs_is_error(AVS_Value v)
Definition: avisynth_c.h:492
int(AVSC_CC *get_parity)(AVS_FilterInfo *
AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo *p)
Definition: avisynth_c.h:279
const char * error
Definition: avisynth_c.h:581
void * buf
Definition: avisynth_c.h:553
AVS_VideoFrame int rel_offset
Definition: avisynth_c.h:681
BYTE int const BYTE int int int height
Definition: avisynth_c.h:676
#define FRAME_ALIGN
Definition: config.h:45
#define AVSC_INLINE
Definition: capi.h:48
AVS_VideoFrame ** pvf
Definition: avisynth_c.h:674
AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value *v0, int size)
Definition: avisynth_c.h:530
int index
Definition: gxfenc.c:89
void(AVSC_CC * AVS_ShutdownFunc)(void *user_data, AVS_ScriptEnvironment *env)
Definition: avisynth_c.h:678
AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo *p)
Definition: avisynth_c.h:308
AVSC_INLINE void avs_set_field_based(AVS_VideoInfo *p, int isfieldbased)
Definition: avisynth_c.h:347
AVS_VideoFrame int int int new_row_size
Definition: avisynth_c.h:681
void(AVSC_CC *free_filter)(AVS_FilterInfo *)
AVS_VideoFrameBuffer * vfb
Definition: avisynth_c.h:397
AVS_ScriptEnvironment AVS_Clip *AVSC_INLINE int avs_as_bool(AVS_Value v)
Definition: avisynth_c.h:497
#define AVSC_CC
Definition: capi.h:43
AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo *p)
Definition: avisynth_c.h:255
AVSC_INLINE void avs_clear_property(AVS_VideoInfo *p, int property)
Definition: avisynth_c.h:344
AVSC_INLINE AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment *env, const AVS_VideoInfo *vi)
Definition: avisynth_c.h:668
const char const char * params
Definition: avisynth_c.h:638
struct AVS_ScriptEnvironment AVS_ScriptEnvironment
Definition: avisynth_c.h:214
AVSC_INLINE void avs_release_frame(AVS_VideoFrame *f)
Definition: avisynth_c.h:441
float floating_pt
Definition: avisynth_c.h:470
AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo *x, AVS_VideoInfo *y)
Definition: avxsynth_c.h:297
AVS_VideoFrame int int new_pitch
Definition: avisynth_c.h:681
int integer
Definition: avisynth_c.h:469
AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip *v0)
Definition: avisynth_c.h:527
AVSC_INLINE int avs_is_string(AVS_Value v)
Definition: avisynth_c.h:490
AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame *p, int plane)
Definition: avxsynth_c.h:373
AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo *p, INT64 samples)
Definition: avisynth_c.h:325
int pixels
Definition: avisynth_c.h:298
int c_space
Definition: avisynth_c.h:277
AVSC_INLINE int avs_sample_type(const AVS_VideoInfo *p)
Definition: avisynth_c.h:337
AVSC_INLINE int avs_row_size(const AVS_VideoInfo *p)
Definition: avxsynth_c.h:235
AVS_VideoFrame int int int int int int int new_pitchUV
Definition: avisynth_c.h:701
unsigned fps_denominator
Definition: avisynth_c.h:224
AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo *p, INT64 frames)
Definition: avisynth_c.h:322
AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo *p)
Definition: avisynth_c.h:258
void INT64 INT64 count
Definition: avisynth_c.h:553
void INT64 start
Definition: avisynth_c.h:553
void * user_data
Definition: avisynth_c.h:583
const char int length
Definition: avisynth_c.h:631
BYTE int dst_pitch
Definition: avisynth_c.h:676
const char const char AVS_ApplyFunc apply
Definition: avisynth_c.h:638
AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame *p, int plane)
Definition: avxsynth_c.h:348
#define FreeLibrary
Definition: avisynth.c:45
static int get_parity(uint8_t value)
Get parity bit of bit 2..7.
Definition: g729dec.c:186
AVS_FilterInfo AVS_Value int store_child
Definition: avisynth_c.h:594
AVSC_INLINE unsigned char * avs_get_write_ptr(const AVS_VideoFrame *p)
Definition: avxsynth_c.h:395
AVSC_INLINE int avs_is_writable(const AVS_VideoFrame *p)
Definition: avxsynth_c.h:392
AVSC_INLINE int avs_has_audio(const AVS_VideoInfo *p)
Definition: avisynth_c.h:243
int audio_samples_per_second
Definition: avisynth_c.h:229