[FFmpeg-devel] [PATCH] libavutil/video_enc_params: add block type

Yongle Lin yonglel at google.com
Wed Jul 8 23:19:48 EEST 2020


On Tue, Jul 7, 2020 at 12:59 AM Anton Khirnov <anton at khirnov.net> wrote:

> Quoting Yongle Lin (2020-07-06 23:08:17)
> > add block type field to AVVideoBlockParams so we could either export or
> visualize it later.
> > ---
> >  libavutil/video_enc_params.h | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
>
> We generally require new APIs to be immediately useful. So in this case,
> there should also be a patch that makes some decoder export those
> fields.
>

I plan to send separate patches for H264 and VP9 to export type data and
another patch to visualize the block type in codecview filter when I get
approved for this patch.
Do you want me to add the "decoder export" code to this patch so that it
will be immediately useful? Thanks


> >
> > diff --git a/libavutil/video_enc_params.h b/libavutil/video_enc_params.h
> > index 43fa443154..55b9fc4031 100644
> > --- a/libavutil/video_enc_params.h
> > +++ b/libavutil/video_enc_params.h
> > @@ -101,6 +101,21 @@ typedef struct AVVideoEncParams {
> >      int32_t delta_qp[4][2];
> >  } AVVideoEncParams;
> >
> > +typedef struct MacroBlockType {
> > +    /**
> > +     * Is intra prediction
> > +     */
> > +    int intra;
> > +    /**
> > +     * Skip flag
> > +     */
> > +    int skip;
>
> These structures are stored per-block, so it seems pretty wasteful to
> spend a whole int (4 bytes) when only one bit is used.
>
> --
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list