Re: [FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2020-03-12 Thread Stephen Hutchinson

On 3/12/20 4:46 AM, Marton Balint wrote:


Is it still required to include the headers in our source tree? AVISynth 
was frowned upon in the past beacuse generally we do not allow headers 
of external libraries in our tree.


If there is a way to completely remove the headers and keep the feature 
buildable with reasonable amount of work then I suggest we should do that.




I had a feeling this would get brought up, which is why I did make sure 
the necessary changes occurred in AviSynth+ upstream so that FFmpeg 
could use the system headers.


I'll send the revised patches as a reply to this message.

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2020-03-12 Thread Marton Balint



On Wed, 11 Mar 2020, Stephen Hutchinson wrote:


AviSynth+ can now be used on Linux, which required some changes
to the headers.

As part of this, and to not cause issues with adding a new header,
correct the header inclusion guards to make FATE happy.


Is it still required to include the headers in our source tree? AVISynth 
was frowned upon in the past beacuse generally we do not allow headers of 
external libraries in our tree.


If there is a way to completely remove the headers and keep the 
feature buildable with reasonable amount of work then I suggest 
we should do that.


Thanks,
Marton


---
compat/avisynth/avisynth_c.h |  30 ++
compat/avisynth/avs/capi.h   |  22 ++-
compat/avisynth/avs/config.h |  52 +---
compat/avisynth/avs/posix.h  | 111 +++
compat/avisynth/avs/types.h  |  19 +++---
tests/ref/fate/source|   4 --
6 files changed, 197 insertions(+), 41 deletions(-)
create mode 100644 compat/avisynth/avs/posix.h

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index 9ff9321552..d30d7caca9 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -51,8 +51,8 @@
// Example#2: avs_bits_per_component will return 8 for all colorspaces 
(Classic Avisynth supports only 8 bits/pixel)
// Thus the Avisynth+ specific API functions are safely callable even 
when connected to classic Avisynth DLL

-#ifndef __AVISYNTH_C__
-#define __AVISYNTH_C__
+#ifndef COMPAT_AVISYNTH_AVISYNTH_C_H
+#define COMPAT_AVISYNTH_AVISYNTH_C_H

#include "avs/config.h"
#include "avs/capi.h"
@@ -341,7 +341,7 @@ typedef struct AVS_VideoInfo {

  int audio_samples_per_second;   // 0 means no audio
  int sample_type;
-  INT64 num_audio_samples;
+  int64_t num_audio_samples;
  int nchannels;

  // Image type properties
@@ -444,16 +444,16 @@ AVSC_INLINE int avs_bytes_per_channel_sample(const 
AVS_VideoInfo * p)
AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
{ return p->nchannels*avs_bytes_per_channel_sample(p);}

-AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 
frames)
-{ return ((INT64)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }
+AVSC_INLINE int64_t avs_audio_samples_from_frames(const AVS_VideoInfo * p, 
int64_t frames)
+{ return ((int64_t)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }

-AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
-{ return (int)(samples * (INT64)p->fps_numerator / 
(INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
+AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, int64_t 
samples)
+{ return (int)(samples * (int64_t)p->fps_numerator / 
(int64_t)p->fps_denominator / (int64_t)p->audio_samples_per_second); }

-AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 
bytes)
+AVSC_INLINE int64_t avs_audio_samples_from_bytes(const AVS_VideoInfo * p, 
int64_t bytes)
{ return bytes / avs_bytes_per_audio_sample(p); }

-AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
+AVSC_INLINE int64_t avs_bytes_from_audio_samples(const AVS_VideoInfo * p, 
int64_t samples)
{ return samples * avs_bytes_per_audio_sample(p); }

AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
@@ -764,7 +764,7 @@ AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
// return field parity if field_based, else parity of first field in frame

AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
- INT64 start, INT64 count);
+ int64_t start, int64_t count);
// start and count are in samples

AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
@@ -784,7 +784,7 @@ struct AVS_FilterInfo
  AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n);
  int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n);
  int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
-  INT64 start, INT64 count);
+  int64_t start, int64_t count);
  int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
int frame_range);
  void (AVSC_CC * free_filter)(AVS_FilterInfo *);
