[FFmpeg-devel] [PATCH] avcodec/fic: Add skip_cursor AVOption
Michael Niedermayer
michaelni at gmx.at
Fri Jun 19 13:39:03 CEST 2015
On Thu, Jun 18, 2015 at 11:48:59AM +0000, Paul B Mahol wrote:
> On 6/18/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> > libavcodec/fic.c | 18 +++++++++++++++++-
> > 1 file changed, 17 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/fic.c b/libavcodec/fic.c
> > index 48e7a6e..13f15d3 100644
> > --- a/libavcodec/fic.c
> > +++ b/libavcodec/fic.c
> > @@ -22,6 +22,7 @@
> > */
> >
> > #include "libavutil/common.h"
> > +#include "libavutil/opt.h"
> > #include "avcodec.h"
> > #include "internal.h"
> > #include "get_bits.h"
> > @@ -36,6 +37,7 @@ typedef struct FICThreadContext {
> > } FICThreadContext;
> >
> > typedef struct FICContext {
> > + AVClass *class;
> > AVCodecContext *avctx;
> > AVFrame *frame;
> > AVFrame *final_frame;
> > @@ -51,6 +53,7 @@ typedef struct FICContext {
> > int num_slices, slice_h;
> >
> > uint8_t cursor_buf[4096];
> > + int skip_cursor;
> > } FICContext;
> >
> > static const uint8_t fic_qmat_hq[64] = {
> > @@ -263,7 +266,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void
> > *data,
> > int msize;
> > int tsize;
> > int cur_x, cur_y;
> > - int skip_cursor = 0;
> > + int skip_cursor = ctx->skip_cursor;
> > uint8_t *sdata;
> >
> > if ((ret = ff_reget_buffer(avctx, ctx->frame)) < 0)
> > @@ -452,6 +455,18 @@ static av_cold int fic_decode_init(AVCodecContext
> > *avctx)
> > return 0;
> > }
> >
> > +static const AVOption options[] = {
> > +{ "skip_cursor", "skip the cursor", offsetof(FICContext, skip_cursor),
> > AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, AV_OPT_FLAG_DECODING_PARAM |
> > AV_OPT_FLAG_VIDEO_PARAM },
> > +{ NULL },
> > +};
> > +
> > +static const AVClass fic_decoder_class = {
> > + "FIC decoder",
> > + av_default_item_name,
> > + options,
> > + LIBAVUTIL_VERSION_INT,
> > +};
> > +
>
> Please use designated initializer for AVClass.
changed
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150619/48b09195/attachment.asc>
More information about the ffmpeg-devel
mailing list