Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Tomas Härdin" <git@haerdin.se>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH 2/3] lavc/speedhqdec: Obey AVDISCARD_ALL
Date: Wed, 08 May 2024 14:42:56 +0200
Message-ID: <ed6d3af6d55c1eb6eeebf3d52098af4f374a286d.camel@haerdin.se> (raw)
In-Reply-To: <5c0eea5911c9db73182395f873af8e86653ac765.camel@haerdin.se>

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

Inspired by qoidec

/Tomas

[-- Attachment #2: 0002-lavc-speedhqdec-Obey-AVDISCARD_ALL.patch --]
[-- Type: text/x-patch, Size: 782 bytes --]

From ed49d383d40a9a4fad04b76bc7d86107c6350d9a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se>
Date: Wed, 8 May 2024 14:17:57 +0200
Subject: [PATCH 2/3] lavc/speedhqdec: Obey AVDISCARD_ALL

---
 libavcodec/speedhqdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c
index e54e25cb25..d6b1fff7a5 100644
--- a/libavcodec/speedhqdec.c
+++ b/libavcodec/speedhqdec.c
@@ -424,6 +424,9 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame,
         return AVERROR_INVALIDDATA;
     }
 
+    if (avctx->skip_frame >= AVDISCARD_ALL)
+        return avpkt->size;
+
     compute_quant_matrix(s->quant_matrix, 100 - quality);
 
     second_field_offset = AV_RL24(buf + 1);
-- 
2.39.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".

  reply	other threads:[~2024-05-08 12:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 12:42 [FFmpeg-devel] [PATCH 1/3] lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS Tomas Härdin
2024-05-08 12:42 ` Tomas Härdin [this message]
2024-05-08 12:43 ` [FFmpeg-devel] [PATCH 3/3] lavc/speedhqdec: Set AV_PICTURE_TYPE_I Tomas Härdin
2024-05-08 20:01   ` Marton Balint
2024-05-08 20:06     ` James Almer
2024-05-10 12:31       ` Tomas Härdin
2024-05-10 12:48         ` Andreas Rheinhardt
2024-05-11 23:07           ` Tomas Härdin
2024-05-13  6:57             ` Tomas Härdin
2024-05-08 12:46 ` [FFmpeg-devel] [PATCH 1/3] lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS James Almer
2024-05-08 12:48   ` 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=ed6d3af6d55c1eb6eeebf3d52098af4f374a286d.camel@haerdin.se \
    --to=git@haerdin.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