@@ -933,6 +933,8 @@ AVSC_API(void, 
avs_delete_script_environment)(AVS_ScriptEnvironment *);
AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, 
AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int 
new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV);
// The returned video frame must be be released

+#if defined(AVS_WINDOWS)
+// The following stuff is only relevant for Windows DLL handling; Linux does 
it completely differently.
#ifdef AVSC_NO_DECLSPEC
// This part uses LoadLibrary and related functions to dynamically load 
Avisynth instead of declspec(dl

[FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2020-03-11 Thread Stephen Hutchinson
AviSynth+ can now be used on Linux, which required some changes
to the headers.

As part of this, and to not cause issues with adding a new header,
correct the header inclusion guards to make FATE happy.
---
 compat/avisynth/avisynth_c.h |  30 ++
 compat/avisynth/avs/capi.h   |  22 ++-
 compat/avisynth/avs/config.h |  52 +---
 compat/avisynth/avs/posix.h  | 111 +++
 compat/avisynth/avs/types.h  |  19 +++---
 tests/ref/fate/source|   4 --
 6 files changed, 197 insertions(+), 41 deletions(-)
 create mode 100644 compat/avisynth/avs/posix.h

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index 9ff9321552..d30d7caca9 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -51,8 +51,8 @@
 // Example#2: avs_bits_per_component will return 8 for all colorspaces 
(Classic Avisynth supports only 8 bits/pixel)
 // Thus the Avisynth+ specific API functions are safely callable even 
when connected to classic Avisynth DLL
 
-#ifndef __AVISYNTH_C__
-#define __AVISYNTH_C__
+#ifndef COMPAT_AVISYNTH_AVISYNTH_C_H
+#define COMPAT_AVISYNTH_AVISYNTH_C_H
 
 #include "avs/config.h"
 #include "avs/capi.h"
@@ -341,7 +341,7 @@ typedef struct AVS_VideoInfo {
 
   int audio_samples_per_second;   // 0 means no audio
   int sample_type;
-  INT64 num_audio_samples;
+  int64_t num_audio_samples;
   int nchannels;
 
   // Image type properties
@@ -444,16 +444,16 @@ AVSC_INLINE int avs_bytes_per_channel_sample(const 
AVS_VideoInfo * p)
 AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
 { return p->nchannels*avs_bytes_per_channel_sample(p);}
 
-AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 
frames)
-{ return ((INT64)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }
+AVSC_INLINE int64_t avs_audio_samples_from_frames(const AVS_VideoInfo * p, 
int64_t frames)
+{ return ((int64_t)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }
 
-AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
-{ return (int)(samples * (INT64)p->fps_numerator / 
(INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
+AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, int64_t 
samples)
+{ return (int)(samples * (int64_t)p->fps_numerator / 
(int64_t)p->fps_denominator / (int64_t)p->audio_samples_per_second); }
 
-AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 
bytes)
+AVSC_INLINE int64_t avs_audio_samples_from_bytes(const AVS_VideoInfo * p, 
int64_t bytes)
 { return bytes / avs_bytes_per_audio_sample(p); }
 
-AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
+AVSC_INLINE int64_t avs_bytes_from_audio_samples(const AVS_VideoInfo * p, 
int64_t samples)
 { return samples * avs_bytes_per_audio_sample(p); }
 
 AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
@@ -764,7 +764,7 @@ AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
 // return field parity if field_based, else parity of first field in frame
 
 AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
- INT64 start, INT64 count);
+ int64_t start, int64_t count);
 // start and count are in samples
 
 AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
@@ -784,7 +784,7 @@ struct AVS_FilterInfo
   AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n);
   int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n);
   int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
-  INT64 start, INT64 count);
+  int64_t start, int64_t count);
   int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
 int frame_range);
   void (AVSC_CC * free_filter)(AVS_FilterInfo *);
@@ -933,6 +933,8 @@ AVSC_API(void, 
avs_delete_script_environment)(AVS_ScriptEnvironment *);
 AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, 
AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int 
new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV);
 // The returned video frame must be be released
 
+#if defined(AVS_WINDOWS)
+// The following stuff is only relevant for Windows DLL handling; Linux does 
it completely differently.
 #ifdef AVSC_NO_DECLSPEC
 // This part uses LoadLibrary and related functions to dynamically load 
