You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avfilter/codecview: Enable QP visualization for H.264
The codecviewfilter, when used with qp=1, did not display quantization parameter values for H.264 streams because the QP table extraction was restricted to MPEG-2 video. This patch enables H.264 support by updating ff_qp_table_extractto accept AV_VIDEO_ENC_PARAMS_H264. This allows for correct QP overlay on H.264 video Signed-off-by: Timothee <timothee.informatique@regaud-chapuy.fr> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
e6298e0759
commit
c94a419e32
@ -39,8 +39,9 @@ int ff_qp_table_extract(AVFrame *frame, int8_t **table, int *table_w, int *table
|
||||
sd = av_frame_get_side_data(frame, AV_FRAME_DATA_VIDEO_ENC_PARAMS);
|
||||
if (!sd)
|
||||
return 0;
|
||||
par = (AVVideoEncParams*)sd->data;
|
||||
if (par->type != AV_VIDEO_ENC_PARAMS_MPEG2 ||
|
||||
par = (AVVideoEncParams *)sd->data;
|
||||
if ((par->type != AV_VIDEO_ENC_PARAMS_MPEG2 &&
|
||||
par->type != AV_VIDEO_ENC_PARAMS_H264) ||
|
||||
(par->nb_blocks != 0 && par->nb_blocks != nb_mb))
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
|
Reference in New Issue
Block a user