aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-09 05:47:49 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 16:51:09 +0200
commit0e3a1d60d3935d5cd0ce04b7e04572d32d528e68 (patch)
treee0cf105863d201045d06d0aeda0a08fbc06d6612
parenta45a6659914303d518f69d8ede8391de5783d3d2 (diff)
downloadffmpeg-0e3a1d60d3935d5cd0ce04b7e04572d32d528e68.tar.gz
cavsdec: fix qp fixed slice handling
Fixes Ticket3400 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 0accf24b15ac5a01a67768f41c896ef4e4b8b4a2) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/cavs.h1
-rw-r--r--libavcodec/cavsdec.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index f3c05dc9f0..f85140927b 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -214,6 +214,7 @@ typedef struct AVSContext {
int luma_scan[4];
int qp;
int qp_fixed;
+ int pic_qp_fixed;
int cbp;
ScanTable scantable;
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 74983a75a9..4502084901 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -900,7 +900,7 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb)
/* mark top macroblocks as unavailable */
h->flags &= ~(B_AVAIL | C_AVAIL);
- if ((h->mby == 0) && (!h->qp_fixed)) {
+ if (!h->pic_qp_fixed) {
h->qp_fixed = get_bits1(gb);
h->qp = get_bits(gb, 6);
}
@@ -1023,6 +1023,7 @@ static int decode_pic(AVSContext *h)
skip_bits1(&h->gb); //advanced_pred_mode_disable
skip_bits1(&h->gb); //top_field_first
skip_bits1(&h->gb); //repeat_first_field
+ h->pic_qp_fixed =
h->qp_fixed = get_bits1(&h->gb);
h->qp = get_bits(&h->gb, 6);
if (h->cur.f->pict_type == AV_PICTURE_TYPE_I) {