Avisynth instead of declspec(dllimport)
 // When AVSC_NO_DECLSPEC is defined, you can use avs_load_library to populate 
API functions into a struct
@@ -944,7 +946,7 @@ AVSC_API(AVS_VideoFrame *, 
avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_Vid
   void* malloc(size_t)
   void free(void*);
 
-  HMODULE LoadLibrary(const char*);
+  HMODULE LoadLibraryA(const char*);
   void* GetProcA

Re: [FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2020-03-11 Thread Michael Niedermayer
On Wed, Mar 11, 2020 at 06:50:15AM -0400, Stephen Hutchinson wrote:
> AviSynth+ can now be used on Linux, which required some changes
> to the headers.
> ---
>  compat/avisynth/avisynth_c.h |  24 
>  compat/avisynth/avs/capi.h   |  16 +
>  compat/avisynth/avs/config.h |  46 +--
>  compat/avisynth/avs/posix.h  | 111 +++
>  compat/avisynth/avs/types.h  |  13 ++--
>  5 files changed, 185 insertions(+), 25 deletions(-)
>  create mode 100644 compat/avisynth/avs/posix.h

breaks fate-source

make fate-source
TESTsource
--- ./tests/ref/fate/source 2020-03-11 22:59:07.757862801 +0100
+++ tests/data/fate/source  2020-03-11 23:00:22.237644535 +0100
@@ -22,6 +22,7 @@
 compat/avisynth/avisynth_c.h
 compat/avisynth/avs/capi.h
 compat/avisynth/avs/config.h
+compat/avisynth/avs/posix.h
 compat/avisynth/avs/types.h
 compat/avisynth/avxsynth_c.h
 compat/avisynth/windowsPorts/basicDataTypeConversions.h
Test source failed. Look at tests/data/fate/source.err for details.
tests/Makefile:250: recipe for target 'fate-source' failed
make: *** [fate-source] Error 1

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2020-03-11 Thread Stephen Hutchinson
AviSynth+ can now be used on Linux, which required some changes
to the headers.
---
 compat/avisynth/avisynth_c.h |  24 
 compat/avisynth/avs/capi.h   |  16 +
 compat/avisynth/avs/config.h |  46 +--
 compat/avisynth/avs/posix.h  | 111 +++
 compat/avisynth/avs/types.h  |  13 ++--
 5 files changed, 185 insertions(+), 25 deletions(-)
 create mode 100644 compat/avisynth/avs/posix.h

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index 9ff9321552..03c3530ca9 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -341,7 +341,7 @@ typedef struct AVS_VideoInfo {
 
   int audio_samples_per_second;   // 0 means no audio
   int sample_type;
-  INT64 num_audio_samples;
+  int64_t num_audio_samples;
   int nchannels;
 
   // Image type properties
@@ -444,16 +444,16 @@ AVSC_INLINE int avs_bytes_per_channel_sample(const 
AVS_VideoInfo * p)
 AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
 { return p->nchannels*avs_bytes_per_channel_sample(p);}
 
-AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 
frames)
-{ return ((INT64)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }
+AVSC_INLINE int64_t avs_audio_samples_from_frames(const AVS_VideoInfo * p, 
int64_t frames)
+{ return ((int64_t)(frames) * p->audio_samples_per_second * 
p->fps_denominator / p->fps_numerator); }
 
-AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
-{ return (int)(samples * (INT64)p->fps_numerator / 
(INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
+AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, int64_t 
samples)
+{ return (int)(samples * (int64_t)p->fps_numerator / 
(int64_t)p->fps_denominator / (int64_t)p->audio_samples_per_second); }
 
-AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 
bytes)
+AVSC_INLINE int64_t avs_audio_samples_from_bytes(const AVS_VideoInfo * p, 
int64_t bytes)
 { return bytes / avs_bytes_per_audio_sample(p); }
 
-AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 
samples)
+AVSC_INLINE int64_t avs_bytes_from_audio_samples(const AVS_VideoInfo * p, 
int64_t samples)
 { return samples * avs_bytes_per_audio_sample(p); }
 
 AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
@@ -764,7 +764,7 @@ AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
 // return field parity if field_based, else parity of first field in frame
 
 AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
- INT64 start, INT64 count);
+ int64_t start, int64_t count);
 // start and count are in samples
 
 AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
@@ -784,7 +784,7 @@ struct AVS_FilterInfo
   AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n);
   int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n);
   int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
