X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Favcodec.h;h=b6a4b0ec240fac4f312b759cfcaefc0700847e25;hb=a0958949ebe115e5dd661c9292c29a8ab7958c22;hp=fe83fef5de124d1e9ed3e801ab3cf313d251da50;hpb=7eb40d85f2258df31287dc7a0704cb35e356c077;p=ffmpeg diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index fe83fef5de1..b6a4b0ec240 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -30,11 +30,11 @@ #include "libavutil/samplefmt.h" #include "libavutil/avutil.h" #include "libavutil/cpu.h" +#include "libavutil/channel_layout.h" #include "libavutil/dict.h" #include "libavutil/log.h" #include "libavutil/pixfmt.h" #include "libavutil/rational.h" -#include "libavutil/audioconvert.h" #include "libavcodec/version.h" /** @@ -267,6 +267,7 @@ enum AVCodecID { AV_CODEC_ID_MTS2, AV_CODEC_ID_CLLC, AV_CODEC_ID_MSS2, + AV_CODEC_ID_BRENDER_PIX= MKBETAG('B','P','I','X'), AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'), AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'), AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'), @@ -315,6 +316,9 @@ enum AVCodecID { AV_CODEC_ID_PCM_LXF, AV_CODEC_ID_S302M, AV_CODEC_ID_PCM_S8_PLANAR, + AV_CODEC_ID_PCM_S24LE_PLANAR = MKBETAG(24,'P','S','P'), + AV_CODEC_ID_PCM_S32LE_PLANAR = MKBETAG(32,'P','S','P'), + AV_CODEC_ID_PCM_S16BE_PLANAR = MKBETAG('P','S','P',16), /* various ADPCM codecs */ AV_CODEC_ID_ADPCM_IMA_QT = 0x11000, @@ -348,6 +352,8 @@ enum AVCodecID { AV_CODEC_ID_ADPCM_G722, AV_CODEC_ID_ADPCM_IMA_APC, AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'), + AV_CODEC_ID_ADPCM_AFC = MKBETAG('A','F','C',' '), + AV_CODEC_ID_ADPCM_IMA_OKI = MKBETAG('O','K','I',' '), /* AMR */ AV_CODEC_ID_AMR_NB = 0x12000, @@ -2400,7 +2406,12 @@ typedef struct AVCodecContext { * * Decoders cannot use the buffer after returning from * avcodec_decode_audio4(), so they will not call release_buffer(), as it - * is assumed to be released immediately upon return. + * is assumed to be released immediately upon return. In some rare cases, + * a decoder may need to call get_buffer() more than once in a single + * call to avcodec_decode_audio4(). In that case, when get_buffer() is + * called again after it has already been called once, the previously + * acquired buffer is assumed to be released at that time and may not be + * reused by the decoder. * * As a convenience, av_samples_get_buffer_size() and * av_samples_fill_arrays() in libavutil may be used by custom get_buffer() @@ -4579,6 +4590,21 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, * @{ */ +/** + * Utility function to access log2_chroma_w log2_chroma_h from + * the pixel format AVPixFmtDescriptor. + * + * This function asserts that pix_fmt is valid. See av_pix_fmt_get_chroma_sub_sample + * for one that returns a failure code and continues in case of invalid + * pix_fmts. + * + * @param[in] pix_fmt the pixel format + * @param[out] h_shift store log2_chroma_h + * @param[out] v_shift store log2_chroma_w + * + * @see av_pix_fmt_get_chroma_sub_sample + */ + void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift); /** @@ -4759,7 +4785,9 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, * @param buf buffer to use for frame data * @param buf_size size of buffer * @param align plane size sample alignment (0 = default) - * @return 0 on success, negative error code on failure + * @return >=0 on success, negative error code on failure + * @todo return the size of the allocated frame size in case of + * success, at the next libavutil bump */ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, enum AVSampleFormat sample_fmt, const uint8_t *buf,