It turns out that this frame type is actually intra and should be used as a reference for interframes too.
Unified · Split
| @@ -40,7 +40,7 @@ · 39 unmodified lines | |||
| 40 | */ | 40 | */ |
| 41 | enum { | 41 | enum { |
| 42 | FRAMETYPE_INTRA = 0, | 42 | FRAMETYPE_INTRA = 0, |
| 43 | FRAMETYPE_BIDIR1 = 1, ///< bidirectional frame | 43 | FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding |
| 44 | FRAMETYPE_INTER = 2, ///< non-droppable P-frame | 44 | FRAMETYPE_INTER = 2, ///< non-droppable P-frame |
| 45 | FRAMETYPE_BIDIR = 3, ///< bidirectional frame | 45 | FRAMETYPE_BIDIR = 3, ///< bidirectional frame |
| 46 | FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame | 46 | FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame |
| @@ -133,8 +133,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx) · 86 unmodified lines | |||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | #if IVI4_STREAM_ANALYSER | 135 | #if IVI4_STREAM_ANALYSER |
| 136 | if ( ctx->frame_type == FRAMETYPE_BIDIR1 | 136 | if (ctx->frame_type == FRAMETYPE_BIDIR) |
| 137 | || ctx->frame_type == FRAMETYPE_BIDIR) | ||
| 138 | ctx->has_b_frames = 1; | 137 | ctx->has_b_frames = 1; |
| 139 | #endif | 138 | #endif |
| 140 | 139 | ||
| @@ -471,7 +470,8 @@ static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band, · 330 unmodified lines | |||
| 471 | } else { | 470 | } else { |
| 472 | if (band->inherit_mv) { | 471 | if (band->inherit_mv) { |
| 473 | mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */ | 472 | mb->type = ref_mb->type; /* copy mb_type from corresponding reference mb */ |
| 474 | } else if (ctx->frame_type == FRAMETYPE_INTRA) { | 473 | } else if (ctx->frame_type == FRAMETYPE_INTRA || |
| 474 | ctx->frame_type == FRAMETYPE_INTRA1) { | ||
| 475 | mb->type = 0; /* mb_type is always INTRA for intra-frames */ | 475 | mb->type = 0; /* mb_type is always INTRA for intra-frames */ |
| 476 | } else { | 476 | } else { |
| 477 | mb->type = get_bits(&ctx->gb, mb_type_bits); | 477 | mb->type = get_bits(&ctx->gb, mb_type_bits); |
| @@ -539,6 +539,7 @@ static void switch_buffers(IVI45DecContext *ctx) · 61 unmodified lines | |||
| 539 | { | 539 | { |
| 540 | switch (ctx->prev_frame_type) { | 540 | switch (ctx->prev_frame_type) { |
| 541 | case FRAMETYPE_INTRA: | 541 | case FRAMETYPE_INTRA: |
| 542 | case FRAMETYPE_INTRA1: | ||
| 542 | case FRAMETYPE_INTER: | 543 | case FRAMETYPE_INTER: |
| 543 | ctx->buf_switch ^= 1; | 544 | ctx->buf_switch ^= 1; |
| 544 | ctx->dst_buf = ctx->buf_switch; | 545 | ctx->dst_buf = ctx->buf_switch; |
| @@ -550,6 +551,7 @@ static void switch_buffers(IVI45DecContext *ctx) · 5 unmodified lines | |||
| 550 | 551 | ||
| 551 | switch (ctx->frame_type) { | 552 | switch (ctx->frame_type) { |
| 552 | case FRAMETYPE_INTRA: | 553 | case FRAMETYPE_INTRA: |
| 554 | case FRAMETYPE_INTRA1: | ||
| 553 | ctx->buf_switch = 0; | 555 | ctx->buf_switch = 0; |
| 554 | /* FALLTHROUGH */ | 556 | /* FALLTHROUGH */ |
| 555 | case FRAMETYPE_INTER: | 557 | case FRAMETYPE_INTER: |