You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavc/vvcdec: remove unneeded VVCContext->pix_fmt
AVCodecContext->sw_pix_fmt is used to hold the software pixel format. Co-authored-by: Frank Plowman <post@frankplowman.com>
This commit is contained in:
@@ -799,18 +799,15 @@ static int export_frame_params(VVCContext *s, const VVCFrameContext *fc)
|
|||||||
AVCodecContext *c = s->avctx;
|
AVCodecContext *c = s->avctx;
|
||||||
const VVCSPS *sps = fc->ps.sps;
|
const VVCSPS *sps = fc->ps.sps;
|
||||||
const VVCPPS *pps = fc->ps.pps;
|
const VVCPPS *pps = fc->ps.pps;
|
||||||
int ret;
|
|
||||||
|
|
||||||
// Reset HW config if pix_fmt/w/h change.
|
// Reset the format if pix_fmt/w/h change.
|
||||||
if (s->pix_fmt != sps->pix_fmt || c->coded_width != pps->width || c->coded_height != pps->height) {
|
if (c->sw_pix_fmt != sps->pix_fmt || c->coded_width != pps->width || c->coded_height != pps->height) {
|
||||||
c->coded_width = pps->width;
|
c->coded_width = pps->width;
|
||||||
c->coded_height = pps->height;
|
c->coded_height = pps->height;
|
||||||
ret = get_format(c, sps);
|
c->sw_pix_fmt = sps->pix_fmt;
|
||||||
if (ret < 0)
|
c->pix_fmt = get_format(c, sps);
|
||||||
return ret;
|
if (c->pix_fmt < 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
c->pix_fmt = ret;
|
|
||||||
s->pix_fmt = sps->pix_fmt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
c->width = pps->width - ((pps->r->pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) << sps->hshift[CHROMA]);
|
c->width = pps->width - ((pps->r->pps_conf_win_left_offset + pps->r->pps_conf_win_right_offset) << sps->hshift[CHROMA]);
|
||||||
@@ -1138,8 +1135,6 @@ static av_cold int vvc_decode_init(AVCodecContext *avctx)
|
|||||||
GDR_SET_RECOVERED(s);
|
GDR_SET_RECOVERED(s);
|
||||||
ff_thread_once(&init_static_once, init_default_scale_m);
|
ff_thread_once(&init_static_once, init_default_scale_m);
|
||||||
|
|
||||||
s->pix_fmt = AV_PIX_FMT_NONE;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -241,8 +241,6 @@ typedef struct VVCContext {
|
|||||||
|
|
||||||
uint64_t nb_frames; ///< processed frames
|
uint64_t nb_frames; ///< processed frames
|
||||||
int nb_delayed; ///< delayed frames
|
int nb_delayed; ///< delayed frames
|
||||||
|
|
||||||
enum AVPixelFormat pix_fmt; ///< pix format of current frame
|
|
||||||
} VVCContext ;
|
} VVCContext ;
|
||||||
|
|
||||||
#endif /* AVCODEC_VVC_DEC_H */
|
#endif /* AVCODEC_VVC_DEC_H */
|
||||||
|
Reference in New Issue
Block a user