AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows passing of packet-specific flags from demuxer to decoder, such as the keyframe flag, which appears necessary to playback corePNG P-frames. Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread "Google Summer of Code participation" on the mailinglist. Originally committed as revision 18351 to svn://svn.ffmpeg.org/ffmpeg/trunktags/v0.6
| @@ -677,8 +677,10 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length){ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FourXContext * const f = avctx->priv_data; | FourXContext * const f = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame *p, temp; | AVFrame *p, temp; | ||||
| @@ -58,8 +58,10 @@ typedef struct EightBpsContext { | |||||
| * Decode a frame | * Decode a frame | ||||
| * | * | ||||
| */ | */ | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) | |||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| EightBpsContext * const c = avctx->priv_data; | EightBpsContext * const c = avctx->priv_data; | ||||
| const unsigned char *encoded = buf; | const unsigned char *encoded = buf; | ||||
| unsigned char *pixptr, *pixptr_end; | unsigned char *pixptr, *pixptr_end; | ||||
| @@ -42,8 +42,10 @@ static const int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, | |||||
| /** decode a frame */ | /** decode a frame */ | ||||
| static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| EightSvxContext *esc = avctx->priv_data; | EightSvxContext *esc = avctx->priv_data; | ||||
| int16_t *out_data = data; | int16_t *out_data = data; | ||||
| int consumed = buf_size; | int consumed = buf_size; | ||||
| @@ -1604,7 +1604,9 @@ static int parse_adts_frame_header(AACContext * ac, GetBitContext * gb) { | |||||
| return size; | return size; | ||||
| } | } | ||||
| static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data_size, const uint8_t * buf, int buf_size) { | |||||
| static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data_size, AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AACContext * ac = avccontext->priv_data; | AACContext * ac = avccontext->priv_data; | ||||
| ChannelElement * che = NULL; | ChannelElement * che = NULL; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| @@ -59,8 +59,10 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx) | |||||
| static int aasc_decode_frame(AVCodecContext *avctx, | static int aasc_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AascContext *s = avctx->priv_data; | AascContext *s = avctx->priv_data; | ||||
| int compr, i, stride; | int compr, i, stride; | ||||
| @@ -1226,8 +1226,10 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) | |||||
| * Decode a single AC-3 frame. | * Decode a single AC-3 frame. | ||||
| */ | */ | ||||
| static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, | static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AC3DecodeContext *s = avctx->priv_data; | AC3DecodeContext *s = avctx->priv_data; | ||||
| int16_t *out_samples = (int16_t *)data; | int16_t *out_samples = (int16_t *)data; | ||||
| int blk, ch, err; | int blk, ch, err; | ||||
| @@ -877,8 +877,10 @@ static void xa_decode(short *out, const unsigned char *in, | |||||
| static int adpcm_decode_frame(AVCodecContext *avctx, | static int adpcm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| ADPCMContext *c = avctx->priv_data; | ADPCMContext *c = avctx->priv_data; | ||||
| ADPCMChannelStatus *cs; | ADPCMChannelStatus *cs; | ||||
| int n, m, channel, i; | int n, m, channel, i; | ||||
| @@ -104,8 +104,10 @@ static int adx_decode_header(AVCodecContext *avctx,const unsigned char *buf,size | |||||
| static int adx_decode_frame(AVCodecContext *avctx, | static int adx_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf0, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf0 = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| ADXContext *c = avctx->priv_data; | ADXContext *c = avctx->priv_data; | ||||
| short *samples = data; | short *samples = data; | ||||
| const uint8_t *buf = buf0; | const uint8_t *buf = buf0; | ||||
| @@ -400,8 +400,10 @@ static void reconstruct_stereo_16(int32_t *buffer[MAX_CHANNELS], | |||||
| static int alac_decode_frame(AVCodecContext *avctx, | static int alac_decode_frame(AVCodecContext *avctx, | ||||
| void *outbuffer, int *outputsize, | void *outbuffer, int *outputsize, | ||||
| const uint8_t *inbuffer, int input_buffer_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *inbuffer = avpkt->data; | |||||
| int input_buffer_size = avpkt->size; | |||||
| ALACContext *alac = avctx->priv_data; | ALACContext *alac = avctx->priv_data; | ||||
| int channels; | int channels; | ||||
| @@ -806,8 +806,10 @@ static void ape_unpack_stereo(APEContext * ctx, int count) | |||||
| static int ape_decode_frame(AVCodecContext * avctx, | static int ape_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| APEContext *s = avctx->priv_data; | APEContext *s = avctx->priv_data; | ||||
| int16_t *samples = data; | int16_t *samples = data; | ||||
| int nblocks; | int nblocks; | ||||
| @@ -387,8 +387,10 @@ static inline void dct_get(ASV1Context *a, int mb_x, int mb_y){ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| ASV1Context * const a = avctx->priv_data; | ASV1Context * const a = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= (AVFrame*)&a->picture; | AVFrame * const p= (AVFrame*)&a->picture; | ||||
| @@ -878,7 +878,9 @@ static int decodeFrame(ATRAC3Context *q, const uint8_t* databuf) | |||||
| static int atrac3_decode_frame(AVCodecContext *avctx, | static int atrac3_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| ATRAC3Context *q = avctx->priv_data; | ATRAC3Context *q = avctx->priv_data; | ||||
| int result = 0, i; | int result = 0, i; | ||||
| const uint8_t* databuf; | const uint8_t* databuf; | ||||
| @@ -2429,8 +2429,7 @@ typedef struct AVCodec { | |||||
| int (*init)(AVCodecContext *); | int (*init)(AVCodecContext *); | ||||
| int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data); | int (*encode)(AVCodecContext *, uint8_t *buf, int buf_size, void *data); | ||||
| int (*close)(AVCodecContext *); | int (*close)(AVCodecContext *); | ||||
| int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, | |||||
| const uint8_t *buf, int buf_size); | |||||
| int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt); | |||||
| /** | /** | ||||
| * Codec capabilities. | * Codec capabilities. | ||||
| * see CODEC_CAP_* | * see CODEC_CAP_* | ||||
| @@ -3020,26 +3019,45 @@ int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, v | |||||
| */ | */ | ||||
| int avcodec_open(AVCodecContext *avctx, AVCodec *codec); | int avcodec_open(AVCodecContext *avctx, AVCodec *codec); | ||||
| #if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
| /** | /** | ||||
| * Decodes an audio frame from \p buf into \p samples. | * Decodes an audio frame from \p buf into \p samples. | ||||
| * The avcodec_decode_audio2() function decodes an audio frame from the input | |||||
| * buffer \p buf of size \p buf_size. To decode it, it makes use of the | |||||
| * Wrapper function which calls avcodec_decode_audio3. | |||||
| * | |||||
| * @deprecated Use avcodec_decode_audio3 instead. | |||||
| * @param avctx the codec context | |||||
| * @param[out] samples the output buffer | |||||
| * @param[in,out] frame_size_ptr the output buffer size in bytes | |||||
| * @param[in] buf the input buffer | |||||
| * @param[in] buf_size the input buffer size in bytes | |||||
| * @return On error a negative value is returned, otherwise the number of bytes | |||||
| * used or zero if no frame could be decompressed. | |||||
| */ | |||||
| attribute_deprecated int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, | |||||
| int *frame_size_ptr, | |||||
| const uint8_t *buf, int buf_size); | |||||
| #endif | |||||
| /** | |||||
| * Decodes an audio frame from \p avpkt->data into \p samples. | |||||
| * The avcodec_decode_audio3() function decodes an audio frame from the input | |||||
| * buffer \p avpkt->data of size \p avpkt->size. To decode it, it makes use of the | |||||
| * audio codec which was coupled with \p avctx using avcodec_open(). The | * audio codec which was coupled with \p avctx using avcodec_open(). The | ||||
| * resulting decoded frame is stored in output buffer \p samples. If no frame | * resulting decoded frame is stored in output buffer \p samples. If no frame | ||||
| * could be decompressed, \p frame_size_ptr is zero. Otherwise, it is the | * could be decompressed, \p frame_size_ptr is zero. Otherwise, it is the | ||||
| * decompressed frame size in \e bytes. | * decompressed frame size in \e bytes. | ||||
| * | * | ||||
| * @warning You \e must set \p frame_size_ptr to the allocated size of the | * @warning You \e must set \p frame_size_ptr to the allocated size of the | ||||
| * output buffer before calling avcodec_decode_audio2(). | |||||
| * output buffer before calling avcodec_decode_audio3(). | |||||
| * | * | ||||
| * @warning The input buffer must be \c FF_INPUT_BUFFER_PADDING_SIZE larger than | * @warning The input buffer must be \c FF_INPUT_BUFFER_PADDING_SIZE larger than | ||||
| * the actual read bytes because some optimized bitstream readers read 32 or 64 | * the actual read bytes because some optimized bitstream readers read 32 or 64 | ||||
| * bits at once and could read over the end. | * bits at once and could read over the end. | ||||
| * | * | ||||
| * @warning The end of the input buffer \p buf should be set to 0 to ensure that | |||||
| * @warning The end of the input buffer \p avpkt->data should be set to 0 to ensure that | |||||
| * no overreading happens for damaged MPEG streams. | * no overreading happens for damaged MPEG streams. | ||||
| * | * | ||||
| * @note You might have to align the input buffer \p buf and output buffer \p | |||||
| * @note You might have to align the input buffer \p avpkt->data and output buffer \p | |||||
| * samples. The alignment requirements depend on the CPU: On some CPUs it isn't | * samples. The alignment requirements depend on the CPU: On some CPUs it isn't | ||||
| * necessary at all, on others it won't work at all if not aligned and on others | * necessary at all, on others it won't work at all if not aligned and on others | ||||
| * it will work but it will have an impact on performance. In practice, the | * it will work but it will have an impact on performance. In practice, the | ||||
| @@ -3051,19 +3069,37 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec); | |||||
| * @param avctx the codec context | * @param avctx the codec context | ||||
| * @param[out] samples the output buffer | * @param[out] samples the output buffer | ||||
| * @param[in,out] frame_size_ptr the output buffer size in bytes | * @param[in,out] frame_size_ptr the output buffer size in bytes | ||||
| * @param[in] buf the input buffer | |||||
| * @param[in] buf_size the input buffer size in bytes | |||||
| * @param[in] avpkt The input AVPacket containing the input buffer. | |||||
| * @return On error a negative value is returned, otherwise the number of bytes | * @return On error a negative value is returned, otherwise the number of bytes | ||||
| * used or zero if no frame could be decompressed. | * used or zero if no frame could be decompressed. | ||||
| */ | */ | ||||
| int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, | |||||
| int avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, | |||||
| int *frame_size_ptr, | int *frame_size_ptr, | ||||
| const uint8_t *buf, int buf_size); | |||||
| AVPacket *avpkt); | |||||
| #if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
| /** | /** | ||||
| * Decodes a video frame from \p buf into \p picture. | * Decodes a video frame from \p buf into \p picture. | ||||
| * The avcodec_decode_video() function decodes a video frame from the input | |||||
| * buffer \p buf of size \p buf_size. To decode it, it makes use of the | |||||
| * Wrapper function which calls avcodec_decode_video2. | |||||
| * | |||||
| * @deprecated Use avcodec_decode_video2 instead. | |||||
| * @param avctx the codec context | |||||
| * @param[out] picture The AVFrame in which the decoded video frame will be stored. | |||||
| * @param[in] buf the input buffer | |||||
| * @param[in] buf_size the size of the input buffer in bytes | |||||
| * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. | |||||
| * @return On error a negative value is returned, otherwise the number of bytes | |||||
| * used or zero if no frame could be decompressed. | |||||
| */ | |||||
| attribute_deprecated int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, | |||||
| int *got_picture_ptr, | |||||
| const uint8_t *buf, int buf_size); | |||||
| #endif | |||||
| /** | |||||
| * Decodes a video frame from \p avpkt->data into \p picture. | |||||
| * The avcodec_decode_video2() function decodes a video frame from the input | |||||
| * buffer \p avpkt->data of size \p avpkt->size. To decode it, it makes use of the | |||||
| * video codec which was coupled with \p avctx using avcodec_open(). The | * video codec which was coupled with \p avctx using avcodec_open(). The | ||||
| * resulting decoded frame is stored in \p picture. | * resulting decoded frame is stored in \p picture. | ||||
| * | * | ||||
| @@ -3074,7 +3110,7 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, | |||||
| * @warning The end of the input buffer \p buf should be set to 0 to ensure that | * @warning The end of the input buffer \p buf should be set to 0 to ensure that | ||||
| * no overreading happens for damaged MPEG streams. | * no overreading happens for damaged MPEG streams. | ||||
| * | * | ||||
| * @note You might have to align the input buffer \p buf and output buffer \p | |||||
| * @note You might have to align the input buffer \p avpkt->data and output buffer \p | |||||
| * samples. The alignment requirements depend on the CPU: on some CPUs it isn't | * samples. The alignment requirements depend on the CPU: on some CPUs it isn't | ||||
| * necessary at all, on others it won't work at all if not aligned and on others | * necessary at all, on others it won't work at all if not aligned and on others | ||||
| * it will work but it will have an impact on performance. In practice, the | * it will work but it will have an impact on performance. In practice, the | ||||
| @@ -3084,26 +3120,42 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, | |||||
| * start of the buffer to 16. | * start of the buffer to 16. | ||||
| * | * | ||||
| * @note Some codecs have a delay between input and output, these need to be | * @note Some codecs have a delay between input and output, these need to be | ||||
| * feeded with buf=NULL, buf_size=0 at the end to return the remaining frames. | |||||
| * feeded with avpkt->data=NULL, avpkt->size=0 at the end to return the remaining frames. | |||||
| * | * | ||||
| * @param avctx the codec context | * @param avctx the codec context | ||||
| * @param[out] picture The AVFrame in which the decoded video frame will be stored. | * @param[out] picture The AVFrame in which the decoded video frame will be stored. | ||||
| * @param[in] buf the input buffer | |||||
| * @param[in] buf_size the size of the input buffer in bytes | |||||
| * @param[in] avpkt The input AVpacket containing the input buffer. | |||||
| * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. | * @param[in,out] got_picture_ptr Zero if no frame could be decompressed, otherwise, it is nonzero. | ||||
| * @return On error a negative value is returned, otherwise the number of bytes | * @return On error a negative value is returned, otherwise the number of bytes | ||||
| * used or zero if no frame could be decompressed. | * used or zero if no frame could be decompressed. | ||||
| */ | */ | ||||
| int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture, | |||||
| int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture, | |||||
| int *got_picture_ptr, | int *got_picture_ptr, | ||||
| const uint8_t *buf, int buf_size); | |||||
| AVPacket *avpkt); | |||||
| #if LIBAVCODEC_VERSION_MAJOR < 53 | |||||
| /* Decode a subtitle message. Return -1 if error, otherwise return the | /* Decode a subtitle message. Return -1 if error, otherwise return the | ||||
| * number of bytes used. If no subtitle could be decompressed, | * number of bytes used. If no subtitle could be decompressed, | ||||
| * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */ | * got_sub_ptr is zero. Otherwise, the subtitle is stored in *sub. */ | ||||
| int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, | |||||
| attribute_deprecated int avcodec_decode_subtitle(AVCodecContext *avctx, AVSubtitle *sub, | |||||
| int *got_sub_ptr, | int *got_sub_ptr, | ||||
| const uint8_t *buf, int buf_size); | const uint8_t *buf, int buf_size); | ||||
| #endif | |||||
| /** | |||||
| * Decodes a subtitle message. | |||||
| * Returns -1 if error, otherwise returns the number of bytes used. | |||||
| * If no subtitle could be decompressed, \p got_sub_ptr is zero. | |||||
| * Otherwise, the subtitle is stored in \p *sub. | |||||
| * | |||||
| * @param avctx the codec context | |||||
| * @param[out] sub The AVSubtitle in which the decoded subtitle will be stored. | |||||
| * @param[in,out] got_sub_ptr Zero if no subtitle could be decompressed, otherwise, it is nonzero. | |||||
| * @param[in] avpkt The input AVPacket containing the input buffer. | |||||
| */ | |||||
| int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, | |||||
| int *got_sub_ptr, | |||||
| AVPacket *avpkt); | |||||
| int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, | int avcodec_parse_frame(AVCodecContext *avctx, uint8_t **pdata, | ||||
| int *data_size_ptr, | int *data_size_ptr, | ||||
| uint8_t *buf, int buf_size); | uint8_t *buf, int buf_size); | ||||
| @@ -44,8 +44,10 @@ typedef enum { | |||||
| static int | static int | ||||
| avs_decode_frame(AVCodecContext * avctx, | avs_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, const uint8_t * buf, int buf_size) | |||||
| void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AvsContext *const avs = avctx->priv_data; | AvsContext *const avs = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame *const p = (AVFrame *) & avs->picture; | AVFrame *const p = (AVFrame *) & avs->picture; | ||||
| @@ -58,8 +58,10 @@ static void set_palette(AVFrame * frame, const uint8_t * palette_buffer) | |||||
| static int bethsoftvid_decode_frame(AVCodecContext *avctx, | static int bethsoftvid_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| BethsoftvidContext * vid = avctx->priv_data; | BethsoftvidContext * vid = avctx->priv_data; | ||||
| char block_type; | char block_type; | ||||
| uint8_t * dst; | uint8_t * dst; | ||||
| @@ -45,9 +45,10 @@ static av_cold int bfi_decode_init(AVCodecContext * avctx) | |||||
| } | } | ||||
| static int bfi_decode_frame(AVCodecContext * avctx, void *data, | static int bfi_decode_frame(AVCodecContext * avctx, void *data, | ||||
| int *data_size, const uint8_t * buf, | |||||
| int buf_size) | |||||
| int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| BFIContext *bfi = avctx->priv_data; | BFIContext *bfi = avctx->priv_data; | ||||
| uint8_t *dst = bfi->dst; | uint8_t *dst = bfi->dst; | ||||
| uint8_t *src, *dst_offset, colour1, colour2; | uint8_t *src, *dst_offset, colour1, colour2; | ||||
| @@ -35,8 +35,10 @@ static av_cold int bmp_decode_init(AVCodecContext *avctx){ | |||||
| static int bmp_decode_frame(AVCodecContext *avctx, | static int bmp_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| BMPContext *s = avctx->priv_data; | BMPContext *s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame *p = &s->picture; | AVFrame *p = &s->picture; | ||||
| @@ -113,8 +113,10 @@ static inline void draw_n_color(uint8_t *out, int stride, int width, | |||||
| } | } | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, | static int decode_frame(AVCodecContext *avctx, void *data, | ||||
| int *data_size, const uint8_t * buf, int buf_size) | |||||
| int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| C93DecoderContext * const c93 = avctx->priv_data; | C93DecoderContext * const c93 = avctx->priv_data; | ||||
| AVFrame * const newpic = &c93->pictures[c93->currentpic]; | AVFrame * const newpic = &c93->pictures[c93->currentpic]; | ||||
| AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; | AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; | ||||
| @@ -625,7 +625,9 @@ static void cavs_flush(AVCodecContext * avctx) { | |||||
| } | } | ||||
| static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, | static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AVSContext *h = avctx->priv_data; | AVSContext *h = avctx->priv_data; | ||||
| MpegEncContext *s = &h->s; | MpegEncContext *s = &h->s; | ||||
| int input_size; | int input_size; | ||||
| @@ -411,8 +411,10 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx) | |||||
| static int cinepak_decode_frame(AVCodecContext *avctx, | static int cinepak_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CinepakContext *s = avctx->priv_data; | CinepakContext *s = avctx->priv_data; | ||||
| s->data = buf; | s->data = buf; | ||||
| @@ -42,8 +42,10 @@ typedef struct CLJRContext{ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CLJRContext * const a = avctx->priv_data; | CLJRContext * const a = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= (AVFrame*)&a->picture; | AVFrame * const p= (AVFrame*)&a->picture; | ||||
| @@ -979,7 +979,9 @@ static int decode_subpacket(COOKContext *q, const uint8_t *inbuffer, | |||||
| static int cook_decode_frame(AVCodecContext *avctx, | static int cook_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| COOKContext *q = avctx->priv_data; | COOKContext *q = avctx->priv_data; | ||||
| if (buf_size < avctx->block_align) | if (buf_size < avctx->block_align) | ||||
| @@ -135,7 +135,9 @@ static void add_frame_32(AVFrame *f, const uint8_t *src, | |||||
| #endif | #endif | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CamStudioContext *c = avctx->priv_data; | CamStudioContext *c = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| @@ -60,8 +60,10 @@ static av_cold int cyuv_decode_init(AVCodecContext *avctx) | |||||
| static int cyuv_decode_frame(AVCodecContext *avctx, | static int cyuv_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CyuvDecodeContext *s=avctx->priv_data; | CyuvDecodeContext *s=avctx->priv_data; | ||||
| unsigned char *y_plane; | unsigned char *y_plane; | ||||
| @@ -1209,8 +1209,10 @@ static int dca_convert_bitstream(const uint8_t * src, int src_size, uint8_t * ds | |||||
| */ | */ | ||||
| static int dca_decode_frame(AVCodecContext * avctx, | static int dca_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| int i; | int i; | ||||
| int16_t *samples = data; | int16_t *samples = data; | ||||
| @@ -278,8 +278,10 @@ static int dnxhd_decode_macroblocks(DNXHDContext *ctx, const uint8_t *buf, int b | |||||
| } | } | ||||
| static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| DNXHDContext *ctx = avctx->priv_data; | DNXHDContext *ctx = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| int first_field = 1; | int first_field = 1; | ||||
| @@ -161,8 +161,10 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) | |||||
| static int dpcm_decode_frame(AVCodecContext *avctx, | static int dpcm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| DPCMContext *s = avctx->priv_data; | DPCMContext *s = avctx->priv_data; | ||||
| int in, out = 0; | int in, out = 0; | ||||
| int predictor[2]; | int predictor[2]; | ||||
| @@ -195,8 +195,10 @@ static void cin_decode_rle(const unsigned char *src, int src_size, unsigned char | |||||
| static int cinvideo_decode_frame(AVCodecContext *avctx, | static int cinvideo_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CinVideoContext *cin = avctx->priv_data; | CinVideoContext *cin = avctx->priv_data; | ||||
| int i, y, palette_type, palette_colors_count, bitmap_frame_type, bitmap_frame_size; | int i, y, palette_type, palette_colors_count, bitmap_frame_type, bitmap_frame_size; | ||||
| @@ -312,8 +314,10 @@ static av_cold int cinaudio_decode_init(AVCodecContext *avctx) | |||||
| static int cinaudio_decode_frame(AVCodecContext *avctx, | static int cinaudio_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CinAudioContext *cin = avctx->priv_data; | CinAudioContext *cin = avctx->priv_data; | ||||
| const uint8_t *src = buf; | const uint8_t *src = buf; | ||||
| int16_t *samples = (int16_t *)data; | int16_t *samples = (int16_t *)data; | ||||
| @@ -1111,8 +1111,10 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) | |||||
| 144000 bytes for PAL - or twice those for 50Mbps) */ | 144000 bytes for PAL - or twice those for 50Mbps) */ | ||||
| static int dvvideo_decode_frame(AVCodecContext *avctx, | static int dvvideo_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| DVVideoContext *s = avctx->priv_data; | DVVideoContext *s = avctx->priv_data; | ||||
| s->sys = dv_frame_profile(buf); | s->sys = dv_frame_profile(buf); | ||||
| @@ -1345,8 +1345,10 @@ static int dvbsub_display_end_segment(AVCodecContext *avctx, const uint8_t *buf, | |||||
| static int dvbsub_decode(AVCodecContext *avctx, | static int dvbsub_decode(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data; | DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data; | ||||
| AVSubtitle *sub = (AVSubtitle*) data; | AVSubtitle *sub = (AVSubtitle*) data; | ||||
| const uint8_t *p, *p_end; | const uint8_t *p, *p_end; | ||||
| @@ -475,8 +475,10 @@ static void ppm_save(const char *filename, uint8_t *bitmap, int w, int h, | |||||
| static int dvdsub_decode(AVCodecContext *avctx, | static int dvdsub_decode(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AVSubtitle *sub = (void *)data; | AVSubtitle *sub = (void *)data; | ||||
| int is_menu; | int is_menu; | ||||
| @@ -188,8 +188,10 @@ static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t* dst, uint | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) | |||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| DxaDecContext * const c = avctx->priv_data; | DxaDecContext * const c = avctx->priv_data; | ||||
| uint8_t *outptr, *srcptr, *tmpptr; | uint8_t *outptr, *srcptr, *tmpptr; | ||||
| unsigned long dsize; | unsigned long dsize; | ||||
| @@ -144,8 +144,10 @@ static void cmv_process_header(CmvContext *s, const uint8_t *buf, const uint8_t | |||||
| static int cmv_decode_frame(AVCodecContext *avctx, | static int cmv_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| CmvContext *s = avctx->priv_data; | CmvContext *s = avctx->priv_data; | ||||
| const uint8_t *buf_end = buf + buf_size; | const uint8_t *buf_end = buf + buf_size; | ||||
| @@ -190,7 +190,9 @@ static void tgq_calculate_qtable(TgqContext *s, int quant){ | |||||
| static int tgq_decode_frame(AVCodecContext *avctx, | static int tgq_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size){ | |||||
| AVPacket *avpkt){ | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| const uint8_t *buf_start = buf; | const uint8_t *buf_start = buf; | ||||
| const uint8_t *buf_end = buf + buf_size; | const uint8_t *buf_end = buf + buf_size; | ||||
| TgqContext *s = avctx->priv_data; | TgqContext *s = avctx->priv_data; | ||||
| @@ -237,8 +237,10 @@ static void cond_release_buffer(AVFrame *pic) | |||||
| static int tgv_decode_frame(AVCodecContext *avctx, | static int tgv_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| TgvContext *s = avctx->priv_data; | TgvContext *s = avctx->priv_data; | ||||
| const uint8_t *buf_end = buf + buf_size; | const uint8_t *buf_end = buf + buf_size; | ||||
| int chunk_type; | int chunk_type; | ||||
| @@ -101,8 +101,10 @@ static void tqi_calculate_qtable(MpegEncContext *s, int quant) | |||||
| static int tqi_decode_frame(AVCodecContext *avctx, | static int tqi_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| const uint8_t *buf_end = buf+buf_size; | const uint8_t *buf_end = buf+buf_size; | ||||
| TqiContext *t = avctx->priv_data; | TqiContext *t = avctx->priv_data; | ||||
| MpegEncContext *s = &t->s; | MpegEncContext *s = &t->s; | ||||
| @@ -206,8 +206,10 @@ static const uint16_t mask_matrix[] = {0x1, 0x2, 0x10, 0x20, | |||||
| */ | */ | ||||
| static int escape124_decode_frame(AVCodecContext *avctx, | static int escape124_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Escape124Context *s = avctx->priv_data; | Escape124Context *s = avctx->priv_data; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| @@ -936,7 +936,9 @@ static av_cold int decode_init(AVCodecContext *avctx) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ | |||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FFV1Context *f = avctx->priv_data; | FFV1Context *f = avctx->priv_data; | ||||
| RangeCoder * const c= &f->c; | RangeCoder * const c= &f->c; | ||||
| const int width= f->width; | const int width= f->width; | ||||
| @@ -636,8 +636,10 @@ static int decode_frame(FLACContext *s) | |||||
| static int flac_decode_frame(AVCodecContext *avctx, | static int flac_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FLACContext *s = avctx->priv_data; | FLACContext *s = avctx->priv_data; | ||||
| int i, j = 0, input_buf_size = 0, bytes_read = 0; | int i, j = 0, input_buf_size = 0, bytes_read = 0; | ||||
| int16_t *samples_16 = data; | int16_t *samples_16 = data; | ||||
| @@ -102,8 +102,10 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx) | |||||
| static int flashsv_decode_frame(AVCodecContext *avctx, | static int flashsv_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FlashSVContext *s = avctx->priv_data; | FlashSVContext *s = avctx->priv_data; | ||||
| int h_blocks, v_blocks, h_part, v_part, i, j; | int h_blocks, v_blocks, h_part, v_part, i, j; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| @@ -701,8 +701,10 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx, | |||||
| static int flic_decode_frame(AVCodecContext *avctx, | static int flic_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| if (avctx->pix_fmt == PIX_FMT_PAL8) { | if (avctx->pix_fmt == PIX_FMT_PAL8) { | ||||
| return flic_decode_frame_8BPP(avctx, data, data_size, | return flic_decode_frame_8BPP(avctx, data, data_size, | ||||
| buf, buf_size); | buf, buf_size); | ||||
| @@ -130,8 +130,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, | |||||
| */ | */ | ||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FrapsContext * const s = avctx->priv_data; | FrapsContext * const s = avctx->priv_data; | ||||
| AVFrame *frame = data; | AVFrame *frame = data; | ||||
| AVFrame * const f = (AVFrame*)&s->frame; | AVFrame * const f = (AVFrame*)&s->frame; | ||||
| @@ -363,8 +363,10 @@ static int g726_encode_frame(AVCodecContext *avctx, | |||||
| static int g726_decode_frame(AVCodecContext *avctx, | static int g726_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| G726Context *c = avctx->priv_data; | G726Context *c = avctx->priv_data; | ||||
| short *samples = data; | short *samples = data; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| @@ -282,8 +282,10 @@ static av_cold int gif_decode_init(AVCodecContext *avctx) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) | |||||
| static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| GifState *s = avctx->priv_data; | GifState *s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| int ret; | int ret; | ||||
| @@ -543,8 +543,10 @@ static int get_consumed_bytes(MpegEncContext *s, int buf_size){ | |||||
| static int h261_decode_frame(AVCodecContext *avctx, | static int h261_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| H261Context *h= avctx->priv_data; | H261Context *h= avctx->priv_data; | ||||
| MpegEncContext *s = &h->s; | MpegEncContext *s = &h->s; | ||||
| int ret; | int ret; | ||||
| @@ -331,8 +331,10 @@ static int decode_slice(MpegEncContext *s){ | |||||
| int ff_h263_decode_frame(AVCodecContext *avctx, | int ff_h263_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MpegEncContext *s = avctx->priv_data; | MpegEncContext *s = avctx->priv_data; | ||||
| int ret; | int ret; | ||||
| AVFrame *pict = data; | AVFrame *pict = data; | ||||
| @@ -7618,8 +7618,10 @@ static int get_consumed_bytes(MpegEncContext *s, int pos, int buf_size){ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| H264Context *h = avctx->priv_data; | H264Context *h = avctx->priv_data; | ||||
| MpegEncContext *s = &h->s; | MpegEncContext *s = &h->s; | ||||
| AVFrame *pict = data; | AVFrame *pict = data; | ||||
| @@ -942,7 +942,9 @@ static void draw_slice(HYuvContext *s, int y){ | |||||
| s->last_slice_end= y + h; | s->last_slice_end= y + h; | ||||
| } | } | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ | |||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| HYuvContext *s = avctx->priv_data; | HYuvContext *s = avctx->priv_data; | ||||
| const int width= s->width; | const int width= s->width; | ||||
| const int width2= s->width>>1; | const int width2= s->width>>1; | ||||
| @@ -209,8 +209,10 @@ static void idcin_decode_vlcs(IdcinContext *s) | |||||
| static int idcin_decode_frame(AVCodecContext *avctx, | static int idcin_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| IdcinContext *s = avctx->priv_data; | IdcinContext *s = avctx->priv_data; | ||||
| AVPaletteControl *palette_control = avctx->palctrl; | AVPaletteControl *palette_control = avctx->palctrl; | ||||
| @@ -639,8 +639,10 @@ static int imc_get_coeffs (IMCContext* q) { | |||||
| static int imc_decode_frame(AVCodecContext * avctx, | static int imc_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| IMCContext *q = avctx->priv_data; | IMCContext *q = avctx->priv_data; | ||||
| @@ -136,8 +136,10 @@ static int ir2_decode_plane_inter(Ir2Context *ctx, int width, int height, uint8_ | |||||
| static int ir2_decode_frame(AVCodecContext *avctx, | static int ir2_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Ir2Context * const s = avctx->priv_data; | Ir2Context * const s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= (AVFrame*)&s->picture; | AVFrame * const p= (AVFrame*)&s->picture; | ||||
| @@ -1062,8 +1062,10 @@ static int iv_decode_frame(Indeo3DecodeContext *s, | |||||
| static int indeo3_decode_frame(AVCodecContext *avctx, | static int indeo3_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Indeo3DecodeContext *s=avctx->priv_data; | Indeo3DecodeContext *s=avctx->priv_data; | ||||
| uint8_t *src, *dest; | uint8_t *src, *dest; | ||||
| int y; | int y; | ||||
| @@ -639,8 +639,10 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx) | |||||
| static int ipvideo_decode_frame(AVCodecContext *avctx, | static int ipvideo_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| IpvideoContext *s = avctx->priv_data; | IpvideoContext *s = avctx->priv_data; | ||||
| AVPaletteControl *palette_control = avctx->palctrl; | AVPaletteControl *palette_control = avctx->palctrl; | ||||
| @@ -224,9 +224,10 @@ static void kmvc_decode_inter_8x8(KmvcContext * ctx, const uint8_t * src, int w, | |||||
| } | } | ||||
| } | } | ||||
| static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, const uint8_t * buf, | |||||
| int buf_size) | |||||
| static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| KmvcContext *const ctx = avctx->priv_data; | KmvcContext *const ctx = avctx->priv_data; | ||||
| uint8_t *out, *src; | uint8_t *out, *src; | ||||
| int i; | int i; | ||||
| @@ -161,8 +161,10 @@ static unsigned int mszh_decomp(unsigned char * srcptr, int srclen, unsigned cha | |||||
| * Decode a frame | * Decode a frame | ||||
| * | * | ||||
| */ | */ | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) | |||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| LclDecContext * const c = avctx->priv_data; | LclDecContext * const c = avctx->priv_data; | ||||
| unsigned char *encoded = (unsigned char *)buf; | unsigned char *encoded = (unsigned char *)buf; | ||||
| unsigned int pixel_ptr; | unsigned int pixel_ptr; | ||||
| @@ -245,8 +245,10 @@ static av_cold int amr_nb_decode_close(AVCodecContext * avctx) | |||||
| static int amr_nb_decode_frame(AVCodecContext * avctx, | static int amr_nb_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AMRContext *s = avctx->priv_data; | AMRContext *s = avctx->priv_data; | ||||
| const uint8_t*amrData=buf; | const uint8_t*amrData=buf; | ||||
| int offset=0; | int offset=0; | ||||
| @@ -654,8 +656,10 @@ static int amr_wb_decode_init(AVCodecContext * avctx) | |||||
| static int amr_wb_decode_frame(AVCodecContext * avctx, | static int amr_wb_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| AMRWBContext *s = avctx->priv_data; | AMRWBContext *s = avctx->priv_data; | ||||
| const uint8_t*amrData=buf; | const uint8_t*amrData=buf; | ||||
| int mode; | int mode; | ||||
| @@ -77,8 +77,10 @@ static av_cold int libdirac_decode_init(AVCodecContext *avccontext) | |||||
| static int libdirac_decode_frame(AVCodecContext *avccontext, | static int libdirac_decode_frame(AVCodecContext *avccontext, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; | FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; | ||||
| AVPicture *picture = data; | AVPicture *picture = data; | ||||
| @@ -149,8 +149,10 @@ static av_cold int faac_init_mp4(AVCodecContext *avctx) | |||||
| static int faac_decode_frame(AVCodecContext *avctx, | static int faac_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FAACContext *s = avctx->priv_data; | FAACContext *s = avctx->priv_data; | ||||
| #ifndef FAAD2_VERSION | #ifndef FAAD2_VERSION | ||||
| unsigned long bytesconsumed; | unsigned long bytesconsumed; | ||||
| @@ -138,7 +138,9 @@ AVCodec libgsm_ms_encoder = { | |||||
| static int libgsm_decode_frame(AVCodecContext *avctx, | static int libgsm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| *data_size = 0; /* In case of error */ | *data_size = 0; /* In case of error */ | ||||
| if(buf_size < avctx->block_align) return -1; | if(buf_size < avctx->block_align) return -1; | ||||
| switch(avctx->codec_id) { | switch(avctx->codec_id) { | ||||
| @@ -58,8 +58,10 @@ static av_cold int libopenjpeg_decode_init(AVCodecContext *avctx) | |||||
| static int libopenjpeg_decode_frame(AVCodecContext *avctx, | static int libopenjpeg_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| LibOpenJPEGContext *ctx = avctx->priv_data; | LibOpenJPEGContext *ctx = avctx->priv_data; | ||||
| AVFrame *picture = &ctx->image, *output = data; | AVFrame *picture = &ctx->image, *output = data; | ||||
| opj_dinfo_t *dec; | opj_dinfo_t *dec; | ||||
| @@ -207,8 +207,10 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) | |||||
| static int libschroedinger_decode_frame(AVCodecContext *avccontext, | static int libschroedinger_decode_frame(AVCodecContext *avccontext, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; | FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; | ||||
| SchroDecoder *decoder = p_schro_params->decoder; | SchroDecoder *decoder = p_schro_params->decoder; | ||||
| @@ -90,8 +90,10 @@ static av_cold int libspeex_decode_init(AVCodecContext *avctx) | |||||
| static int libspeex_decode_frame(AVCodecContext *avctx, | static int libspeex_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| LibSpeexContext *s = avctx->priv_data; | LibSpeexContext *s = avctx->priv_data; | ||||
| int16_t *output = data, *end; | int16_t *output = data, *end; | ||||
| int i, num_samples; | int i, num_samples; | ||||
| @@ -158,8 +158,10 @@ static int loco_decode_plane(LOCOContext *l, uint8_t *data, int width, int heigh | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| LOCOContext * const l = avctx->priv_data; | LOCOContext * const l = avctx->priv_data; | ||||
| AVFrame * const p= (AVFrame*)&l->pic; | AVFrame * const p= (AVFrame*)&l->pic; | ||||
| int decoded; | int decoded; | ||||
| @@ -236,8 +236,10 @@ static av_cold int mace_decode_init(AVCodecContext * avctx) | |||||
| static int mace_decode_frame(AVCodecContext *avctx, | static int mace_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| int16_t *samples = data; | int16_t *samples = data; | ||||
| MACEContext *ctx = avctx->priv_data; | MACEContext *ctx = avctx->priv_data; | ||||
| int i, j, k, l; | int i, j, k, l; | ||||
| @@ -154,8 +154,10 @@ static inline void idct_put(MDECContext *a, int mb_x, int mb_y){ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MDECContext * const a = avctx->priv_data; | MDECContext * const a = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= &a->picture; | AVFrame * const p= &a->picture; | ||||
| @@ -274,8 +274,10 @@ static void prepare_avpic(MimicContext *ctx, AVPicture *dst, AVPicture *src) | |||||
| } | } | ||||
| static int mimic_decode_frame(AVCodecContext *avctx, void *data, | static int mimic_decode_frame(AVCodecContext *avctx, void *data, | ||||
| int *data_size, const uint8_t *buf, int buf_size) | |||||
| int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MimicContext *ctx = avctx->priv_data; | MimicContext *ctx = avctx->priv_data; | ||||
| int is_pframe; | int is_pframe; | ||||
| int width, height; | int width, height; | ||||
| @@ -31,8 +31,10 @@ | |||||
| static int mjpegb_decode_frame(AVCodecContext *avctx, | static int mjpegb_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MJpegDecodeContext *s = avctx->priv_data; | MJpegDecodeContext *s = avctx->priv_data; | ||||
| const uint8_t *buf_end, *buf_ptr; | const uint8_t *buf_end, *buf_ptr; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| @@ -1258,8 +1258,10 @@ found: | |||||
| int ff_mjpeg_decode_frame(AVCodecContext *avctx, | int ff_mjpeg_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MJpegDecodeContext *s = avctx->priv_data; | MJpegDecodeContext *s = avctx->priv_data; | ||||
| const uint8_t *buf_end, *buf_ptr; | const uint8_t *buf_end, *buf_ptr; | ||||
| int start_code; | int start_code; | ||||
| @@ -106,7 +106,7 @@ int ff_mjpeg_decode_init(AVCodecContext *avctx); | |||||
| int ff_mjpeg_decode_end(AVCodecContext *avctx); | int ff_mjpeg_decode_end(AVCodecContext *avctx); | ||||
| int ff_mjpeg_decode_frame(AVCodecContext *avctx, | int ff_mjpeg_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size); | |||||
| AVPacket *avpkt); | |||||
| int ff_mjpeg_decode_dqt(MJpegDecodeContext *s); | int ff_mjpeg_decode_dqt(MJpegDecodeContext *s); | ||||
| int ff_mjpeg_decode_dht(MJpegDecodeContext *s); | int ff_mjpeg_decode_dht(MJpegDecodeContext *s); | ||||
| int ff_mjpeg_decode_sof(MJpegDecodeContext *s); | int ff_mjpeg_decode_sof(MJpegDecodeContext *s); | ||||
| @@ -904,8 +904,10 @@ static int output_data(MLPDecodeContext *m, unsigned int substr, | |||||
| * otherwise returns the number of bytes consumed. */ | * otherwise returns the number of bytes consumed. */ | ||||
| static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, | static int read_access_unit(AVCodecContext *avctx, void* data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MLPDecodeContext *m = avctx->priv_data; | MLPDecodeContext *m = avctx->priv_data; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| unsigned int length, substr; | unsigned int length, substr; | ||||
| @@ -159,8 +159,10 @@ static void mm_decode_inter(MmContext * s, int half_horiz, int half_vert, const | |||||
| static int mm_decode_frame(AVCodecContext *avctx, | static int mm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MmContext *s = avctx->priv_data; | MmContext *s = avctx->priv_data; | ||||
| const uint8_t *buf_end = buf+buf_size; | const uint8_t *buf_end = buf+buf_size; | ||||
| int type; | int type; | ||||
| @@ -281,8 +281,10 @@ static void mp_decode_frame_helper(MotionPixelsContext *mp, GetBitContext *gb) | |||||
| static int mp_decode_frame(AVCodecContext *avctx, | static int mp_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MotionPixelsContext *mp = avctx->priv_data; | MotionPixelsContext *mp = avctx->priv_data; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| int i, count1, count2, sz; | int i, count1, count2, sz; | ||||
| @@ -156,8 +156,10 @@ static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int * | |||||
| static int mpc7_decode_frame(AVCodecContext * avctx, | static int mpc7_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MPCContext *c = avctx->priv_data; | MPCContext *c = avctx->priv_data; | ||||
| GetBitContext gb; | GetBitContext gb; | ||||
| uint8_t *bits; | uint8_t *bits; | ||||
| @@ -180,8 +180,10 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) | |||||
| static int mpc8_decode_frame(AVCodecContext * avctx, | static int mpc8_decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MPCContext *c = avctx->priv_data; | MPCContext *c = avctx->priv_data; | ||||
| GetBitContext gb2, *gb = &gb2; | GetBitContext gb2, *gb = &gb2; | ||||
| int i, j, k, ch, cnt, res, t; | int i, j, k, ch, cnt, res, t; | ||||
| @@ -2260,8 +2260,10 @@ static int decode_chunks(AVCodecContext *avctx, | |||||
| /* handle buffering and image synchronisation */ | /* handle buffering and image synchronisation */ | ||||
| static int mpeg_decode_frame(AVCodecContext *avctx, | static int mpeg_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Mpeg1Context *s = avctx->priv_data; | Mpeg1Context *s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| MpegEncContext *s2 = &s->mpeg_enc_ctx; | MpegEncContext *s2 = &s->mpeg_enc_ctx; | ||||
| @@ -2258,8 +2258,10 @@ static int mp_decode_frame(MPADecodeContext *s, | |||||
| static int decode_frame(AVCodecContext * avctx, | static int decode_frame(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MPADecodeContext *s = avctx->priv_data; | MPADecodeContext *s = avctx->priv_data; | ||||
| uint32_t header; | uint32_t header; | ||||
| int out_size; | int out_size; | ||||
| @@ -2315,8 +2317,10 @@ static void flush(AVCodecContext *avctx){ | |||||
| #if CONFIG_MP3ADU_DECODER | #if CONFIG_MP3ADU_DECODER | ||||
| static int decode_frame_adu(AVCodecContext * avctx, | static int decode_frame_adu(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MPADecodeContext *s = avctx->priv_data; | MPADecodeContext *s = avctx->priv_data; | ||||
| uint32_t header; | uint32_t header; | ||||
| int len, out_size; | int len, out_size; | ||||
| @@ -2459,8 +2463,10 @@ static av_cold int decode_close_mp3on4(AVCodecContext * avctx) | |||||
| static int decode_frame_mp3on4(AVCodecContext * avctx, | static int decode_frame_mp3on4(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MP3On4DecodeContext *s = avctx->priv_data; | MP3On4DecodeContext *s = avctx->priv_data; | ||||
| MPADecodeContext *m; | MPADecodeContext *m; | ||||
| int fsize, len = buf_size, out_size = 0; | int fsize, len = buf_size, out_size = 0; | ||||
| @@ -795,7 +795,7 @@ int ff_h261_get_picture_format(int width, int height); | |||||
| int ff_h263_decode_init(AVCodecContext *avctx); | int ff_h263_decode_init(AVCodecContext *avctx); | ||||
| int ff_h263_decode_frame(AVCodecContext *avctx, | int ff_h263_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size); | |||||
| AVPacket *avpkt); | |||||
| int ff_h263_decode_end(AVCodecContext *avctx); | int ff_h263_decode_end(AVCodecContext *avctx); | ||||
| void h263_encode_mb(MpegEncContext *s, | void h263_encode_mb(MpegEncContext *s, | ||||
| DCTELEM block[6][64], | DCTELEM block[6][64], | ||||
| @@ -63,8 +63,10 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx) | |||||
| static int msrle_decode_frame(AVCodecContext *avctx, | static int msrle_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MsrleContext *s = avctx->priv_data; | MsrleContext *s = avctx->priv_data; | ||||
| s->buf = buf; | s->buf = buf; | ||||
| @@ -294,8 +294,10 @@ static void msvideo1_decode_16bit(Msvideo1Context *s) | |||||
| static int msvideo1_decode_frame(AVCodecContext *avctx, | static int msvideo1_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Msvideo1Context *s = avctx->priv_data; | Msvideo1Context *s = avctx->priv_data; | ||||
| s->buf = buf; | s->buf = buf; | ||||
| @@ -153,7 +153,9 @@ static av_cold int decode_init(AVCodecContext * avctx) { | |||||
| static int decode_tag(AVCodecContext * avctx, | static int decode_tag(AVCodecContext * avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t * buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| NellyMoserDecodeContext *s = avctx->priv_data; | NellyMoserDecodeContext *s = avctx->priv_data; | ||||
| int blocks, i; | int blocks, i; | ||||
| int16_t* samples; | int16_t* samples; | ||||
| @@ -128,7 +128,9 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, int qualit | |||||
| } | } | ||||
| static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| NuvContext *c = avctx->priv_data; | NuvContext *c = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| int orig_size = buf_size; | int orig_size = buf_size; | ||||
| @@ -323,8 +323,10 @@ static av_cold int pcm_decode_init(AVCodecContext * avctx) | |||||
| static int pcm_decode_frame(AVCodecContext *avctx, | static int pcm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| PCMDecode *s = avctx->priv_data; | PCMDecode *s = avctx->priv_data; | ||||
| int sample_size, c, n; | int sample_size, c, n; | ||||
| short *samples; | short *samples; | ||||
| @@ -70,7 +70,9 @@ static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen) | |||||
| } | } | ||||
| static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| PCXContext * const s = avctx->priv_data; | PCXContext * const s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p = &s->picture; | AVFrame * const p = &s->picture; | ||||
| @@ -379,8 +379,10 @@ static int png_decode_idat(PNGDecContext *s, int length) | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| PNGDecContext * const s = avctx->priv_data; | PNGDecContext * const s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= &s->picture; | AVFrame * const p= &s->picture; | ||||
| @@ -34,8 +34,10 @@ static av_cold int common_init(AVCodecContext *avctx){ | |||||
| static int pnm_decode_frame(AVCodecContext *avctx, | static int pnm_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| PNMContext * const s = avctx->priv_data; | PNMContext * const s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p= (AVFrame*)&s->picture; | AVFrame * const p= (AVFrame*)&s->picture; | ||||
| @@ -36,7 +36,9 @@ static av_cold int ptx_init(AVCodecContext *avctx) { | |||||
| } | } | ||||
| static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) { | |||||
| AVPacket *avpkt) { | |||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| PTXContext * const s = avctx->priv_data; | PTXContext * const s = avctx->priv_data; | ||||
| AVFrame *picture = data; | AVFrame *picture = data; | ||||
| AVFrame * const p = &s->picture; | AVFrame * const p = &s->picture; | ||||
| @@ -729,8 +729,10 @@ static void warn_insufficient_frame_quality(AVCodecContext *avctx, | |||||
| } | } | ||||
| static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| QCELPContext *q = avctx->priv_data; | QCELPContext *q = avctx->priv_data; | ||||
| float *outbuffer = data; | float *outbuffer = data; | ||||
| int i; | int i; | ||||
| @@ -1968,8 +1968,10 @@ static void qdm2_decode (QDM2Context *q, const uint8_t *in, int16_t *out) | |||||
| static int qdm2_decode_frame(AVCodecContext *avctx, | static int qdm2_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| QDM2Context *s = avctx->priv_data; | QDM2Context *s = avctx->priv_data; | ||||
| if(!buf) | if(!buf) | ||||
| @@ -34,8 +34,10 @@ typedef struct QdrawContext{ | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| QdrawContext * const a = avctx->priv_data; | QdrawContext * const a = avctx->priv_data; | ||||
| AVFrame * const p= (AVFrame*)&a->pic; | AVFrame * const p= (AVFrame*)&a->pic; | ||||
| uint8_t* outdata; | uint8_t* outdata; | ||||
| @@ -248,8 +248,10 @@ static void qpeg_decode_inter(const uint8_t *src, uint8_t *dst, int size, | |||||
| static int decode_frame(AVCodecContext *avctx, | static int decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| QpegContext * const a = avctx->priv_data; | QpegContext * const a = avctx->priv_data; | ||||
| AVFrame * const p= (AVFrame*)&a->pic; | AVFrame * const p= (AVFrame*)&a->pic; | ||||
| uint8_t* outdata; | uint8_t* outdata; | ||||
| @@ -424,8 +424,10 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx) | |||||
| static int qtrle_decode_frame(AVCodecContext *avctx, | static int qtrle_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| QtrleContext *s = avctx->priv_data; | QtrleContext *s = avctx->priv_data; | ||||
| int header, start_line; | int header, start_line; | ||||
| int stream_ptr, height, row_ptr; | int stream_ptr, height, row_ptr; | ||||
| @@ -287,8 +287,10 @@ static int interp(RA144Context *ractx, int16_t *out, int a, | |||||
| /** Uncompress one block (20 bytes -> 160*2 bytes). */ | /** Uncompress one block (20 bytes -> 160*2 bytes). */ | ||||
| static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, | static int ra144_decode_frame(AVCodecContext * avctx, void *vdata, | ||||
| int *data_size, const uint8_t *buf, int buf_size) | |||||
| int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; | static const uint8_t sizes[10] = {6, 5, 5, 4, 4, 3, 3, 3, 3, 2}; | ||||
| unsigned int refl_rms[4]; // RMS of the reflection coefficients | unsigned int refl_rms[4]; // RMS of the reflection coefficients | ||||
| uint16_t block_coefs[4][30]; // LPC coefficients of each sub-block | uint16_t block_coefs[4][30]; // LPC coefficients of each sub-block | ||||
| @@ -160,9 +160,10 @@ static void backward_filter(float *hist, float *rec, const float *window, | |||||
| } | } | ||||
| static int ra288_decode_frame(AVCodecContext * avctx, void *data, | static int ra288_decode_frame(AVCodecContext * avctx, void *data, | ||||
| int *data_size, const uint8_t * buf, | |||||
| int buf_size) | |||||
| int *data_size, AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| float *out = data; | float *out = data; | ||||
| int i, j; | int i, j; | ||||
| RA288Context *ractx = avctx->priv_data; | RA288Context *ractx = avctx->priv_data; | ||||
| @@ -100,8 +100,10 @@ static void flip(AVCodecContext *avctx, AVPicture * picture){ | |||||
| static int raw_decode(AVCodecContext *avctx, | static int raw_decode(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| RawVideoContext *context = avctx->priv_data; | RawVideoContext *context = avctx->priv_data; | ||||
| AVFrame * frame = (AVFrame *) data; | AVFrame * frame = (AVFrame *) data; | ||||
| @@ -181,8 +181,10 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx) | |||||
| */ | */ | ||||
| static int rl2_decode_frame(AVCodecContext *avctx, | static int rl2_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| Rl2Context *s = avctx->priv_data; | Rl2Context *s = avctx->priv_data; | ||||
| if(s->frame.data[0]) | if(s->frame.data[0]) | ||||
| @@ -169,8 +169,10 @@ static av_cold int roq_decode_init(AVCodecContext *avctx) | |||||
| static int roq_decode_frame(AVCodecContext *avctx, | static int roq_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| RoqContext *s = avctx->priv_data; | RoqContext *s = avctx->priv_data; | ||||
| int copy= !s->current_frame->data[0]; | int copy= !s->current_frame->data[0]; | ||||
| @@ -241,8 +241,10 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx) | |||||
| static int rpza_decode_frame(AVCodecContext *avctx, | static int rpza_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| RpzaContext *s = avctx->priv_data; | RpzaContext *s = avctx->priv_data; | ||||
| s->buf = buf; | s->buf = buf; | ||||
| @@ -727,8 +727,10 @@ static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n) | |||||
| static int rv10_decode_frame(AVCodecContext *avctx, | static int rv10_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| MpegEncContext *s = avctx->priv_data; | MpegEncContext *s = avctx->priv_data; | ||||
| int i; | int i; | ||||
| AVFrame *pict = data; | AVFrame *pict = data; | ||||
| @@ -1370,8 +1370,10 @@ static int get_slice_offset(AVCodecContext *avctx, const uint8_t *buf, int n) | |||||
| int ff_rv34_decode_frame(AVCodecContext *avctx, | int ff_rv34_decode_frame(AVCodecContext *avctx, | ||||
| void *data, int *data_size, | void *data, int *data_size, | ||||
| const uint8_t *buf, int buf_size) | |||||
| AVPacket *avpkt) | |||||
| { | { | ||||
| const uint8_t *buf = avpkt->data; | |||||
| int buf_size = avpkt->size; | |||||
| RV34DecContext *r = avctx->priv_data; | RV34DecContext *r = avctx->priv_data; | ||||
| MpegEncContext *s = &r->s; | MpegEncContext *s = &r->s; | ||||
| AVFrame *pict = data; | AVFrame *pict = data; | ||||
| @@ -123,7 +123,7 @@ typedef struct RV34DecContext{ | |||||
| */ | */ | ||||
| int ff_rv34_get_start_offset(GetBitContext *gb, int blocks); | int ff_rv34_get_start_offset(GetBitContext *gb, int blocks); | ||||
| int ff_rv34_decode_init(AVCodecContext *avctx); | int ff_rv34_decode_init(AVCodecContext *avctx); | ||||
| int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size); | |||||
| int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt); | |||||
| int ff_rv34_decode_end(AVCodecContext *avctx); | int ff_rv34_decode_end(AVCodecContext *avctx); | ||||
| #endif /* AVCODEC_RV34_H */ | #endif /* AVCODEC_RV34_H */ | ||||