[FFmpeg-devel] [PATCH] lsws: make format_entries a library internal symbol

Michael Niedermayer michaelni at gmx.at
Mon Jul 25 21:34:30 CEST 2011


On Mon, Jul 25, 2011 at 01:11:45PM +0200, Stefano Sabatini wrote:
> 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;

uint8_t would avoid a few bytes
1 uint8 with flags would be even compacter



> +
> +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;

this should be removed i think

LGTM otherwise

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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110725/7c05de8a/attachment.asc>


More information about the ffmpeg-devel mailing list