[FFmpeg-devel] [PATCH] vda: set destination image buffer attributes

Michael Niedermayer michaelni at gmx.at
Wed Nov 9 13:34:41 CET 2011


On Wed, Nov 09, 2011 at 09:04:39AM +0100, Sebastien Zwickert wrote:
> Hi,
> 
> The patch in attachment set the destination image buffer attributes in VDADecoderCreate
> as vda is free  to choose the 'best' output format depending on Mac OS and hardware
> used if NULL is specified for this parameter.
> 
> Best regards,
> Sebastien.
> 

>  vda.c |   25 ++++++++++++++++++++++++-
>  1 file changed, 24 insertions(+), 1 deletion(-)
> 930ca663ec9702feb55271adfe22da45b6e03f23  0001-vda-set-destination-image-buffer-attributes.patch
> From 2a05a4738ffd6def8b6469bea837d9d12e66c78c Mon Sep 17 00:00:00 2001
> From: Sebastien Zwickert <dilaroga at free.fr>
> Date: Wed, 9 Nov 2011 08:57:13 +0100
> Subject: [PATCH] vda: set destination image buffer attributes.
> 
> ---
>  libavcodec/vda.c |   25 ++++++++++++++++++++++++-
>  1 files changed, 24 insertions(+), 1 deletions(-)
> 
> diff --git a/libavcodec/vda.c b/libavcodec/vda.c
> index 5fe8a48..60d5b59 100644
> --- a/libavcodec/vda.c
> +++ b/libavcodec/vda.c
> @@ -164,6 +164,10 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
>      CFNumberRef format;
>      CFDataRef avc_data;
>      CFMutableDictionaryRef config_info;
> +    CFMutableDictionaryRef buffer_attributes;
> +    CFMutableDictionaryRef io_surface_properties;
> +    OSType cv_pix_fmt_type;
> +    CFNumberRef cv_pix_fmt;
>  
>      if (av_lockmgr_register(vda_lock_operation))
>          return -1;
> @@ -185,8 +189,24 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
>      CFDictionarySetValue(config_info, kVDADecoderConfiguration_SourceFormat, format);
>      CFDictionarySetValue(config_info, kVDADecoderConfiguration_avcCData, avc_data);
>  
> +    buffer_attributes = (CFDictionaryCreateMutable(kCFAllocatorDefault,
> +                                                   2,
> +                                                   &kCFTypeDictionaryKeyCallBacks,
> +                                                   &kCFTypeDictionaryValueCallBacks));
> +    io_surface_properties = (CFDictionaryCreateMutable(kCFAllocatorDefault,
> +                                                       0,
> +                                                       &kCFTypeDictionaryKeyCallBacks,
> +                                                       &kCFTypeDictionaryValueCallBacks));

> +    cv_pix_fmt_type = kCVPixelFormatType_422YpCbCr8;

should this not be set depending on AVCodecContext.pix_fmt ?


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20111109/e38b654e/attachment.asc>


More information about the ffmpeg-devel mailing list