Revision 09b85c13

View differences:

libavcodec/indeo3.c
306 306
  long *width_tbl, width_tbl_arr[10];
307 307
  char *ref_vectors;
308 308
  unsigned char *cur_frm_pos, *ref_frm_pos, *cp, *cp2;
309
  unsigned long *cur_lp, *ref_lp, *correction_lp[2], *correctionloworder_lp[2],
310
    *correctionhighorder_lp[2];
309
  uint32_t *cur_lp, *ref_lp;
310
  const uint32_t *correction_lp[2], *correctionloworder_lp[2], *correctionhighorder_lp[2];
311 311
  unsigned short *correction_type_sp[2];
312 312
  ustr_t strip_tbl[20], *strip;
313 313
  int i, j, k, lp1, lp2, flag1, cmd, blks_width, blks_height, region_160_width,
......
399 399
      if(cmd == 0 || ref_vectors != NULL) {
400 400
        for(lp1 = 0; lp1 < blks_width; lp1++) {
401 401
          for(i = 0, j = 0; i < blks_height; i++, j += width_tbl[1])
402
            ((unsigned long *)cur_frm_pos)[j] = ((unsigned long *)ref_frm_pos)[j];
402
            ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j];
403 403
          cur_frm_pos += 4;
404 404
          ref_frm_pos += 4;
405 405
        }
......
414 414
      if((lv - 8) <= 7 && (k == 0 || k == 3 || k == 10)) {
415 415
        cp2 = s->ModPred + ((lv - 8) << 7);
416 416
        cp = ref_frm_pos;
417
        for(i = 0; i < blks_width << 2; i++) { *(cp++) = cp2[*cp >> 1]; }
417
        for(i = 0; i < blks_width << 2; i++) { 
418
            int v = *cp >> 1;
419
            *(cp++) = cp2[v]; 
420
        }
418 421
      }