-  INT64 start, INT64 count);
+  int64_t start, int64_t count);
   int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
 int frame_range);
   void (AVSC_CC * free_filter)(AVS_FilterInfo *);
@@ -933,6 +933,8 @@ AVSC_API(void, 
avs_delete_script_environment)(AVS_ScriptEnvironment *);
 AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, 
AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int 
new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV);
 // The returned video frame must be be released
 
+#if defined(AVS_WINDOWS)
+// The following stuff is only relevant for Windows DLL handling; Linux does 
it completely differently.
 #ifdef AVSC_NO_DECLSPEC
 // This part uses LoadLibrary and related functions to dynamically load 
Avisynth instead of declspec(dllimport)
 // When AVSC_NO_DECLSPEC is defined, you can use avs_load_library to populate 
API functions into a struct
@@ -944,7 +946,7 @@ AVSC_API(AVS_VideoFrame *, 
avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_Vid
   void* malloc(size_t)
   void free(void*);
 
-  HMODULE LoadLibrary(const char*);
+  HMODULE LoadLibraryA(const char*);
   void* GetProcAddress(HMODULE, const char*);
   FreeLibrary(HMODULE);
 */
@@ -1261,4 +1263,6 @@ AVSC_INLINE void avs_free_library(AVS_Library *library) {
 }
 #endif
 
+#endif // AVS_WINDOWS
+
 #endif
diff --git a/compat/avisynth/avs/capi.h b/compat/avisynth/avs/capi.h
index 8799bf1fbb..4e31a5de48 100644
--- a/compat/avisynth/avs/capi.h
+++ b/compat/avisynth/avs/capi.h
@@ -33,12 +33,20 @@
 #ifndef AVS_CAPI_H
 #define AVS_CAPI_H
 
+#include "config.h"
+
+#ifdef AVS_POSIX
+// this is also defined in avs/posix.h
+#define __declspec(x)
+#endif
+
 #ifdef __cplusplus
 #  define EXTERN_C extern "C"
 #else
 #  define EXTERN_C

[FFmpeg-devel] [PATCH 1/5] compat/avisynth: update headers

2019-03-24 Thread Stephen Hutchinson
As part of the update, it is now possible to test 32-bit GCC builds
of AviSynth+ with FFmpeg by using the AVS_WIN32_GCC32 define. Due to
different calling conventions between MSVC and GCC regarding 32-bit
Windows, this is unfortunately necessary.
---
 compat/avisynth/avisynth_c.h | 503 ---
 compat/avisynth/avs/capi.h   |  44 ++-
 compat/avisynth/avs/config.h |  17 +-
 compat/avisynth/avs/types.h  |   6 +
 4 files changed, 408 insertions(+), 162 deletions(-)

diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h
index 605b92ae62..f0f1948902 100644
--- a/compat/avisynth/avisynth_c.h
+++ b/compat/avisynth/avisynth_c.h
@@ -34,6 +34,22 @@
 // NOTE: this is a partial update of the Avisynth C interface to recognize
 // new color spaces added in Avisynth 2.60. By no means is this document
 // completely Avisynth 2.60 compliant.
+// 170103: added new CPU constants (FMA4, AVX512xx)
+// 171102: define SIZETMOD. do not use yet, experimental. Offsets are size_t 
instead of int. Affects x64.
+// 171106: avs_get_row_size calls into avs_get_row_size_p, instead of direct 
field access
+// 171106: avs_get_height calls into avs_get_row_size_p, instead of direct 
field access
+// 180524: AVSC_EXPORT to dllexport in capi.h for avisynth_c_plugin_init
+// 180524: avs_is_same_colorspace VideoInfo parameters to const
+// 181230: Readability: functions regrouped to mix less AVSC_API and 
AVSC_INLINE, put together Avisynth+ specific stuff
+// 181230: use #ifndef AVSC_NO_DECLSPEC for AVSC_INLINE functions which are 
calling API functions
+// 181230: comments on avs_load_library (helper for loading API entries 
dynamically into a struct using AVSC_NO_DECLSPEC define)
+// 181230: define alias AVS_FRAME_ALIGN as FRAME_ALIGN
+// 181230: remove unused form of avs_get_rowsize and avs_get_height (kept 
earlier for reference)
+// 190104: avs_load_library: smart fallback mechanism for Avisynth+ specific 
functions:
+// if they are not loadable, they will work in a classic Avisynth 
compatible mode
+// Example#1: e.g. avs_is_444 will call the existing avs_is_yv24 
instead
+// Example#2: avs_bits_per_component will return 8 for all colorspaces 
(Classic Avisynth supports only 8 bits/pixel)
+// Thus the Avisynth+ specific API functions are safely callable even 
when connected to classic Avisynth DLL
 
 #ifndef __AVISYNTH_C__
 #define __AVISYNTH_C__
