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