From 09ce846206ff9a112cc1e2727d0ba4b5f0216d9c Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 29 Mar 2011 11:07:29 +0200 Subject: vaapi: filter out DELAYED_PIC_REF flag to determine field. This fixes ticket #23. (cherry picked from commit 621f4c98df4ee9fd604a614f31e09eef9dd7d3ca) Signed-off-by: Reinhard Tartler --- libavcodec/vaapi_h264.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index f94e679ed0..805e4ef651 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -55,6 +55,7 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic, { if (pic_structure == 0) pic_structure = pic->reference; + pic_structure &= PICT_FRAME; /* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */ va_pic->picture_id = ff_vaapi_get_surface_id(pic); va_pic->frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num; -- cgit v1.2.3 From da21440d46244c424ef4782a18fbcf6823d308fd Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Tue, 29 Mar 2011 10:52:15 +0200 Subject: vaapi: cope with VA-API 0.32, i.e. fix VC-1 decoding on Sandy Bridge. (cherry picked from commit a18e7b4fb77d3799cf21110b5e6dda4691a295b3) Signed-off-by: Reinhard Tartler --- libavcodec/vaapi_vc1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index d826cc1dfe..5bce82992d 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -160,6 +160,9 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t pic_param->sequence_fields.bits.syncmarker = s->resync_marker; pic_param->sequence_fields.bits.rangered = v->rangered; pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames; +#if VA_CHECK_VERSION(0,32,0) + pic_param->sequence_fields.bits.profile = v->profile; +#endif pic_param->coded_width = s->avctx->coded_width; pic_param->coded_height = s->avctx->coded_height; pic_param->entrypoint_fields.value = 0; /* reset all bits */ -- cgit v1.2.3 From 17ca374c7d09b9f0c102709f2437a3a76de7bad0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 9 Apr 2011 07:30:33 +0200 Subject: avformat.h: fix a misplaced #endif --- libavformat/avformat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 5c8456f337..24c7958111 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -998,8 +998,8 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload, #if FF_API_PKT_DUMP attribute_deprecated void av_pkt_dump(FILE *f, AVPacket *pkt, int dump_payload); attribute_deprecated void av_pkt_dump_log(void *avcl, int level, AVPacket *pkt, -#endif int dump_payload); +#endif /** * Initialize libavformat and register all the muxers, demuxers and -- cgit v1.2.3 From f82163cf1c0515a59e6aed9748a17604f892c310 Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Fri, 1 Apr 2011 20:24:46 -0400 Subject: Use consistent condition for whether to run slice-threading execute function. Signed-off-by: Ronald S. Bultje --- libavcodec/mpeg12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 06aa8aba58..3e9f74a696 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -2301,7 +2301,7 @@ static int decode_chunks(AVCodecContext *avctx, break; case PICTURE_START_CODE: - if (avctx->thread_count > 1 && s->slice_count) { + if (HAVE_THREADS && (avctx->active_thread_type&FF_THREAD_SLICE) && s->slice_count) { int i; avctx->execute(avctx, slice_decode_thread, -- cgit v1.2.3 From cf39b461d31a213261cb7dab21e8aeb0bb1673d5 Mon Sep 17 00:00:00 2001 From: Alexander Strange Date: Sun, 3 Apr 2011 15:54:14 -0400 Subject: pthread: validate_thread_parameters() ignored slice-threading being intentionally off The thread_type API allows you to request only FF_THREAD_FRAME (instead of FRAME | SLICE), but it was being ignored. We don't implement both of them at the same time, so there isn't an effect on current codecs, except that you can request no kinds of threading now (a bit useless). Signed-off-by: Ronald S. Bultje --- libavcodec/pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 70845f0ba0..ba6e395d75 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -877,7 +877,7 @@ static void validate_thread_parameters(AVCodecContext *avctx) avctx->active_thread_type = 0; } else if (frame_threading_supported && (avctx->thread_type & FF_THREAD_FRAME)) { avctx->active_thread_type = FF_THREAD_FRAME; - } else { + } else if (avctx->thread_type & FF_THREAD_SLICE) { avctx->active_thread_type = FF_THREAD_SLICE; } } -- cgit v1.2.3 From 347b375a80afbb27c887a243097c09370cb95d19 Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Fri, 8 Apr 2011 14:35:17 -0700 Subject: daud: Don't write packets that are too large to have their size expressed in the bytestream. --- libavformat/daud.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavformat/daud.c b/libavformat/daud.c index ca9be27905..1b3cfcf2d9 100644 --- a/libavformat/daud.c +++ b/libavformat/daud.c @@ -57,6 +57,11 @@ static int daud_write_header(struct AVFormatContext *s) static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt) { + if (pkt->size > 65535) { + av_log(s, AV_LOG_ERROR, + "Packet size too large for s302m. (%d > 65535)\n", pkt->size); + return -1; + } avio_wb16(s->pb, pkt->size); avio_wb16(s->pb, 0x8010); // unknown avio_write(s->pb, pkt->data, pkt->size); -- cgit v1.2.3