@@ -42,7 +58,7 @@
 #include "avs/capi.h"
 #include "avs/types.h"
 
-
+#define AVS_FRAME_ALIGN FRAME_ALIGN
 /
 //
 // Constants
@@ -124,7 +140,7 @@ enum {
 AVS_CS_GENERIC_YUVA444 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST 
| AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_1 }; // 4:4:4:A planar
 
 
-  // Specific colorformats
+  // Specific color formats
 enum {
   AVS_CS_UNKNOWN = 0,
   AVS_CS_BGR24 = AVS_CS_RGB_TYPE  | AVS_CS_BGR | AVS_CS_INTERLEAVED,
@@ -134,18 +150,18 @@ enum {
   //  AVS_CS_I420  = 1<<4  Reserved
   AVS_CS_RAW32 = 1<<5 | AVS_CS_INTERLEAVED,
 
-  AVS_CS_YV24  = AVS_CS_GENERIC_YUV444 | AVS_CS_SAMPLE_BITS_8,  // YVU 4:4:4 
planar
-  AVS_CS_YV16  = AVS_CS_GENERIC_YUV422 | AVS_CS_SAMPLE_BITS_8,  // YVU 4:2:2 
planar
-  AVS_CS_YV12  = AVS_CS_GENERIC_YUV420 | AVS_CS_SAMPLE_BITS_8,  // YVU 4:2:0 
planar
+  AVS_CS_YV24  = AVS_CS_GENERIC_YUV444 | AVS_CS_SAMPLE_BITS_8,  // YUV 4:4:4 
planar
+  AVS_CS_YV16  = AVS_CS_GENERIC_YUV422 | AVS_CS_SAMPLE_BITS_8,  // YUV 4:2:2 
planar
+  AVS_CS_YV12  = AVS_CS_GENERIC_YUV420 | AVS_CS_SAMPLE_BITS_8,  // YUV 4:2:0 
planar
   AVS_CS_I420  = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | 
AVS_CS_UPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2,  // YUV 4:2:0 
planar
   AVS_CS_IYUV  = AVS_CS_I420,
-  AVS_CS_YV411 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | 
AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_4,  // YVU 4:1:1 
planar
-  AVS_CS_YUV9  = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | 
AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_4 | AVS_CS_SUB_WIDTH_4,  // YVU 4:1:0 
planar
+  AVS_CS_YV411 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | 
AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_4,  // YUV 4:1:1 
planar
+  AVS_CS_YUV9  = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | 
AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_4 | AVS_CS_SUB_WIDTH_4,  // YUV 4:1:0 
planar
   AVS_CS_Y8= AVS_CS_GENERIC_Y | AVS_CS_SAMPLE_BITS_8,   // Y   4:0:0 
planar
 
   //-
   // AVS16: new planar constants go live! Experimental PF 160613
-  // 10-12-14 bit + planar RGB + BRG48/64 160725
+  // 10-12-14-16 bit + planar RGB + BGR48/64 160725
   AVS_CS_YUV444P10 = AVS_CS_GENERIC_YUV444 | AVS_CS_SAMPLE_BITS_10, // YUV 
4:4:4 10bit samples
   AVS_CS_YUV422P10 = AVS_CS_GENERIC_YUV422 | AVS_CS_SAMPLE_BITS_10, // YUV 
4:2:2 10bit samples
   AVS_CS_YUV420P10 = AVS_CS_GENERIC_YUV420 | AVS_CS_SAMPLE_BITS_10, // YUV 
4:2:0 10bit samples
@@ -246,9 +262,9 @