[FFmpeg-devel] [PATCH] lsws: make format_entries a library internal symbol
Stefano Sabatini
stefano.sabatini-lala at poste.it
Mon Jul 25 13:11:45 CEST 2011
This way it can be accessed from the rest of libswscale.
This is required as I plan to add pix-fmt-libswscale specific
information to the array.
---
libswscale/swscale_internal.h | 6 ++++++
libswscale/utils.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 30dec99..e39bb31 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -57,6 +57,12 @@
struct SwsContext;
+typedef struct SwsFormatEntry {
+ int is_supported_in, is_supported_out;
+} SwsFormatEntry;
+
+extern const SwsFormatEntry ff_sws_format_entries[];
+
typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t* src[],
int srcStride[], int srcSliceY, int srcSliceH,
uint8_t* dst[], int dstStride[]);
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 0f5829b..987aa82 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -70,7 +70,7 @@ typedef struct FormatEntry {
int is_supported_in, is_supported_out;
} FormatEntry;
-const static FormatEntry format_entries[PIX_FMT_NB] = {
+const SwsFormatEntry ff_sws_format_entries[PIX_FMT_NB] = {
[PIX_FMT_YUV420P] = { 1 , 1 },
[PIX_FMT_YUYV422] = { 1 , 1 },
[PIX_FMT_RGB24] = { 1 , 1 },
@@ -142,12 +142,12 @@ const static FormatEntry format_entries[PIX_FMT_NB] = {
int sws_isSupportedInput(enum PixelFormat pix_fmt)
{
- return format_entries[pix_fmt].is_supported_in;
+ return ff_sws_format_entries[pix_fmt].is_supported_in;
}
int sws_isSupportedOutput(enum PixelFormat pix_fmt)
{
- return format_entries[pix_fmt].is_supported_out;
+ return ff_sws_format_entries[pix_fmt].is_supported_out;
}
extern const int32_t ff_yuv2rgb_coeffs[8][4];
--
1.7.2.5
More information about the ffmpeg-devel
mailing list