Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>tags/n0.8
| @@ -13,6 +13,9 @@ libavutil: 2011-04-18 | |||||
| API changes, most recent first: | API changes, most recent first: | ||||
| 2011-04-21 - XXXXXX - lavc 53.1.0 - avcodec.h | |||||
| Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading. | |||||
| 2011-04-15 - lavc 52.120.0 - avcodec.h | 2011-04-15 - lavc 52.120.0 - avcodec.h | ||||
| AVPacket structure got additional members for passing side information: | AVPacket structure got additional members for passing side information: | ||||
| 4de339e introduce side information for AVPacket | 4de339e introduce side information for AVPacket | ||||
| @@ -676,6 +676,10 @@ typedef struct RcOverride{ | |||||
| * Codec supports frame-level multithreading. | * Codec supports frame-level multithreading. | ||||
| */ | */ | ||||
| #define CODEC_CAP_FRAME_THREADS 0x1000 | #define CODEC_CAP_FRAME_THREADS 0x1000 | ||||
| /** | |||||
| * Codec supports slice-based (or partition-based) multithreading. | |||||
| */ | |||||
| #define CODEC_CAP_SLICE_THREADS 0x2000 | |||||
| //The following defines may change, don't expect compatibility if you use them. | //The following defines may change, don't expect compatibility if you use them. | ||||
| #define MB_TYPE_INTRA4x4 0x0001 | #define MB_TYPE_INTRA4x4 0x0001 | ||||
| @@ -869,6 +869,7 @@ AVCodec ff_dnxhd_encoder = { | |||||
| dnxhd_encode_init, | dnxhd_encode_init, | ||||
| dnxhd_encode_picture, | dnxhd_encode_picture, | ||||
| dnxhd_encode_end, | dnxhd_encode_end, | ||||
| .capabilities = CODEC_CAP_SLICE_THREADS, | |||||
| .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_NONE}, | .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_NONE}, | ||||
| .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), | .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), | ||||
| .priv_class = &class, | .priv_class = &class, | ||||
| @@ -1297,6 +1297,7 @@ AVCodec ff_dvvideo_encoder = { | |||||
| sizeof(DVVideoContext), | sizeof(DVVideoContext), | ||||
| dvvideo_init_encoder, | dvvideo_init_encoder, | ||||
| dvvideo_encode_frame, | dvvideo_encode_frame, | ||||
| .capabilities = CODEC_CAP_SLICE_THREADS, | |||||
| .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_YUV411P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, PIX_FMT_NONE}, | .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_YUV411P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, PIX_FMT_NONE}, | ||||
| .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), | .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), | ||||
| }; | }; | ||||
| @@ -1312,7 +1313,7 @@ AVCodec ff_dvvideo_decoder = { | |||||
| NULL, | NULL, | ||||
| dvvideo_close, | dvvideo_close, | ||||
| dvvideo_decode_frame, | dvvideo_decode_frame, | ||||
| CODEC_CAP_DR1, | |||||
| CODEC_CAP_DR1 | CODEC_CAP_SLICE_THREADS, | |||||
| NULL, | NULL, | ||||
| .max_lowres = 3, | .max_lowres = 3, | ||||
| .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), | .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), | ||||
| @@ -1795,7 +1795,7 @@ AVCodec ff_ffv1_decoder = { | |||||
| NULL, | NULL, | ||||
| common_end, | common_end, | ||||
| decode_frame, | decode_frame, | ||||
| CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/, | |||||
| CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/ | CODEC_CAP_SLICE_THREADS, | |||||
| NULL, | NULL, | ||||
| .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), | .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), | ||||
| }; | }; | ||||
| @@ -1809,6 +1809,7 @@ AVCodec ff_ffv1_encoder = { | |||||
| encode_init, | encode_init, | ||||
| encode_frame, | encode_frame, | ||||
| common_end, | common_end, | ||||
| .capabilities = CODEC_CAP_SLICE_THREADS, | |||||
| .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_NONE}, | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_NONE}, | ||||
| .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), | .long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), | ||||
| }; | }; | ||||
| @@ -3426,7 +3426,8 @@ AVCodec ff_h264_decoder = { | |||||
| NULL, | NULL, | ||||
| ff_h264_decode_end, | ff_h264_decode_end, | ||||
| decode_frame, | decode_frame, | ||||
| /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY, | |||||
| /*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_DELAY | | |||||
| CODEC_CAP_SLICE_THREADS, | |||||
| .flush= flush_dpb, | .flush= flush_dpb, | ||||
| .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), | .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10"), | ||||
| .profiles = NULL_IF_CONFIG_SMALL(profiles), | .profiles = NULL_IF_CONFIG_SMALL(profiles), | ||||
| @@ -2523,7 +2523,7 @@ AVCodec ff_mpeg2video_decoder = { | |||||
| NULL, | NULL, | ||||
| mpeg_decode_end, | mpeg_decode_end, | ||||
| mpeg_decode_frame, | mpeg_decode_frame, | ||||
| CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, | |||||
| CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, | |||||
| .flush= flush, | .flush= flush, | ||||
| .max_lowres= 3, | .max_lowres= 3, | ||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), | ||||
| @@ -2540,7 +2540,7 @@ AVCodec ff_mpegvideo_decoder = { | |||||
| NULL, | NULL, | ||||
| mpeg_decode_end, | mpeg_decode_end, | ||||
| mpeg_decode_frame, | mpeg_decode_frame, | ||||
| CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY, | |||||
| CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, | |||||
| .flush= flush, | .flush= flush, | ||||
| .max_lowres= 3, | .max_lowres= 3, | ||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | ||||
| @@ -940,7 +940,7 @@ AVCodec ff_mpeg1video_encoder = { | |||||
| MPV_encode_end, | MPV_encode_end, | ||||
| .supported_framerates= ff_frame_rate_tab+1, | .supported_framerates= ff_frame_rate_tab+1, | ||||
| .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | ||||
| .capabilities= CODEC_CAP_DELAY, | |||||
| .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, | |||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-1 video"), | ||||
| }; | }; | ||||
| @@ -954,6 +954,6 @@ AVCodec ff_mpeg2video_encoder = { | |||||
| MPV_encode_end, | MPV_encode_end, | ||||
| .supported_framerates= ff_frame_rate_tab+1, | .supported_framerates= ff_frame_rate_tab+1, | ||||
| .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE}, | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE}, | ||||
| .capabilities= CODEC_CAP_DELAY, | |||||
| .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, | |||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-2 video"), | ||||
| }; | }; | ||||
| @@ -1347,6 +1347,6 @@ AVCodec ff_mpeg4_encoder = { | |||||
| MPV_encode_picture, | MPV_encode_picture, | ||||
| MPV_encode_end, | MPV_encode_end, | ||||
| .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | ||||
| .capabilities= CODEC_CAP_DELAY, | |||||
| .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, | |||||
| .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), | .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), | ||||
| }; | }; | ||||
| @@ -3800,6 +3800,7 @@ AVCodec ff_h263p_encoder = { | |||||
| MPV_encode_init, | MPV_encode_init, | ||||
| MPV_encode_picture, | MPV_encode_picture, | ||||
| MPV_encode_end, | MPV_encode_end, | ||||
| .capabilities = CODEC_CAP_SLICE_THREADS, | |||||
| .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | ||||
| .long_name= NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), | .long_name= NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), | ||||
| }; | }; | ||||
| @@ -877,7 +877,8 @@ static void validate_thread_parameters(AVCodecContext *avctx) | |||||
| avctx->active_thread_type = 0; | avctx->active_thread_type = 0; | ||||
| } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) { | } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) { | ||||
| avctx->active_thread_type = FF_THREAD_FRAME; | avctx->active_thread_type = FF_THREAD_FRAME; | ||||
| } else if (avctx->thread_type & FF_THREAD_SLICE) { | |||||
| } else if (avctx->codec->capabilities & CODEC_CAP_SLICE_THREADS && | |||||
| avctx->thread_type & FF_THREAD_SLICE) { | |||||
| avctx->active_thread_type = FF_THREAD_SLICE; | avctx->active_thread_type = FF_THREAD_SLICE; | ||||
| } | } | ||||
| } | } | ||||
| @@ -21,7 +21,7 @@ | |||||
| #define AVCODEC_VERSION_H | #define AVCODEC_VERSION_H | ||||
| #define LIBAVCODEC_VERSION_MAJOR 53 | #define LIBAVCODEC_VERSION_MAJOR 53 | ||||
| #define LIBAVCODEC_VERSION_MINOR 0 | |||||
| #define LIBAVCODEC_VERSION_MINOR 1 | |||||
| #define LIBAVCODEC_VERSION_MICRO 0 | #define LIBAVCODEC_VERSION_MICRO 0 | ||||
| #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | ||||