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
40 */40 */
41enum {41enum {
42 FRAMETYPE_INTRA = 0,42 FRAMETYPE_INTRA = 0,
43 FRAMETYPE_BIDIR1 = 1, ///< bidirectional frame43 FRAMETYPE_INTRA1 = 1, ///< intra frame with slightly different bitstream coding
44 FRAMETYPE_INTER = 2, ///< non-droppable P-frame44 FRAMETYPE_INTER = 2, ///< non-droppable P-frame
45 FRAMETYPE_BIDIR = 3, ///< bidirectional frame45 FRAMETYPE_BIDIR = 3, ///< bidirectional frame
46 FRAMETYPE_INTER_NOREF = 4, ///< droppable P-frame46 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_ANALYSER135#if IVI4_STREAM_ANALYSER
136 if ( ctx->frame_type == FRAMETYPE_BIDIR1136 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#endif138#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:

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