History

indeo4: handle frame type 1 properly

It turns out that this frame type is actually intra and should be used as a reference for interframes too.

Kostya Shishkov committed 14 years ago

Commit e1a3fa51 parent 03e098e1 file · +6 −4Browse files

Unified · Split

libavcodec/indeo4.c+6−4
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 */
4141 enum {
4242 FRAMETYPE_INTRA = 0,
43− FRAMETYPE_BIDIR1 = 1, ///< bidirectional frame
43+ FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding
4444 FRAMETYPE_INTER = 2, ///< non-droppable P-frame
4545 FRAMETYPE_BIDIR = 3, ///< bidirectional frame
4646 FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame
@@ -133,8 +133,7 @@ static int decode_pic_hdr(IVI45DecContext *ctx, AVCodecContext *avctx) · 86 unmodified lines
133133 }
134134
135135 #if IVI4_STREAM_ANALYSER
136− if ( ctx->frame_type == FRAMETYPE_BIDIR1
137− || ctx->frame_type == FRAMETYPE_BIDIR)
136+ if (ctx->frame_type == FRAMETYPE_BIDIR)
138137 ctx->has_b_frames = 1;
139138 #endif
140139
@@ -471,7 +470,8 @@ static int decode_mb_info(IVI45DecContext *ctx, IVIBandDesc *band, · 330 unmodified lines
471470 } else {
472471 if (band->inherit_mv) {
473472 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) {
475475 mb->type = 0; /* mb_type is always INTRA for intra-frames */
476476 } else {
477477 mb->type = get_bits(&ctx->gb, mb_type_bits);
@@ -539,6 +539,7 @@ static void switch_buffers(IVI45DecContext *ctx) · 61 unmodified lines
539539 {
540540 switch (ctx->prev_frame_type) {
541541 case FRAMETYPE_INTRA:
542+ case FRAMETYPE_INTRA1:
542543 case FRAMETYPE_INTER:
543544 ctx->buf_switch ^= 1;
544545 ctx->dst_buf = ctx->buf_switch;
@@ -550,6 +551,7 @@ static void switch_buffers(IVI45DecContext *ctx) · 5 unmodified lines
550551
551552 switch (ctx->frame_type) {
552553 case FRAMETYPE_INTRA:
554+ case FRAMETYPE_INTRA1:
553555 ctx->buf_switch = 0;
554556 /* FALLTHROUGH */
555557 case FRAMETYPE_INTER:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t