]> git.sesse.net Git - vlc/commitdiff
Added vlc_fourcc_IsYUV.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 8 Aug 2009 23:27:08 +0000 (01:27 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 8 Aug 2009 23:27:08 +0000 (01:27 +0200)
include/vlc_fourcc.h
src/libvlccore.sym
src/misc/fourcc.c

index 680eed9e84ecfb78a0f9916ab3caf3a6254efeb2..46edc4edbaffa7268c9a7471e7b3901743bff38e 100644 (file)
@@ -355,10 +355,15 @@ VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i
  * It returns a list (terminated with the value 0) of YUV fourccs in
  * decreasing priority order for the given chroma.
  *
- * It will always return a non NULL pointer that must not freed.
+ * It will always return a non NULL pointer that must not be freed.
  */
 VLC_EXPORT( const vlc_fourcc_t *, vlc_fourcc_GetYUVFallback, ( vlc_fourcc_t ) );
 
+/**
+ * It returns true if the given fourcc is YUV and false otherwise.
+ */
+VLC_EXPORT( bool, vlc_fourcc_IsYUV, ( vlc_fourcc_t ) );
+
 /**
  * It returns true if the two fourccs are equivalent if their U&V planes are
  * swapped.
index b332277c678f5c17c9b57fdff5904b9f52267726..d629a9da691be45b540f279fcf7d1e58cd1ccb01 100644 (file)
@@ -483,6 +483,7 @@ vlc_fourcc_GetCodec
 vlc_fourcc_GetCodecAudio
 vlc_fourcc_GetCodecFromString
 vlc_fourcc_GetDescription
+vlc_fourcc_IsYUV
 vlc_fourcc_GetYUVFallback
 vlc_fourcc_AreUVPlanesSwapped
 vlc_gai_strerror
index d29e14c4bd33e9542d2768317c7fdb3f4d93d070..c503f341c07284951e011adaf70e674ed08edfdf 100644 (file)
@@ -1428,8 +1428,7 @@ bool vlc_fourcc_AreUVPlanesSwapped( vlc_fourcc_t a, vlc_fourcc_t b )
             ((b == VLC_CODEC_I420 || b == VLC_CODEC_J420) && a == VLC_CODEC_YV12));
 }
 
-#if 0
-static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
+bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
 {
     for( unsigned i = 0; p_list_YUV[i]; i++ )
     {
@@ -1438,4 +1437,4 @@ static inline bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
     }
     return false;
 }
-#endif
+