@ -34,6 +34,7 @@
# include "huffyuvencdsp.h"
# include "huffyuvencdsp.h"
# include "internal.h"
# include "internal.h"
# include "put_bits.h"
# include "put_bits.h"
# include "libavutil/opt.h"
# include "libavutil/pixdesc.h"
# include "libavutil/pixdesc.h"
static inline void diff_bytes ( HYuvContext * s , uint8_t * dst ,
static inline void diff_bytes ( HYuvContext * s , uint8_t * dst ,
@ -990,6 +991,27 @@ static av_cold int encode_end(AVCodecContext *avctx)
return 0 ;
return 0 ;
}
}
static const AVOption options [ ] = {
{ " non_deterministic " , " Allow multithreading for e.g. context=1 at the expense of determinism " ,
offsetof ( HYuvContext , non_determ ) , AV_OPT_TYPE_INT , { . i64 = 1 } ,
0 , 1 , AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM } ,
{ NULL } ,
} ;
static const AVClass normal_class = {
. class_name = " huffyuv " ,
. item_name = av_default_item_name ,
. option = options ,
. version = LIBAVUTIL_VERSION_INT ,
} ;
static const AVClass ff_class = {
. class_name = " ffvhuff " ,
. item_name = av_default_item_name ,
. option = options ,
. version = LIBAVUTIL_VERSION_INT ,
} ;
AVCodec ff_huffyuv_encoder = {
AVCodec ff_huffyuv_encoder = {
. name = " huffyuv " ,
. name = " huffyuv " ,
. long_name = NULL_IF_CONFIG_SMALL ( " Huffyuv / HuffYUV " ) ,
. long_name = NULL_IF_CONFIG_SMALL ( " Huffyuv / HuffYUV " ) ,
@ -1000,6 +1022,7 @@ AVCodec ff_huffyuv_encoder = {
. encode2 = encode_frame ,
. encode2 = encode_frame ,
. close = encode_end ,
. close = encode_end ,
. capabilities = CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY ,
. capabilities = CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY ,
. priv_class = & normal_class ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
AV_PIX_FMT_YUV422P , AV_PIX_FMT_RGB24 ,
AV_PIX_FMT_YUV422P , AV_PIX_FMT_RGB24 ,
AV_PIX_FMT_RGB32 , AV_PIX_FMT_NONE
AV_PIX_FMT_RGB32 , AV_PIX_FMT_NONE
@ -1017,6 +1040,7 @@ AVCodec ff_ffvhuff_encoder = {
. encode2 = encode_frame ,
. encode2 = encode_frame ,
. close = encode_end ,
. close = encode_end ,
. capabilities = CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY ,
. capabilities = CODEC_CAP_FRAME_THREADS | CODEC_CAP_INTRA_ONLY ,
. priv_class = & ff_class ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
AV_PIX_FMT_YUV420P , AV_PIX_FMT_YUV422P , AV_PIX_FMT_YUV444P , AV_PIX_FMT_YUV411P ,
AV_PIX_FMT_YUV420P , AV_PIX_FMT_YUV422P , AV_PIX_FMT_YUV444P , AV_PIX_FMT_YUV411P ,
AV_PIX_FMT_YUV410P , AV_PIX_FMT_YUV440P ,
AV_PIX_FMT_YUV410P , AV_PIX_FMT_YUV440P ,