X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdecode.h;h=dee2543b1cf719a3b3666e22d4ac77d44491f3bb;hb=90262f3fb4afe4b903888e45cc40e2116cb69683;hp=c3e0e82f4cdacc36c4bdd124022349c62b2b74ea;hpb=67d466d09b105b2b1d3d8da4c21d8975925741ae;p=ffmpeg diff --git a/libavcodec/decode.h b/libavcodec/decode.h index c3e0e82f4cd..dee2543b1cf 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -64,9 +64,10 @@ typedef struct FrameDecodeData { */ int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt); -int ff_decode_bsfs_init(AVCodecContext *avctx); - -void ff_decode_bsfs_uninit(AVCodecContext *avctx); +/** + * Set various frame properties from the codec context / packet data. + */ +int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame); /** * Make sure avctx.hw_frames_ctx is set. If it's not set, the function will @@ -78,4 +79,19 @@ int ff_decode_get_hw_frames_ctx(AVCodecContext *avctx, int ff_attach_decode_data(AVFrame *frame); +/** + * Check whether the side-data of src contains a palette of + * size AVPALETTE_SIZE; if so, copy it to dst and return 1; + * else return 0. + * Also emit an error message upon encountering a palette + * with invalid size. + */ +int ff_copy_palette(void *dst, const AVPacket *src, void *logctx); + +/** + * Perform decoder initialization and validation. + * Called when opening the decoder, before the AVCodec.init() call. + */ +int ff_decode_preinit(AVCodecContext *avctx); + #endif /* AVCODEC_DECODE_H */