On 16/04/2025 08:12, Shiqi Zhu wrote:
h264bsd url https://github.com/oneam/h264bsd ./configure --enable-decoder="h264_bsd" --extra-cflags="-I<path>/h264bsd/src" --extra-ldflags="-L<path>/h264bsd/posix/lib" --extra-libs="-lh264bsd" Test ./ffmpeg -y -codec:v h264_bsd -i <path>/h264bsd/test/test_640x360.h264 ./test_640x360.yuv
Yes, but we already have the best and fastest H264 decoder out there, and (for no more than a year or so, until its patents expire and its made redundant), an libopenh264 backend.
Signed-off-by: Shiqi Zhu <hiccup...@gmail.com> --- libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/h264bsd_dec.c | 183 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 libavcodec/h264bsd_dec.c + +const FFCodec ff_h264_bsd_decoder = { + .p.name = "h264_bsd", + CODEC_LONG_NAME("h264bsd video decoder for ffmpeg"), + .p.type = AVMEDIA_TYPE_VIDEO, + .p.id = AV_CODEC_ID_H264, + .priv_data_size = sizeof(DecodeContext), + .init = h264_bsd_init_decoder, + .close = h264_bsd_close_decoder, + FF_CODEC_DECODE_CB(h264_bsd_decode_frame), + .flush = h264_bsd_flush, + .p.priv_class = &h264_bsd_dec_class, + .bsfs = "h264_mp4toannexb", + .p.capabilities = AV_CODEC_CAP_DELAY, + .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, + .p.wrapper_name = "ff_h264_bsd_decoder", + .caps_internal = FF_CODEC_CAP_EXPORTS_CROPPING, +}; \ No newline at end of file
^^
OpenPGP_0xA2FEA5F03F034464.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".