From: Nuo Mi <nuomi2021@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Frank Plowman <post@frankplowman.com>, Nuo Mi <nuomi2021@gmail.com> Subject: [FFmpeg-devel] [PATCH 1/3] lavc/vvcdec: remove unneeded set_output_format Date: Sun, 26 Jan 2025 11:10:19 +0800 Message-ID: <20250126031021.309218-1-nuomi2021@gmail.com> (raw) 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".
next reply other threads:[~2025-01-26 3:10 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-01-26 3:10 Nuo Mi [this message] 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
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=20250126031021.309218-1-nuomi2021@gmail.com \ --to=nuomi2021@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=post@frankplowman.com \ /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