[FFmpeg-devel] [PATCH] V210 decoder and encoder
Baptiste Coudurier
baptiste.coudurier
Mon May 11 21:40:08 CEST 2009
On 5/11/2009 12:21 PM, Michael Niedermayer wrote:
> 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 ...
What do you think of ?
v210 requires this, it only stores 10bits.
> [...]
>> 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?
>
Yes, mingw 32 requires this for pthreadgc2 static, don't ask me why, it
just is permanently in my tree, and I forgot to manually hand edit the
patch afterward :>
And yes I'm on windows to double check against quicktime everytime :>
--
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list