[FFmpeg-devel] [PATCH v2 7/8] lavc/vvc_dec: Add hardware decode API
Anton Khirnov
anton at khirnov.net
Mon Sep 23 17:31:17 EEST 2024
Quoting Wang, Fei W (2024-09-23 10:40:14)
> On Mon, 2024-09-23 at 06:37 +0200, Anton Khirnov wrote:
> > Quoting fei.w.wang-at-intel.com at ffmpeg.org (2024-09-18 09:10:30)
> > > static void export_frame_params(VVCContext *s, const
> > > VVCFrameContext *fc)
> > > {
> > > AVCodecContext *c = s->avctx;
> > > const VVCSPS *sps = fc->ps.sps;
> > > const VVCPPS *pps = fc->ps.pps;
> > >
> > > - c->pix_fmt = sps->pix_fmt;
> > > - c->coded_width = pps->width;
> > > - c->coded_height = pps->height;
> > > - c->width = pps->width - ((pps->r-
> > > >pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) <<
> > > sps->hshift[CHROMA]);
> > > - c->height = pps->height - ((pps->r-
> > > >pps_conf_win_top_offset + pps->r->pps_conf_win_bottom_offset) <<
> > > sps->vshift[CHROMA]);
> > > + // Reset HW config if pix_fmt/w/h change.
> > > + if (s->pix_fmt != sps->pix_fmt || c->coded_width != pps->width
> > > || c->coded_height != pps->height) {
> > > + c->coded_width = pps->width;
> > > + c->coded_height = pps->height;
> > > + c->pix_fmt = get_format(c, sps);
> > > + s->pix_fmt = sps->pix_fmt;
> >
> > ????
>
> s->pix_fmt is used to detect if frame pixel format is change which is
> samilar with vp9. Any concern on this?
Oh, I missed that the two lines assign to different structs. Never mind
then.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list