From 2ec8d4ebfc3f25c1e054407bff2db7847aa155a1 Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 22 Oct 2015 14:27:12 +0100 Subject: [PATCH 3/3] vl_mpeg12_decoder: support st/va where intra_matrix can be set after begin_frame Signed-off-by: Julien Isorce --- src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index 9d0e4a1..736fed58 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -603,6 +603,10 @@ vl_mpeg12_begin_frame(struct pipe_video_codec *decoder, assert(dec && target && picture); + /* Delay to next decode call. */ + if (!desc->intra_matrix) + return; + buf = vl_mpeg12_get_decode_buffer(dec, target); assert(buf); @@ -738,6 +742,9 @@ vl_mpeg12_decode_bitstream(struct pipe_video_codec *decoder, buf = vl_mpeg12_get_decode_buffer(dec, target); assert(buf); + if (!buf->mv_stream[0]) + decoder->begin_frame(decoder, target, picture); + for (i = 0; i < VL_NUM_COMPONENTS; ++i) vl_zscan_set_layout(&buf->zscan[i], desc->alternate_scan ? dec->zscan_alternate : dec->zscan_normal); -- 1.9.1