From: "Tomas Härdin" <tjoppen@acc.umu.se> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] lavc/libopenjpegdec: Enable slice threading Date: Tue, 31 May 2022 11:17:33 +0200 Message-ID: <322cd4ca4823f4d20a8ff0f3b2c668f129910981.camel@acc.umu.se> (raw) [-- Attachment #1: Type: text/plain, Size: 1 bytes --] [-- Attachment #2: 0001-lavc-libopenjpegdec-Enable-slice-threading.patch --] [-- Type: text/x-patch, Size: 1392 bytes --] From 230f9e23072d971f184b90a8f108517fc866461f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se> Date: Tue, 31 May 2022 10:54:08 +0200 Subject: [PATCH] lavc/libopenjpegdec: Enable slice threading --- libavcodec/libopenjpegdec.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index 58715b43ee..649aadad42 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -369,6 +369,10 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, AVFrame *picture, // Tie decoder with decoding parameters opj_setup_decoder(dec, &ctx->dec_params); + if (avctx->active_thread_type == FF_THREAD_SLICE) { + opj_codec_set_threads(dec, avctx->thread_count); + } + stream = opj_stream_default_create(OPJ_STREAM_READ); if (!stream) { @@ -505,7 +509,7 @@ const FFCodec ff_libopenjpeg_decoder = { .p.long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), .p.type = AVMEDIA_TYPE_VIDEO, .p.id = AV_CODEC_ID_JPEG2000, - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, .p.max_lowres = 31, .p.priv_class = &openjpeg_class, .p.wrapper_name = "libopenjpeg", -- 2.30.2 [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2022-05-31 9:17 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-31 9:17 Tomas Härdin [this message] 2022-06-01 14:20 ` Tomas Härdin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=322cd4ca4823f4d20a8ff0f3b2c668f129910981.camel@acc.umu.se \ --to=tjoppen@acc.umu.se \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git