[FFmpeg-devel] [PATCH] V210 decoder and encoder

Michael Niedermayer michaelni
Mon May 11 21:21:15 CEST 2009


On Sat, May 09, 2009 at 01:30:40PM -0700, Baptiste Coudurier wrote:
> Hi
> 
> $subject.
> 
> -- 
> Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> FFmpeg maintainer                                  http://www.ffmpeg.org

>  Changelog              |    1 
>  libavcodec/Makefile    |    2 
>  libavcodec/allcodecs.c |   15 ++
>  libavcodec/avcodec.h   |    3 
>  libavcodec/v210.c      |  258 +++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 278 insertions(+), 1 deletion(-)
> 164b26551774be7306c36786b5af2f1aeb7e771f  v210.patch
[...]
> +#if CONFIG_V210_ENCODER
> +static av_cold int encode_init(AVCodecContext *avctx)
> +{
> +    if (avctx->width & 1) {
> +        av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n");
> +        return -1;
> +    }
> +
> +    if (avctx->pix_fmt != PIX_FMT_YUV422P16 ||

> +        avctx->bits_per_raw_sample != 10) {
> +        av_log(avctx, AV_LOG_ERROR, "v210 needs YUV 4:2:2 10bit\n");

i wonder if this is not a little too strict ...

[...]
> Index: libavcodec/allcodecs.c
> ===================================================================
> --- libavcodec/allcodecs.c	(revision 18773)
> +++ libavcodec/allcodecs.c	(working copy)
> @@ -45,6 +45,14 @@
>            extern AVBitStreamFilter x##_bsf; \
>            if(CONFIG_##X##_BSF)     av_register_bitstream_filter(&x##_bsf); }
>  
> +#ifdef PTW32_STATIC_LIB
> +static void detach_ptw32(void)
> +{
> +    pthread_win32_thread_detach_np();
> +    pthread_win32_process_detach_np();
> +}
> +#endif
> +
>  void avcodec_register_all(void)
>  {
>      static int initialized;
> @@ -53,6 +61,12 @@
>          return;
>      initialized = 1;
>  
> +#ifdef PTW32_STATIC_LIB
> +    pthread_win32_process_attach_np();
> +    pthread_win32_thread_attach_np();
> +    atexit(detach_ptw32);
> +#endif
> +
>      /* hardware accelerators */
>      REGISTER_HWACCEL (H263_VAAPI, h263_vaapi);
>      REGISTER_HWACCEL (MPEG2_VAAPI, mpeg2_vaapi);

ehm?

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

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090511/a07d14ab/attachment.pgp>



More information about the ffmpeg-devel mailing list