API changes, most recent first:
+2012-02-21 - xxxxxxx - lavc 54.4.100
+ Add av_get_pcm_codec() function.
+
+2012-02-16 - xxxxxxx - libswr 0.7.100
+ Add swr_set_matrix() function.
+
+2012-02-09 - xxxxxxx - lavu 51.39.100
+ Add a new installed header libavutil/timestamp.h with timestamp
+ utilities.
+
+2012-02-06 - xxxxxxx - lavu 51.38.100
+ Add av_parse_ratio() function to parseutils.h.
+
+2012-02-06 - xxxxxxx - lavu 51.38.100
+ Add AV_LOG_MAX_OFFSET macro to log.h.
+
+2012-02-02 - xxxxxxx - lavu 51.37.100
+ Add public timecode helpers.
+
+2012-01-24 - xxxxxxx - lavfi 2.60.100
+ Add avfilter_graph_dump.
+
+ 2012-03-xx - xxxxxxx - lavc 54.7.0 - avcodec.h
+ Add av_codec_is_encoder/decoder().
+
2012-xx-xx - xxxxxxx - lavc 54.3.0 - avcodec.h
Add av_packet_shrink_side_data.
s->progressive_sequence = 1;
s->progressive_frame = 1;
s->picture_structure = PICT_FRAME;
+ s->first_field = 0;
s->frame_pred_frame_dct = 1;
s->chroma_format = 1;
- s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
+ if (s->codec_tag == AV_RL32("BW10")) {
+ s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO;
- avctx->sub_id = 1; /* indicates MPEG-1 */
+ } else {
+ exchange_uv(s); // common init reset pblocks, so we swap them here
+ s->swap_uv = 1; // in case of xvmc we need to swap uv for each MB
+ s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
- avctx->sub_id = 2; /* indicates MPEG-2 */
+ }
s1->save_width = s->width;
s1->save_height = s->height;
s1->save_progressive_seq = s->progressive_sequence;
#endif
{"noout", "skip bitstream encoding", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_NO_OUTPUT }, INT_MIN, INT_MAX, V|E, "flags2"},
{"local_header", "place global headers at every keyframe instead of in extradata", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_LOCAL_HEADER }, INT_MIN, INT_MAX, V|E, "flags2"},
+{"showall", "Show all frames before the first keyframe", 0, AV_OPT_TYPE_CONST, {.dbl = CODEC_FLAG2_SHOW_ALL }, INT_MIN, INT_MAX, V|D, "flags2"},
+ #if FF_API_SUB_ID
{"sub_id", NULL, OFFSET(sub_id), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, INT_MIN, INT_MAX},
+ #endif
{"me_method", "set motion estimation method", OFFSET(me_method), AV_OPT_TYPE_INT, {.dbl = ME_EPZS }, INT_MIN, INT_MAX, V|E, "me_method"},
{"zero", "zero motion estimation (fastest)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_ZERO }, INT_MIN, INT_MAX, V|E, "me_method" },
{"full", "full motion estimation (slowest)", 0, AV_OPT_TYPE_CONST, {.dbl = ME_FULL }, INT_MIN, INT_MAX, V|E, "me_method" },
typedef struct QpegContext{
AVCodecContext *avctx;
- AVFrame pic;
- uint8_t *refdata;
+ AVFrame pic, ref;
uint32_t pal[256];
+ GetByteContext buffer;
} QpegContext;
- static int qpeg_decode_intra(const uint8_t *src, uint8_t *dst, int size,
- int stride, int width, int height)
+ static void qpeg_decode_intra(QpegContext *qctx, uint8_t *dst,
+ int stride, int width, int height)
{
int i;
int code;
if(delta) {
/* motion compensation */
- while(size > 0 && (code & 0xF0) == 0xF0) {
- while((code & 0xF0) == 0xF0) {
++ while(bytestream2_get_bytes_left(&qctx->buffer) > 0 && (code & 0xF0) == 0xF0) {
if(delta == 1) {
int me_idx;
int me_w, me_h, me_x, me_y;
} else if(code >= 0xC0) { /* copy code: 0xC0..0xDF */
code &= 0x1F;
- if(code + 1 > size)
++ if(code + 1 > bytestream2_get_bytes_left(&qctx->buffer))
+ break;
+
for(i = 0; i <= code; i++) {
- dst[filled++] = *src++;
+ dst[filled++] = bytestream2_get_byte(&qctx->buffer);
if(filled >= width) {
filled = 0;
dst -= stride;
height--;
+ if(height < 0)
+ break;
}
}
- size -= code + 1;
} else if(code >= 0x80) { /* skip code: 0x80..0xBF */
int skip;
void *data, int *data_size,
AVPacket *avpkt)
{
- const uint8_t *buf = avpkt->data;
- int buf_size = avpkt->size;
+ uint8_t ctable[128];
QpegContext * const a = avctx->priv_data;
- AVFrame * const p = &a->pic;
+ AVFrame * p = &a->pic;
+ AVFrame * ref= &a->ref;
uint8_t* outdata;
- int delta;
+ int delta, ret = 0;
const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL);
- p->reference = 3;
- if (avctx->reget_buffer(avctx, p) < 0) {
- av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
+ if (avpkt->size < 0x86) {
+ av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
+ return AVERROR_INVALIDDATA;
+ }
+
+ bytestream2_init(&a->buffer, avpkt->data, avpkt->size);
++
+ if(ref->data[0])
+ avctx->release_buffer(avctx, ref);
+ FFSWAP(AVFrame, *ref, *p);
+
+ p->reference= 3;
+ if(avctx->get_buffer(avctx, p) < 0){
+ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
outdata = a->pic.data[0];
- if(buf[0x85] == 0x10) {
- ret = qpeg_decode_intra(buf+0x86, outdata, buf_size - 0x86, a->pic.linesize[0], avctx->width, avctx->height);
+ bytestream2_skip(&a->buffer, 4);
+ bytestream2_get_buffer(&a->buffer, ctable, 128);
+ bytestream2_skip(&a->buffer, 1);
+
+ delta = bytestream2_get_byte(&a->buffer);
+ if(delta == 0x10) {
+ qpeg_decode_intra(a, outdata, a->pic.linesize[0], avctx->width, avctx->height);
} else {
- delta = buf[0x85];
- qpeg_decode_inter(buf+0x86, outdata, buf_size - 0x86, a->pic.linesize[0], avctx->width, avctx->height, delta, buf + 4, a->ref.data[0]);
- qpeg_decode_inter(a, outdata, a->pic.linesize[0], avctx->width, avctx->height, delta, ctable, a->refdata);
++ qpeg_decode_inter(a, outdata, a->pic.linesize[0], avctx->width, avctx->height, delta, ctable, a->ref.data[0]);
}
- if (ret<0)
- return ret;
-
/* make the palette available on the way out */
if (pal) {
a->pic.palette_has_changed = 1;
goto free_and_end;
}
}
- if (codec_is_decoder(avctx->codec) && !avctx->bit_rate)
+
++ if (av_codec_is_decoder(avctx->codec) && !avctx->bit_rate)
+ avctx->bit_rate = get_bit_rate(avctx);
+
+ ret=0;
end:
entangled_thread_counter--;
{
AVCodec *p, *experimental=NULL;
p = first_avcodec;
+ id= remap_deprecated_codec_id(id);
while (p) {
- if (codec_is_encoder(p) && p->id == id) {
+ if (av_codec_is_encoder(p) && p->id == id) {
if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
experimental = p;
} else
AVCodec *avcodec_find_decoder(enum CodecID id)
{
- AVCodec *p;
+ AVCodec *p, *experimental=NULL;
p = first_avcodec;
+ id= remap_deprecated_codec_id(id);
while (p) {
- if (codec_is_decoder(p) && p->id == id) {
- if (av_codec_is_decoder(p) && p->id == id)
- return p;
++ if (av_codec_is_decoder(p) && p->id == id) {
+ if (p->capabilities & CODEC_CAP_EXPERIMENTAL && !experimental) {
+ experimental = p;
+ } else
+ return p;
+ }
p = p->next;
}
- return NULL;
+ return experimental;
}
AVCodec *avcodec_find_decoder_by_name(const char *name)
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 54
--#define LIBAVCODEC_VERSION_MINOR 7
-#define LIBAVCODEC_VERSION_MICRO 0
++#define LIBAVCODEC_VERSION_MINOR 8
+#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
do_image_formats dpx
fi
- if [ -n "$do_sun" ] ; then
+if [ -n "$do_xwd" ] ; then
+do_image_formats xwd
+fi
+
+ if [ -n "$do_sunrast" ] ; then
do_image_formats sun
fi