Revision e7e81959

View differences:

libavcodec/vp8.c
123 123
    int segment;             ///< segment of the current macroblock
124 124

  
125 125
    int mbskip_enabled;
126
    uint8_t mbskip_proba;
127
    uint8_t intra_proba;
128
    uint8_t last_proba;
129
    uint8_t golden_proba;
126 130
    int sign_bias[4]; ///< one state [0, 1] per ref frame type
127 131
    int ref_count[3];
128 132

  
......
188 192
     */
189 193
    struct {
190 194
        uint8_t segmentid[3];
191
        uint8_t mbskip;
192
        uint8_t intra;
193
        uint8_t last;
194
        uint8_t golden;
195 195
        uint8_t pred16x16[4];
196 196
        uint8_t pred8x8c[3];
197 197
        uint8_t token[4][8][3][NUM_DCT_TOKENS-1];
......
499 499
                        s->prob->token[i][j][k][l] = vp8_rac_get_uint(c, 8);
500 500

  
501 501
    if ((s->mbskip_enabled = vp8_rac_get(c)))
502
        s->prob->mbskip = vp8_rac_get_uint(c, 8);
502
        s->mbskip_proba = vp8_rac_get_uint(c, 8);
503 503

  
504 504
    if (!s->keyframe) {
505
        s->prob->intra  = vp8_rac_get_uint(c, 8);
506
        s->prob->last   = vp8_rac_get_uint(c, 8);
507
        s->prob->golden = vp8_rac_get_uint(c, 8);
505
        s->intra_proba  = vp8_rac_get_uint(c, 8);
506
        s->last_proba   = vp8_rac_get_uint(c, 8);
507
        s->golden_proba = vp8_rac_get_uint(c, 8);
508 508

  
509 509
        if (vp8_rac_get(c))
510 510
            for (i = 0; i < 4; i++)
......
725 725
        *segment = vp8_rac_get_tree(c, vp8_segmentid_tree, s->prob->segmentid);
726 726
    s->segment = *segment;
727 727

  
728
    mb->skip = s->mbskip_enabled ? vp56_rac_get_prob(c, s->prob->mbskip) : 0;
728
    mb->skip = s->mbskip_enabled ? vp56_rac_get_prob(c, s->mbskip_proba) : 0;
729 729

  
730 730
    if (s->keyframe) {
731 731
        mb->mode = vp8_rac_get_tree(c, vp8_pred16x16_tree_intra, vp8_pred16x16_prob_intra);
......
737 737

  
738 738
        s->chroma_pred_mode = vp8_rac_get_tree(c, vp8_pred8x8c_tree, vp8_pred8x8c_prob_intra);
739 739
        mb->ref_frame = VP56_FRAME_CURRENT;
740
    } else if (vp56_rac_get_prob_branchy(c, s->prob->intra)) {
740
    } else if (vp56_rac_get_prob_branchy(c, s->intra_proba)) {
741 741
        VP56mv near[2], best;
742 742
        uint8_t cnt[4] = { 0 };
743 743
        uint8_t p[4];
744 744

  
745 745
        // inter MB, 16.2
746
        if (vp56_rac_get_prob_branchy(c, s->prob->last))
747
            mb->ref_frame = vp56_rac_get_prob(c, s->prob->golden) ?
746
        if (vp56_rac_get_prob_branchy(c, s->last_proba))
747
            mb->ref_frame = vp56_rac_get_prob(c, s->golden_proba) ?
748 748
                VP56_FRAME_GOLDEN2 /* altref */ : VP56_FRAME_GOLDEN;
749 749
        else
750 750
            mb->ref_frame = VP56_FRAME_PREVIOUS;

Also available in: Unified diff