Quoting fei.w.wang-at-intel....@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;

????

Also, get_format() can fail and return AV_PIX_FMT_NONE.


-- 
Anton Khirnov
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to