Mercurial > libavcodec.hg
comparison 8svx.c @ 9355:54bc8a2727b0 libavcodec
Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an
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.
author | rbultje |
---|---|
date | Tue, 07 Apr 2009 15:59:50 +0000 |
parents | e9d9d946f213 |
children | 8a4984c5cacc |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
40 static const int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, -4<<8, -2<<8, -1<<8, | 40 static const int16_t exponential[16] = { -128<<8, -64<<8, -32<<8, -16<<8, -8<<8, -4<<8, -2<<8, -1<<8, |
41 0, 1<<8, 2<<8, 4<<8, 8<<8, 16<<8, 32<<8, 64<<8 }; | 41 0, 1<<8, 2<<8, 4<<8, 8<<8, 16<<8, 32<<8, 64<<8 }; |
42 | 42 |
43 /** decode a frame */ | 43 /** decode a frame */ |
44 static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 44 static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
45 const uint8_t *buf, int buf_size) | 45 AVPacket *avpkt) |
46 { | 46 { |
47 const uint8_t *buf = avpkt->data; | |
48 int buf_size = avpkt->size; | |
47 EightSvxContext *esc = avctx->priv_data; | 49 EightSvxContext *esc = avctx->priv_data; |
48 int16_t *out_data = data; | 50 int16_t *out_data = data; |
49 int consumed = buf_size; | 51 int consumed = buf_size; |
50 const uint8_t *buf_end = buf + buf_size; | 52 const uint8_t *buf_end = buf + buf_size; |
51 | 53 |