| @@ -369,7 +369,7 @@ static int rv34_decode_intra_mb_header(RV34DecContext *r, int8_t *intra_types) · 368 unmodified lines |
| 369 | 369 | |
| 370 | 370 | r->is16 = get_bits1(gb); |
| 371 | 371 | if(r->is16){ |
| 372 | | − s->cur_pic_ptr->mb_type[mb_pos] = MB_TYPE_INTRA16x16; |
| 372 | + s->cur_pic.mb_type[mb_pos] = MB_TYPE_INTRA16x16; |
| 373 | 373 | r->block_type = RV34_MB_TYPE_INTRA16x16; |
| 374 | 374 | t = get_bits(gb, 2); |
| 375 | 375 | fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0])); |
| @@ -379,7 +379,7 @@ static int rv34_decode_intra_mb_header(RV34DecContext *r, int8_t *intra_types) · 3 unmodified lines |
| 379 | 379 | if(!get_bits1(gb)) |
| 380 | 380 | av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n"); |
| 381 | 381 | } |
| 382 | | − s->cur_pic_ptr->mb_type[mb_pos] = MB_TYPE_INTRA; |
| 382 | + s->cur_pic.mb_type[mb_pos] = MB_TYPE_INTRA; |
| 383 | 383 | r->block_type = RV34_MB_TYPE_INTRA; |
| 384 | 384 | if(r->decode_intra_types(r, gb, intra_types) < 0) |
| 385 | 385 | return -1; |
| @@ -405,7 +405,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 19 unmodified lines |
| 405 | 405 | r->block_type = r->decode_mb_info(r); |
| 406 | 406 | if(r->block_type == -1) |
| 407 | 407 | return -1; |
| 408 | | − s->cur_pic_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type]; |
| 408 | + s->cur_pic.mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type]; |
| 409 | 409 | r->mb_type[mb_pos] = r->block_type; |
| 410 | 410 | if(r->block_type == RV34_MB_SKIP){ |
| 411 | 411 | if(s->pict_type == AV_PICTURE_TYPE_P) |
| @@ -413,7 +413,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 1 unmodified line |
| 413 | 413 | if(s->pict_type == AV_PICTURE_TYPE_B) |
| 414 | 414 | r->mb_type[mb_pos] = RV34_MB_B_DIRECT; |
| 415 | 415 | } |
| 416 | | − r->is16 = !!IS_INTRA16x16(s->cur_pic_ptr->mb_type[mb_pos]); |
| 416 | + r->is16 = !!IS_INTRA16x16(s->cur_pic.mb_type[mb_pos]); |
| 417 | 417 | if (rv34_decode_mv(r, r->block_type) < 0) |
| 418 | 418 | return -1; |
| 419 | 419 | if(r->block_type == RV34_MB_SKIP){ |
| @@ -423,7 +423,7 @@ static int rv34_decode_inter_mb_header(RV34DecContext *r, int8_t *intra_types) · 3 unmodified lines |
| 423 | 423 | r->chroma_vlc = 1; |
| 424 | 424 | r->luma_vlc = 0; |
| 425 | 425 | |
| 426 | | − if(IS_INTRA(s->cur_pic_ptr->mb_type[mb_pos])){ |
| 426 | + if (IS_INTRA(s->cur_pic.mb_type[mb_pos])) { |
| 427 | 427 | if(r->is16){ |
| 428 | 428 | t = get_bits(gb, 2); |
| 429 | 429 | fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0])); |
| @@ -482,33 +482,34 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int · 52 unmodified lines |
| 482 | 482 | int mx, my; |
| 483 | 483 | int* avail = r->avail_cache + avail_indexes[subblock_no]; |
| 484 | 484 | int c_off = part_sizes_w[block_type]; |
| 485 | + int16_t (*motion_val)[2] = s->cur_pic.motion_val[0]; |
| 485 | 486 | |
| 486 | 487 | mv_pos += (subblock_no & 1) + (subblock_no >> 1)*s->b8_stride; |
| 487 | 488 | if(subblock_no == 3) |
| 488 | 489 | c_off = -1; |
| 489 | 490 | |
| 490 | 491 | if(avail[-1]){ |
| 491 | | − A[0] = s->cur_pic_ptr->motion_val[0][mv_pos-1][0]; |
| 492 | | − A[1] = s->cur_pic_ptr->motion_val[0][mv_pos-1][1]; |
| 492 | + A[0] = motion_val[mv_pos-1][0]; |
| 493 | + A[1] = motion_val[mv_pos-1][1]; |
| 493 | 494 | } |
| 494 | 495 | if(avail[-4]){ |
| 495 | | − B[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride][0]; |
| 496 | | − B[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride][1]; |
| 496 | + B[0] = motion_val[mv_pos-s->b8_stride][0]; |
| 497 | + B[1] = motion_val[mv_pos-s->b8_stride][1]; |
| 497 | 498 | }else{ |
| 498 | 499 | B[0] = A[0]; |
| 499 | 500 | B[1] = A[1]; |
| 500 | 501 | } |
| 501 | 502 | if(!avail[c_off-4]){ |
| 502 | 503 | if(avail[-4] && (avail[-1] || r->rv30)){ |
| 503 | | − C[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride-1][0]; |
| 504 | | − C[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride-1][1]; |
| 504 | + C[0] = motion_val[mv_pos-s->b8_stride-1][0]; |
| 505 | + C[1] = motion_val[mv_pos-s->b8_stride-1][1]; |
| 505 | 506 | }else{ |
| 506 | 507 | C[0] = A[0]; |
| 507 | 508 | C[1] = A[1]; |
| 508 | 509 | } |
| 509 | 510 | }else{ |
| 510 | | − C[0] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][0]; |
| 511 | | − C[1] = s->cur_pic_ptr->motion_val[0][mv_pos-s->b8_stride+c_off][1]; |
| 511 | + C[0] = motion_val[mv_pos-s->b8_stride+c_off][0]; |
| 512 | + C[1] = motion_val[mv_pos-s->b8_stride+c_off][1]; |
| 512 | 513 | } |
| 513 | 514 | mx = mid_pred(A[0], B[0], C[0]); |
| 514 | 515 | my = mid_pred(A[1], B[1], C[1]); |
| @@ -516,8 +517,8 @@ static void rv34_pred_mv(RV34DecContext *r, int block_type, int subblock_no, int · 1 unmodified line |
| 516 | 517 | my += r->dmv[dmv_no][1]; |
| 517 | 518 | for(j = 0; j < part_sizes_h[block_type]; j++){ |
| 518 | 519 | for(i = 0; i < part_sizes_w[block_type]; i++){ |
| 519 | | − s->cur_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx; |
| 520 | | − s->cur_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][1] = my; |
| 520 | + motion_val[mv_pos + i + j*s->b8_stride][0] = mx; |
| 521 | + motion_val[mv_pos + i + j*s->b8_stride][1] = my; |
| 521 | 522 | } |
| 522 | 523 | } |
| 523 | 524 | } |
| @@ -566,7 +567,7 @@ static void rv34_pred_mv_b(RV34DecContext *r, int block_type, int dir) · 42 unmodified lines |
| 566 | 567 | int has_A = 0, has_B = 0, has_C = 0; |
| 567 | 568 | int mx, my; |
| 568 | 569 | int i, j; |
| 569 | | − Picture *cur_pic = s->cur_pic_ptr; |
| 570 | + Picture *cur_pic = &s->cur_pic; |
| 570 | 571 | const int mask = dir ? MB_TYPE_L1 : MB_TYPE_L0; |
| 571 | 572 | int type = cur_pic->mb_type[mb_pos]; |
| 572 | 573 | |
| @@ -619,27 +620,27 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir) · 46 unmodified lines |
| 619 | 620 | int* avail = r->avail_cache + avail_indexes[0]; |
| 620 | 621 | |
| 621 | 622 | if(avail[-1]){ |
| 622 | | − A[0] = s->cur_pic_ptr->motion_val[0][mv_pos - 1][0]; |
| 623 | | − A[1] = s->cur_pic_ptr->motion_val[0][mv_pos - 1][1]; |
| 623 | + A[0] = s->cur_pic.motion_val[0][mv_pos - 1][0]; |
| 624 | + A[1] = s->cur_pic.motion_val[0][mv_pos - 1][1]; |
| 624 | 625 | } |
| 625 | 626 | if(avail[-4]){ |
| 626 | | − B[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride][0]; |
| 627 | | − B[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride][1]; |
| 627 | + B[0] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride][0]; |
| 628 | + B[1] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride][1]; |
| 628 | 629 | }else{ |
| 629 | 630 | B[0] = A[0]; |
| 630 | 631 | B[1] = A[1]; |
| 631 | 632 | } |
| 632 | 633 | if(!avail[-4 + 2]){ |
| 633 | 634 | if(avail[-4] && (avail[-1])){ |
| 634 | | − C[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride - 1][0]; |
| 635 | | − C[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride - 1][1]; |
| 635 | + C[0] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride - 1][0]; |
| 636 | + C[1] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride - 1][1]; |
| 636 | 637 | }else{ |
| 637 | 638 | C[0] = A[0]; |
| 638 | 639 | C[1] = A[1]; |
| 639 | 640 | } |
| 640 | 641 | }else{ |
| 641 | | − C[0] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride + 2][0]; |
| 642 | | − C[1] = s->cur_pic_ptr->motion_val[0][mv_pos - s->b8_stride + 2][1]; |
| 642 | + C[0] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride + 2][0]; |
| 643 | + C[1] = s->cur_pic.motion_val[0][mv_pos - s->b8_stride + 2][1]; |
| 643 | 644 | } |
| 644 | 645 | mx = mid_pred(A[0], B[0], C[0]); |
| 645 | 646 | my = mid_pred(A[1], B[1], C[1]); |
| @@ -648,8 +649,8 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir) · 2 unmodified lines |
| 648 | 649 | for(j = 0; j < 2; j++){ |
| 649 | 650 | for(i = 0; i < 2; i++){ |
| 650 | 651 | for(k = 0; k < 2; k++){ |
| 651 | | − s->cur_pic_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx; |
| 652 | | − s->cur_pic_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][1] = my; |
| 652 | + s->cur_pic.motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx; |
| 653 | + s->cur_pic.motion_val[k][mv_pos + i + j*s->b8_stride][1] = my; |
| 653 | 654 | } |
| 654 | 655 | } |
| 655 | 656 | } |
| @@ -685,27 +686,28 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, · 29 unmodified lines |
| 685 | 686 | int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride + mv_off; |
| 686 | 687 | int is16x16 = 1; |
| 687 | 688 | int emu = 0; |
| 689 | + int16_t *motion_val = s->cur_pic.motion_val[dir][mv_pos]; |
| 688 | 690 | |
| 689 | 691 | if(thirdpel){ |
| 690 | 692 | int chroma_mx, chroma_my; |
| 691 | | − mx = (s->cur_pic_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) / 3 - (1 << 24); |
| 692 | | − my = (s->cur_pic_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) / 3 - (1 << 24); |
| 693 | | − lx = (s->cur_pic_ptr->motion_val[dir][mv_pos][0] + (3 << 24)) % 3; |
| 694 | | − ly = (s->cur_pic_ptr->motion_val[dir][mv_pos][1] + (3 << 24)) % 3; |
| 695 | | − chroma_mx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] / 2; |
| 696 | | − chroma_my = s->cur_pic_ptr->motion_val[dir][mv_pos][1] / 2; |
| 693 | + mx = (motion_val[0] + (3 << 24)) / 3 - (1 << 24); |
| 694 | + my = (motion_val[1] + (3 << 24)) / 3 - (1 << 24); |
| 695 | + lx = (motion_val[0] + (3 << 24)) % 3; |
| 696 | + ly = (motion_val[1] + (3 << 24)) % 3; |
| 697 | + chroma_mx = motion_val[0] / 2; |
| 698 | + chroma_my = motion_val[1] / 2; |
| 697 | 699 | umx = (chroma_mx + (3 << 24)) / 3 - (1 << 24); |
| 698 | 700 | umy = (chroma_my + (3 << 24)) / 3 - (1 << 24); |
| 699 | 701 | uvmx = chroma_coeffs[(chroma_mx + (3 << 24)) % 3]; |
| 700 | 702 | uvmy = chroma_coeffs[(chroma_my + (3 << 24)) % 3]; |
| 701 | 703 | }else{ |
| 702 | 704 | int cx, cy; |
| 703 | | − mx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] >> 2; |
| 704 | | − my = s->cur_pic_ptr->motion_val[dir][mv_pos][1] >> 2; |
| 705 | | − lx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] & 3; |
| 706 | | − ly = s->cur_pic_ptr->motion_val[dir][mv_pos][1] & 3; |
| 707 | | − cx = s->cur_pic_ptr->motion_val[dir][mv_pos][0] / 2; |
| 708 | | − cy = s->cur_pic_ptr->motion_val[dir][mv_pos][1] / 2; |
| 705 | + mx = motion_val[0] >> 2; |
| 706 | + my = motion_val[1] >> 2; |
| 707 | + lx = motion_val[0] & 3; |
| 708 | + ly = motion_val[1] & 3; |
| 709 | + cx = motion_val[0] / 2; |
| 710 | + cy = motion_val[1] / 2; |
| 709 | 711 | umx = cx >> 2; |
| 710 | 712 | umy = cy >> 2; |
| 711 | 713 | uvmx = (cx & 3) << 1; |
| @@ -723,9 +725,9 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type, · 11 unmodified lines |
| 723 | 725 | } |
| 724 | 726 | |
| 725 | 727 | dxy = ly*4 + lx; |
| 726 | | − srcY = dir ? s->next_pic_ptr->f->data[0] : s->last_pic_ptr->f->data[0]; |
| 727 | | − srcU = dir ? s->next_pic_ptr->f->data[1] : s->last_pic_ptr->f->data[1]; |
| 728 | | − srcV = dir ? s->next_pic_ptr->f->data[2] : s->last_pic_ptr->f->data[2]; |
| 728 | + srcY = dir ? s->next_pic.data[0] : s->last_pic.data[0]; |
| 729 | + srcU = dir ? s->next_pic.data[1] : s->last_pic.data[1]; |
| 730 | + srcV = dir ? s->next_pic.data[2] : s->last_pic.data[2]; |
| 729 | 731 | src_x = s->mb_x * 16 + xoff + mx; |
| 730 | 732 | src_y = s->mb_y * 16 + yoff + my; |
| 731 | 733 | uvsrc_x = s->mb_x * 8 + (xoff >> 1) + umx; |
| @@ -886,11 +888,11 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type) · 154 unmodified lines |
| 886 | 888 | switch(block_type){ |
| 887 | 889 | case RV34_MB_TYPE_INTRA: |
| 888 | 890 | case RV34_MB_TYPE_INTRA16x16: |
| 889 | | − ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 891 | + ZERO8x2(s->cur_pic.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 890 | 892 | return 0; |
| 891 | 893 | case RV34_MB_SKIP: |
| 892 | 894 | if(s->pict_type == AV_PICTURE_TYPE_P){ |
| 893 | | − ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 895 | + ZERO8x2(s->cur_pic.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 894 | 896 | rv34_mc_1mv (r, block_type, 0, 0, 0, 2, 2, 0); |
| 895 | 897 | break; |
| 896 | 898 | } |
| @@ -900,21 +902,21 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type) · 3 unmodified lines |
| 900 | 902 | if (HAVE_THREADS && (s->avctx->active_thread_type & FF_THREAD_FRAME)) |
| 901 | 903 | ff_thread_await_progress(&s->next_pic_ptr->tf, FFMAX(0, s->mb_y-1), 0); |
| 902 | 904 | |
| 903 | | − next_bt = s->next_pic_ptr->mb_type[s->mb_x + s->mb_y * s->mb_stride]; |
| 905 | + next_bt = s->next_pic.mb_type[s->mb_x + s->mb_y * s->mb_stride]; |
| 904 | 906 | if(IS_INTRA(next_bt) || IS_SKIP(next_bt)){ |
| 905 | | − ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 906 | | − ZERO8x2(s->cur_pic_ptr->motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 907 | + ZERO8x2(s->cur_pic.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 908 | + ZERO8x2(s->cur_pic.motion_val[1][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 907 | 909 | }else |
| 908 | 910 | for(j = 0; j < 2; j++) |
| 909 | 911 | for(i = 0; i < 2; i++) |
| 910 | 912 | for(k = 0; k < 2; k++) |
| 911 | 913 | for(l = 0; l < 2; l++) |
| 912 | | − s->cur_pic_ptr->motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_pic_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][k]); |
| 914 | + s->cur_pic.motion_val[l][mv_pos + i + j*s->b8_stride][k] = calc_add_mv(r, l, s->next_pic.motion_val[0][mv_pos + i + j*s->b8_stride][k]); |
| 913 | 915 | if(!(IS_16X8(next_bt) || IS_8X16(next_bt) || IS_8X8(next_bt))) //we can use whole macroblock MC |
| 914 | 916 | rv34_mc_2mv(r, block_type); |
| 915 | 917 | else |
| 916 | 918 | rv34_mc_2mv_skip(r); |
| 917 | | − ZERO8x2(s->cur_pic_ptr->motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 919 | + ZERO8x2(s->cur_pic.motion_val[0][s->mb_x * 2 + s->mb_y * 2 * s->b8_stride], s->b8_stride); |
| 918 | 920 | break; |
| 919 | 921 | case RV34_MB_P_16x16: |
| 920 | 922 | case RV34_MB_P_MIX16x16: |
| @@ -1182,7 +1184,7 @@ static int rv34_set_deblock_coef(RV34DecContext *r) · 261 unmodified lines |
| 1182 | 1184 | MpegEncContext *s = &r->s; |
| 1183 | 1185 | int hmvmask = 0, vmvmask = 0, i, j; |
| 1184 | 1186 | int midx = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride; |
| 1185 | | − int16_t (*motion_val)[2] = &s->cur_pic_ptr->motion_val[0][midx]; |
| 1187 | + int16_t (*motion_val)[2] = &s->cur_pic.motion_val[0][midx]; |
| 1186 | 1188 | for(j = 0; j < 16; j += 8){ |
| 1187 | 1189 | for(i = 0; i < 2; i++){ |
| 1188 | 1190 | if(is_mv_diff_gt_3(motion_val + i, 1)) |
| @@ -1225,26 +1227,26 @@ static int rv34_decode_inter_macroblock(RV34DecContext *r, int8_t *intra_types) · 36 unmodified lines |
| 1225 | 1227 | dist = (s->mb_x - s->resync_mb_x) + (s->mb_y - s->resync_mb_y) * s->mb_width; |
| 1226 | 1228 | if(s->mb_x && dist) |
| 1227 | 1229 | r->avail_cache[5] = |
| 1228 | | − r->avail_cache[9] = s->cur_pic_ptr->mb_type[mb_pos - 1]; |
| 1230 | + r->avail_cache[9] = s->cur_pic.mb_type[mb_pos - 1]; |
| 1229 | 1231 | if(dist >= s->mb_width) |
| 1230 | 1232 | r->avail_cache[2] = |
| 1231 | | − r->avail_cache[3] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride]; |
| 1233 | + r->avail_cache[3] = s->cur_pic.mb_type[mb_pos - s->mb_stride]; |
| 1232 | 1234 | if(((s->mb_x+1) < s->mb_width) && dist >= s->mb_width - 1) |
| 1233 | | − r->avail_cache[4] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride + 1]; |
| 1235 | + r->avail_cache[4] = s->cur_pic.mb_type[mb_pos - s->mb_stride + 1]; |
| 1234 | 1236 | if(s->mb_x && dist > s->mb_width) |
| 1235 | | − r->avail_cache[1] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride - 1]; |
| 1237 | + r->avail_cache[1] = s->cur_pic.mb_type[mb_pos - s->mb_stride - 1]; |
| 1236 | 1238 | |
| 1237 | 1239 | s->qscale = r->si.quant; |
| 1238 | 1240 | cbp = cbp2 = rv34_decode_inter_mb_header(r, intra_types); |
| 1239 | 1241 | r->cbp_luma [mb_pos] = cbp; |
| 1240 | 1242 | r->cbp_chroma[mb_pos] = cbp >> 16; |
| 1241 | 1243 | r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r) | r->cbp_luma[mb_pos]; |
| 1242 | | − s->cur_pic_ptr->qscale_table[mb_pos] = s->qscale; |
| 1244 | + s->cur_pic.qscale_table[mb_pos] = s->qscale; |
| 1243 | 1245 | |
| 1244 | 1246 | if(cbp == -1) |
| 1245 | 1247 | return -1; |
| 1246 | 1248 | |
| 1247 | | − if (IS_INTRA(s->cur_pic_ptr->mb_type[mb_pos])){ |
| 1249 | + if (IS_INTRA(s->cur_pic.mb_type[mb_pos])) { |
| 1248 | 1250 | if(r->is16) rv34_output_i16x16(r, intra_types, cbp); |
| 1249 | 1251 | else rv34_output_intra(r, intra_types, cbp); |
| 1250 | 1252 | return 0; |
| @@ -1327,21 +1329,21 @@ static int rv34_decode_intra_macroblock(RV34DecContext *r, int8_t *intra_types) · 76 unmodified lines |
| 1327 | 1329 | dist = (s->mb_x - s->resync_mb_x) + (s->mb_y - s->resync_mb_y) * s->mb_width; |
| 1328 | 1330 | if(s->mb_x && dist) |
| 1329 | 1331 | r->avail_cache[5] = |
| 1330 | | − r->avail_cache[9] = s->cur_pic_ptr->mb_type[mb_pos - 1]; |
| 1332 | + r->avail_cache[9] = s->cur_pic.mb_type[mb_pos - 1]; |
| 1331 | 1333 | if(dist >= s->mb_width) |
| 1332 | 1334 | r->avail_cache[2] = |
| 1333 | | − r->avail_cache[3] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride]; |
| 1335 | + r->avail_cache[3] = s->cur_pic.mb_type[mb_pos - s->mb_stride]; |
| 1334 | 1336 | if(((s->mb_x+1) < s->mb_width) && dist >= s->mb_width - 1) |
| 1335 | | − r->avail_cache[4] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride + 1]; |
| 1337 | + r->avail_cache[4] = s->cur_pic.mb_type[mb_pos - s->mb_stride + 1]; |
| 1336 | 1338 | if(s->mb_x && dist > s->mb_width) |
| 1337 | | − r->avail_cache[1] = s->cur_pic_ptr->mb_type[mb_pos - s->mb_stride - 1]; |
| 1339 | + r->avail_cache[1] = s->cur_pic.mb_type[mb_pos - s->mb_stride - 1]; |
| 1338 | 1340 | |
| 1339 | 1341 | s->qscale = r->si.quant; |
| 1340 | 1342 | cbp = rv34_decode_intra_mb_header(r, intra_types); |
| 1341 | 1343 | r->cbp_luma [mb_pos] = cbp; |
| 1342 | 1344 | r->cbp_chroma[mb_pos] = cbp >> 16; |
| 1343 | 1345 | r->deblock_coefs[mb_pos] = 0xFFFF; |
| 1344 | | − s->cur_pic_ptr->qscale_table[mb_pos] = s->qscale; |
| 1346 | + s->cur_pic.qscale_table[mb_pos] = s->qscale; |
| 1345 | 1347 | |
| 1346 | 1348 | if(cbp == -1) |
| 1347 | 1349 | return -1; |