419 422

  
420 423
      if(k == 1 || k == 4) {
......
438 441
            for(lp1 = 0; lp1 < blks_width; lp1++) {
439 442
              for(lp2 = 0; lp2 < 4; ) {
440 443
                k = *buf1++;
441
                cur_lp = ((unsigned long *)cur_frm_pos) + width_tbl[lp2];
442
                ref_lp = ((unsigned long *)ref_frm_pos) + width_tbl[lp2];
444
                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2];
445
                ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2];
443 446

  
444 447
                switch(correction_type_sp[0][k]) {
445 448
                  case 0:
......
540 543
              for(lp2 = 0; lp2 < 4; ) {
541 544
                k = *buf1++;
542 545

  
543
                cur_lp = ((unsigned long *)cur_frm_pos) + width_tbl[lp2 * 2];
544
                ref_lp = ((unsigned long *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
546
                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
547
                ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
545 548

  
546 549
                switch(correction_type_sp[lp2 & 0x01][k]) {
547 550
                  case 0:
......
652 655
              for(lp1 = 0; lp1 < blks_width; lp1 += 2) {
653 656
                for(lp2 = 0; lp2 < 4; ) {
654 657
                  k = *buf1++;
655
                  cur_lp = ((unsigned long *)cur_frm_pos) + width_tbl[lp2 * 2];
656
                  ref_lp = ((unsigned long *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
658
                  cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
659
                  ref_lp = ((uint32_t *)cur_frm_pos) + width_tbl[(lp2 * 2) - 1];
657 660
                  lv1 = ref_lp[0];
658 661
                  lv2 = ref_lp[1];
659 662
                  if(lp2 == 0 && flag1 != 0) {
......
814 817
              for(lp1 = 0; lp1 < blks_width; lp1 += 2) {
815 818
                for(lp2 = 0; lp2 < 4; ) {
816 819
                  k = *buf1++;
817
                  cur_lp = ((unsigned long *)cur_frm_pos) + width_tbl[lp2 * 2];
818
                  ref_lp = ((unsigned long *)ref_frm_pos) + width_tbl[lp2 * 2];
820
                  cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
821
                  ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2];
819 822

  
820 823
                  switch(correction_type_sp[lp2 & 0x01][k]) {
821 824
                    case 0:
......
862 865
                      if(lp2 == 0) {
863 866
                        RLE_V3_CHECK(buf1,rle_v1,rle_v2,rle_v3)
864 867
                        for(i = 0, j = 0; i < 8; i++, j += width_tbl[1]) {
865
                          ((unsigned long *)cur_frm_pos)[j] = ((unsigned long *)ref_frm_pos)[j];
866
                          ((unsigned long *)cur_frm_pos)[j+1] = ((unsigned long *)ref_frm_pos)[j+1];
868
                          ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)ref_frm_pos)[j];
869
                          ((uint32_t *)cur_frm_pos)[j+1] = ((uint32_t *)ref_frm_pos)[j+1];
867 870
                        }
868 871
                        RLE_V2_CHECK(buf1,rle_v2, rle_v3,lp2)
869 872
                        break;
......
890 893
                      lv += (lv << 8);
891 894
                      lv += (lv << 16);
892 895
                      for(i = 0, j = 0; i < 8; i++, j += width_tbl[1])
893
                        ((unsigned long *)cur_frm_pos)[j] = ((unsigned long *)cur_frm_pos)[j+1] = lv;
896
                        ((uint32_t *)cur_frm_pos)[j] = ((uint32_t *)cur_frm_pos)[j+1] = lv;
894 897
                      LV1_CHECK(buf1,rle_v3,lv1,lp2)
895 898
                      break;
896 899

  
......
917 920
            for(lp1 = 0; lp1 < blks_width; lp1++) {
918 921
              for(lp2 = 0; lp2 < 4; ) {
919 922
                k = *buf1++;
920
                cur_lp = ((unsigned long *)cur_frm_pos) + width_tbl[lp2 * 2];
921
                ref_lp = ((unsigned long *)ref_frm_pos) + width_tbl[lp2 * 2];
923
                cur_lp = ((uint32_t *)cur_frm_pos) + width_tbl[lp2 * 2];
924
                ref_lp = ((uint32_t *)ref_frm_pos) + width_tbl[lp2 * 2];
922 925

  
923 926
                switch(correction_type_sp[lp2 & 0x01][k]) {
924 927
                  case 0:
libavcodec/indeo3data.h
1 1

  
2
unsigned long correction[] = {
2
static const uint32_t correction[] = {
3 3
	0x00000000, 0x00000202, 0xfffffdfe, 0x000002ff, 0xfffffd01, 0xffffff03, 0x000000fd, 0x00000404, 
4 4
	0xfffffbfc, 0x00000501, 0xfffffaff, 0x00000105, 0xfffffefb, 0x000003fc, 0xfffffc04, 0x000005fe, 
5 5
	0xfffffa02, 0xfffffe06, 0x000001fa, 0x00000904, 0xfffff6fc, 0x00000409, 0xfffffbf7, 0x00000909, 
......
771 771
};
772 772

  
773 773

  
774
unsigned long correctionloworder[] = {
774
static const uint32_t correctionloworder[] = {
775 775
	0x00000000, 0x02020202, 0xfdfdfdfe, 0x0302feff, 0xfcfd0101, 0xfeff0303, 0x0100fcfd, 0x04040404, 
776 776
	0xfbfbfbfc, 0x05050101, 0xfafafeff, 0x01010505, 0xfefefafb, 0x0403fbfc, 0xfbfc0404, 0x0605fdfe, 
777 777
	0xf9fa0202, 0xfdfe0606, 0x0201f9fa, 0x09090404, 0xf6f6fbfc, 0x04040909, 0xfbfbf6f7, 0x09090909, 
......
1543 1543
};
1544 1544

  
1545 1545

  
1546
unsigned long correctionhighorder[] = {
1546
static const uint32_t correctionhighorder[] = {
1547 1547
	0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 
1548 1548
	0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 
1549 1549
	0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 0xdeadbeef, 

Also available in: Unified diff