Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/3] lavc/vvcdec: remove unneeded set_output_format
@ 2025-01-26  3:10 Nuo Mi
  2025-01-26  3:10 ` [FFmpeg-devel] [PATCH 2/3] lavc/vvcdec: remove unneeded VVCContext->pix_fmt Nuo Mi
  2025-01-26  3:10 ` [FFmpeg-devel] [PATCH 3/3] lavc/vvcdec: ensure slices contain nonzero CTUs Nuo Mi
  0 siblings, 2 replies; 6+ messages in thread
From: Nuo Mi @ 2025-01-26  3:10 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Frank Plowman, Nuo Mi

Downstream can determine the format from the output frame format

Co-authored-by: Frank Plowman <post@frankplowman.com>
---
 libavcodec/vvc/dec.c | 23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index 1cb168de7e..daf537294f 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -961,19 +961,6 @@ fail:
     return ret;
 }
 
-static int set_output_format(const VVCContext *s, const AVFrame *output)
-{
-    AVCodecContext *c = s->avctx;
-    int ret;
-
-    if (output->width != c->width || output->height != c->height) {
-        if ((ret = ff_set_dimensions(c, output->width, output->height)) < 0)
-            return ret;
-    }
-    c->pix_fmt = output->format;
-    return 0;
-}
-
 static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
 {
     VVCFrameContext *delayed = get_frame_context(s, s->fcs, s->nb_frames - s->nb_delayed);
@@ -981,9 +968,7 @@ static int wait_delayed_frame(VVCContext *s, AVFrame *output, int *got_output)
 
     if (!ret && delayed->output_frame->buf[0] && output) {
         av_frame_move_ref(output, delayed->output_frame);
-        ret = set_output_format(s, output);
-        if (!ret)
-            *got_output = 1;
+        *got_output = 1;
     }
     s->nb_delayed--;
 
@@ -1034,11 +1019,7 @@ static int get_decoded_frame(VVCContext *s, AVFrame *output, int *got_output)
         ret = ff_vvc_output_frame(s, last, output, 0, 1);
         if (ret < 0)
             return ret;
-        if (ret) {
-            *got_output = ret;
-            if ((ret = set_output_format(s, output)) < 0)
-                return ret;
-        }
+        *got_output = ret;
     }
     return 0;
 }
-- 
2.34.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-29 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-26  3:10 [FFmpeg-devel] [PATCH 1/3] lavc/vvcdec: remove unneeded set_output_format Nuo Mi
2025-01-26  3:10 ` [FFmpeg-devel] [PATCH 2/3] lavc/vvcdec: remove unneeded VVCContext->pix_fmt Nuo Mi
2025-01-27  2:33   ` Wang, Fei W
2025-01-26  3:10 ` [FFmpeg-devel] [PATCH 3/3] lavc/vvcdec: ensure slices contain nonzero CTUs Nuo Mi
2025-01-29  8:40   ` Frank Plowman
2025-01-29 10:30     ` Nuo Mi

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