[cvs] / xvidcore / src / image / image.c Repository:
ViewVC logotype

Diff of /xvidcore/src/image/image.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20.2.6, Wed Oct 9 15:56:16 2002 UTC revision 1.20.2.9, Tue Dec 10 11:13:50 2002 UTC
# Line 54  Line 54 
54  #include <math.h>  #include <math.h>
55    
56  #include "../portab.h"  #include "../portab.h"
57    #include "../global.h"                  // XVID_CSP_XXX's
58  #include "../xvid.h"                    // XVID_CSP_XXX's  #include "../xvid.h"                    // XVID_CSP_XXX's
59  #include "image.h"  #include "image.h"
60  #include "colorspace.h"  #include "colorspace.h"
61  #include "interpolate8x8.h"  #include "interpolate8x8.h"
62    #include "reduced.h"
63  #include "../divx4.h"  #include "../divx4.h"
64  #include "../utils/mem_align.h"  #include "../utils/mem_align.h"
65    
66    #include "font.h"               // XXX: remove later
67    
68  #define SAFETY  64  #define SAFETY  64
69  #define EDGE_SIZE2  (EDGE_SIZE/2)  #define EDGE_SIZE2  (EDGE_SIZE/2)
70    
# Line 320  Line 324 
324                                  h_ptr += 8;                                  h_ptr += 8;
325                          }                          }
326    
327                          hv_ptr += EDGE_SIZE2;                          hv_ptr += EDGE_SIZE;
328                          h_ptr += EDGE_SIZE2;                          h_ptr += EDGE_SIZE;
329    
330                          hv_ptr += stride_add;                          hv_ptr += stride_add;
331                          h_ptr += stride_add;                          h_ptr += stride_add;
# Line 472  Line 476 
476  }  }
477    
478    
479    
480    /*
481      perform safe packed colorspace conversion, by splitting
482      the image up into an optimized area (pixel width divisible by 16),
483      and two unoptimized/plain-c areas (pixel width divisible by 2)
484    */
485    
486    static void
487    safe_packed_conv(uint8_t * x_ptr, int x_stride,
488                                     uint8_t * y_ptr, uint8_t * u_ptr, uint8_t * v_ptr,
489                                     int y_stride, int uv_stride,
490                                     int width, int height, int vflip,
491                                     packedFunc * func_opt, packedFunc func_c, int size)
492    {
493            int width_opt, width_c;
494    
495            if (func_opt != func_c && x_stride < size*((width+15)/16)*16)
496            {
497                    width_opt = width & (~15);
498                    width_c = width - width_opt;
499            }
500            else
501            {
502                    width_opt = width;
503                    width_c = 0;
504            }
505    
506            func_opt(x_ptr, x_stride,
507                            y_ptr, u_ptr, v_ptr, y_stride, uv_stride,
508                            width_opt, height, vflip);
509    
510            if (width_c)
511            {
512                    func_c(x_ptr + size*width_opt, x_stride,
513                            y_ptr + width_opt, u_ptr + width_opt/2, v_ptr + width_opt/2,
514                            y_stride, uv_stride, width_c, height, vflip);
515            }
516    }
517    
518    
519    
520  int  int
521  image_input(IMAGE * image,  image_input(IMAGE * image,
522                          uint32_t width,                          uint32_t width,
523                          int height,                          int height,
524                          uint32_t edged_width,                          uint32_t edged_width,
525                          uint8_t * src,                          uint8_t * src,
526                          int csp)                          int src_stride,
527                            int csp,
528                            int interlacing)
529  {  {
530            const int edged_width2 = edged_width/2;
531            const int width2 = width/2;
532            const int height2 = height/2;
533            //const int height_signed = (csp & XVID_CSP_VFLIP) ? -height : height;
534    
535    
536            //      int src_stride = width;
537    
538  /*      if (csp & XVID_CSP_VFLIP)          // --- xvid 2.1 compatiblity patch ---
539            // --- remove when xvid_dec_frame->stride equals real stride
540            /*
541            if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB555 ||
542                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB565 ||
543                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YUY2 ||
544                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YVYU ||
545                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_UYVY)
546          {          {
547                  height = -height;                  src_stride *= 2;
548            }
549            else if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB24)
550            {
551                    src_stride *= 3;
552            }
553            else if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB32 ||
554                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_ABGR ||
555                    (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGBA)
556            {
557                    src_stride *= 4;
558          }          }
559  */  */
560            // ^--- xvid 2.1 compatiblity fix ---^
561    
562          switch (csp & ~XVID_CSP_VFLIP) {          switch (csp & ~XVID_CSP_VFLIP) {
563          case XVID_CSP_RGB555:          case XVID_CSP_RGB555:
564                  rgb555_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
565                                             edged_width);                          src, src_stride, image->y, image->u, image->v,
566                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
567                            interlacing?rgb555i_to_yv12  :rgb555_to_yv12,
568                            interlacing?rgb555i_to_yv12_c:rgb555_to_yv12_c, 2);
569                    break;
570    
571          case XVID_CSP_RGB565:          case XVID_CSP_RGB565:
572                  rgb565_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
573                                             edged_width);                          src, src_stride, image->y, image->u, image->v,
574                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
575                            interlacing?rgb565i_to_yv12  :rgb565_to_yv12,
576                            interlacing?rgb565i_to_yv12_c:rgb565_to_yv12_c, 2);
577                    break;
578    
579    
580          case XVID_CSP_RGB24:          case XVID_CSP_RGB24:
581                  rgb24_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
582                                            edged_width);                          src, src_stride, image->y, image->u, image->v,
583                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
584                            interlacing?bgri_to_yv12  :bgr_to_yv12,
585                            interlacing?bgri_to_yv12_c:bgr_to_yv12_c, 3);
586                    break;
587    
588          case XVID_CSP_RGB32:          case XVID_CSP_RGB32:
589                  rgb32_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
590                                            edged_width);                          src, src_stride, image->y, image->u, image->v,
591                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
592                            interlacing?bgrai_to_yv12  :bgra_to_yv12,
593                            interlacing?bgrai_to_yv12_c:bgra_to_yv12_c, 4);
594                    break;
595    
596          case XVID_CSP_I420:          case XVID_CSP_ABGR :
597                  yuv_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
598                                          edged_width);                          src, src_stride, image->y, image->u, image->v,
599                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
600                            interlacing?abgri_to_yv12  :abgr_to_yv12,
601                            interlacing?abgri_to_yv12_c:abgr_to_yv12_c, 4);
602                    break;
603    
604          case XVID_CSP_YV12:             /* u/v swapped */          case XVID_CSP_RGBA :
605                  yuv_to_yv12(image->y, image->v, image->u, src, width, height,                  safe_packed_conv(
606                                          edged_width);                          src, src_stride, image->y, image->u, image->v,
607                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
608                            interlacing?rgbai_to_yv12  :rgba_to_yv12,
609                            interlacing?rgbai_to_yv12_c:rgba_to_yv12_c, 4);
610                    break;
611    
612          case XVID_CSP_YUY2:          case XVID_CSP_YUY2:
613                  yuyv_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
614                                           edged_width);                          src, src_stride, image->y, image->u, image->v,
615                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
616                            interlacing?yuyvi_to_yv12  :yuyv_to_yv12,
617                            interlacing?yuyvi_to_yv12_c:yuyv_to_yv12_c, 2);
618                    break;
619    
620          case XVID_CSP_YVYU:             /* u/v swapped */          case XVID_CSP_YVYU:             /* u/v swapped */
621                  yuyv_to_yv12(image->y, image->v, image->u, src, width, height,                  safe_packed_conv(
622                                           edged_width);                          src, src_stride, image->y, image->v, image->y,
623                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
624                            interlacing?yuyvi_to_yv12  :yuyv_to_yv12,
625                            interlacing?yuyvi_to_yv12_c:yuyv_to_yv12_c, 2);
626                    break;
627    
628          case XVID_CSP_UYVY:          case XVID_CSP_UYVY:
629                  uyvy_to_yv12(image->y, image->u, image->v, src, width, height,                  safe_packed_conv(
630                                           edged_width);                          src, src_stride, image->y, image->u, image->v,
631                  return 0;                          edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
632                            interlacing?uyvyi_to_yv12  :uyvy_to_yv12,
633                            interlacing?uyvyi_to_yv12_c:uyvy_to_yv12_c, 2);
634                    break;
635    
636            case XVID_CSP_I420:
637                    yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2,
638                            src, src + width*height, src + width*height + width2*height2,
639                            width, width2, width, height, (csp & XVID_CSP_VFLIP));
640                    break
641                            ;
642            case XVID_CSP_YV12:             /* u/v swapped */
643                    yv12_to_yv12(image->y, image->v, image->u, edged_width, edged_width2,
644                            src, src + width*height, src + width*height + width2*height2,
645                            width, width2, width, height, (csp & XVID_CSP_VFLIP));
646                    break;
647    
648          case XVID_CSP_USER:          case XVID_CSP_USER:
649                  user_to_yuv_c(image->y, image->u, image->v, edged_width,                  {
650                                            (DEC_PICTURE *) src, width, height);                          DEC_PICTURE * pic = (DEC_PICTURE*)src;
651                  return 0;                          yv12_to_yv12(image->y, image->u, image->v, edged_width, edged_width2,
652                                    pic->y, pic->u, pic->v, pic->stride_y, pic->stride_y,
653                                    width, height, (csp & XVID_CSP_VFLIP));
654                    }
655                    break;
656    
657          case XVID_CSP_NULL:          case XVID_CSP_NULL:
658                  break;                  break;
659    
660            default :
661                    return -1;
662          }          }
663    
664          return -1;  
665            /* pad out image when the width and/or height is not a multiple of 16 */
666    
667            if (width & 15)
668            {
669                    int i;
670                    int pad_width = 16 - (width&15);
671                    for (i = 0; i < height; i++)
672                    {
673                            memset(image->y + i*edged_width + width,
674                                     *(image->y + i*edged_width + width - 1), pad_width);
675                    }
676                    for (i = 0; i < height/2; i++)
677                    {
678                            memset(image->u + i*edged_width2 + width2,
679                                     *(image->u + i*edged_width2 + width2 - 1),pad_width/2);
680                            memset(image->v + i*edged_width2 + width2,
681                                     *(image->v + i*edged_width2 + width2 - 1),pad_width/2);
682                    }
683            }
684    
685            if (height & 15)
686            {
687                    int pad_height = 16 - (height&15);
688                    int length = ((width+15)/16)*16;
689                    int i;
690                    for (i = 0; i < pad_height; i++)
691                    {
692                            memcpy(image->y + (height+i)*edged_width,
693                                       image->y + (height-1)*edged_width,length);
694                    }
695    
696                    for (i = 0; i < pad_height/2; i++)
697                    {
698                            memcpy(image->u + (height2+i)*edged_width2,
699                                       image->u + (height2-1)*edged_width2,length/2);
700                            memcpy(image->v + (height2+i)*edged_width2,
701                                       image->v + (height2-1)*edged_width2,length/2);
702                    }
703            }
704    
705    /*
706            if (interlacing)
707                    image_printf(image, edged_width, height, 5,5, "[i]");
708            image_dump_yuvpgm(image, edged_width, ((width+15)/16)*16, ((height+15)/16)*16, "\\encode.pgm");
709    */
710            return 0;
711  }  }
712    
713    
# Line 556  Line 719 
719                           uint32_t edged_width,                           uint32_t edged_width,
720                           uint8_t * dst,                           uint8_t * dst,
721                           uint32_t dst_stride,                           uint32_t dst_stride,
722                           int csp)                           int csp,
723                             int interlacing)
724  {  {
725          if (csp & XVID_CSP_VFLIP) {          const int edged_width2 = edged_width/2;
726                  height = -height;          int width2 = width/2;
727          }          int height2 = height/2;
728    
729    /*
730            if (interlacing)
731                    image_printf(image, edged_width, height, 5,100, "[i]=%i,%i",width,height);
732            image_dump_yuvpgm(image, edged_width, width, height, "\\decode.pgm");
733    */
734    
735    
736          // --- xvid 2.1 compatiblity patch ---          // --- xvid 2.1 compatiblity patch ---
737          // --- remove when xvid_dec_frame->stride equals real stride          // --- remove when xvid_dec_frame->stride equals real stride
738            /*
739          if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB555 ||          if ((csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB555 ||
740                  (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB565 ||                  (csp & ~XVID_CSP_VFLIP) == XVID_CSP_RGB565 ||
741                  (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YUY2 ||                  (csp & ~XVID_CSP_VFLIP) == XVID_CSP_YUY2 ||
# Line 582  Line 754 
754          {          {
755                  dst_stride *= 4;                  dst_stride *= 4;
756          }          }
757            */
758          // ^--- xvid 2.1 compatiblity fix ---^          // ^--- xvid 2.1 compatiblity fix ---^
759    
760    
761          switch (csp & ~XVID_CSP_VFLIP) {          switch (csp & ~XVID_CSP_VFLIP) {
762          case XVID_CSP_RGB555:          case XVID_CSP_RGB555:
763                  yv12_to_rgb555(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
764                                             edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
765                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
766                            interlacing?yv12_to_rgb555i  :yv12_to_rgb555,
767                            interlacing?yv12_to_rgb555i_c:yv12_to_rgb555_c, 2);
768                  return 0;                  return 0;
769    
770          case XVID_CSP_RGB565:          case XVID_CSP_RGB565:
771                  yv12_to_rgb565(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
772                                             edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
773                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
774                            interlacing?yv12_to_rgb565i  :yv12_to_rgb565,
775                            interlacing?yv12_to_rgb565i_c:yv12_to_rgb565_c, 2);
776                  return 0;                  return 0;
777    
778          case XVID_CSP_RGB24:          case XVID_CSP_RGB24:
779                  yv12_to_rgb24(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
780                                            edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
781                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
782                            interlacing?yv12_to_bgri  :yv12_to_bgr,
783                            interlacing?yv12_to_bgri_c:yv12_to_bgr_c, 3);
784                  return 0;                  return 0;
785    
786          case XVID_CSP_RGB32:          case XVID_CSP_RGB32:
787                  yv12_to_rgb32(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
788                                            edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
789                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
790                            interlacing?yv12_to_bgrai  :yv12_to_bgra,
791                            interlacing?yv12_to_bgrai_c:yv12_to_bgra_c, 4);
792                  return 0;                  return 0;
793    
794          case XVID_CSP_ABGR:          case XVID_CSP_ABGR:
795                  yv12_to_abgr(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
796                                            edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
797                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
798                            interlacing?yv12_to_abgri  :yv12_to_abgr,
799                            interlacing?yv12_to_abgri_c:yv12_to_abgr_c, 4);
800                  return 0;                  return 0;
801    
802          case XVID_CSP_RGBA:          case XVID_CSP_RGBA:
803                  yv12_to_rgba(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
804                                            edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
805                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
806                            interlacing?yv12_to_rgbai  :yv12_to_rgba,
807                            interlacing?yv12_to_rgbai_c:yv12_to_rgba_c, 4);
808                  return 0;                  return 0;
809    
810          case XVID_CSP_I420:          case XVID_CSP_YUY2:
811                  yv12_to_yuv(dst, dst_stride, image->y, image->u, image->v, edged_width,                  safe_packed_conv(
812                                          edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
813                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
814                            interlacing?yv12_to_yuyvi  :yv12_to_yuyv,
815                            interlacing?yv12_to_yuyvi_c:yv12_to_yuyv_c, 2);
816                  return 0;                  return 0;
817    
818          case XVID_CSP_YV12:             // u,v swapped          case XVID_CSP_YVYU:             // u,v swapped
819                  yv12_to_yuv(dst, dst_stride, image->y, image->v, image->u, edged_width,                  safe_packed_conv(
820                                          edged_width / 2, width, height);                          dst, dst_stride, image->y, image->v, image->u,
821                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
822                            interlacing?yv12_to_yuyvi  :yv12_to_yuyv,
823                            interlacing?yv12_to_yuyvi_c:yv12_to_yuyv_c, 2);
824                  return 0;                  return 0;
825    
826          case XVID_CSP_YUY2:          case XVID_CSP_UYVY:
827                  yv12_to_yuyv(dst, dst_stride, image->y, image->u, image->v,                  safe_packed_conv(
828                                           edged_width, edged_width / 2, width, height);                          dst, dst_stride, image->y, image->u, image->v,
829                            edged_width, edged_width2, width, height, (csp & XVID_CSP_VFLIP),
830                            interlacing?yv12_to_uyvyi  :yv12_to_uyvy,
831                            interlacing?yv12_to_uyvyi_c:yv12_to_uyvy_c, 2);
832                  return 0;                  return 0;
833    
834          case XVID_CSP_YVYU:             // u,v swapped          case XVID_CSP_I420:
835                  yv12_to_yuyv(dst, dst_stride, image->y, image->v, image->u,                  yv12_to_yv12(dst, dst + width*height, dst + width*height + width2*height2,
836                                           edged_width, edged_width / 2, width, height);                          width, width2,
837                            image->y, image->u, image->v, edged_width, edged_width2,
838                            width, height, (csp & XVID_CSP_VFLIP));
839                  return 0;                  return 0;
840    
841          case XVID_CSP_UYVY:          case XVID_CSP_YV12:             // u,v swapped
842                  yv12_to_uyvy(dst, dst_stride, image->y, image->u, image->v,                  yv12_to_yv12(dst, dst + width*height, dst + width*height + width2*height2,
843                                           edged_width, edged_width / 2, width, height);                          width, width2,
844                            image->y, image->v, image->u, edged_width, edged_width2,
845                            width, height, (csp & XVID_CSP_VFLIP));
846                  return 0;                  return 0;
847    
848          case XVID_CSP_USER:          case XVID_CSP_USER:
849                  ((DEC_PICTURE *) dst)->y = image->y;                  {
850                  ((DEC_PICTURE *) dst)->u = image->u;                          DEC_PICTURE * pic = (DEC_PICTURE*)dst;
851                  ((DEC_PICTURE *) dst)->v = image->v;                          pic->y = image->y;
852                  ((DEC_PICTURE *) dst)->stride_y = edged_width;                          pic->u = image->u;
853                  ((DEC_PICTURE *) dst)->stride_uv = edged_width / 2;                          pic->v = image->v;
854                            pic->stride_y = edged_width;
855                            pic->stride_uv = edged_width / 2;
856                    }
857                  return 0;                  return 0;
858    
859          case XVID_CSP_NULL:          case XVID_CSP_NULL:
# Line 849  Line 1056 
1056      sV += std2;      sV += std2;
1057    }    }
1058  }  }
1059    
1060    
1061    /* reduced resolution deblocking filter */
1062    void
1063    image_deblock_rrv(IMAGE * img, int edged_width,
1064                                    const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride)
1065    {
1066            const int edged_width2 = edged_width /2;
1067            int i,j;
1068    
1069            /* horizontal deblocking */
1070    
1071            for (j = 1; j < mb_height*2; j++)       // luma: j,i in block units
1072            for (i = 0; i < mb_width*2; i++)
1073            {
1074                    if (mbs[(j-1)/2*mb_stride + (i/2)].mode != MODE_NOT_CODED ||
1075                            mbs[(j+0)/2*mb_stride + (i/2)].mode != MODE_NOT_CODED)
1076                    {
1077                            xvid_HFilter_31_C(img->y + (j*16 - 1)*edged_width + i*16,
1078                                                              img->y + (j*16 + 0)*edged_width + i*16, 2);
1079                    }
1080            }
1081    
1082            for (j = 1; j < mb_height; j++) // chroma
1083            for (i = 0; i < mb_width; i++)
1084            {
1085                    if (mbs[(j-1)*mb_stride + i].mode != MODE_NOT_CODED ||
1086                            mbs[(j+0)*mb_stride + i].mode != MODE_NOT_CODED)
1087                    {
1088                            hfilter_31(img->u + (j*16 - 1)*edged_width2 + i*16,
1089                                               img->u + (j*16 + 0)*edged_width2 + i*16, 2);
1090                            hfilter_31(img->v + (j*16 - 1)*edged_width2 + i*16,
1091                                               img->v + (j*16 + 0)*edged_width2 + i*16, 2);
1092                    }
1093            }
1094    
1095            /* vertical deblocking */
1096    
1097            for (j = 0; j < mb_height*2; j++)               // luma: i,j in block units
1098            for (i = 1; i < mb_width*2; i++)
1099            {
1100                    if (mbs[(j/2)*mb_stride + (i-1)/2].mode != MODE_NOT_CODED ||
1101                            mbs[(j/2)*mb_stride + (i+0)/2].mode != MODE_NOT_CODED)
1102                    {
1103                            vfilter_31(img->y + (j*16)*edged_width + i*16 - 1,
1104                                               img->y + (j*16)*edged_width + i*16 + 0,
1105                                               edged_width, 2);
1106                    }
1107            }
1108    
1109            for (j = 0; j < mb_height; j++) // chroma
1110            for (i = 1; i < mb_width; i++)
1111            {
1112                    if (mbs[j*mb_stride + i - 1].mode != MODE_NOT_CODED ||
1113                            mbs[j*mb_stride + i + 0].mode != MODE_NOT_CODED)
1114                    {
1115                            vfilter_31(img->u + (j*16)*edged_width2 + i*16 - 1,
1116                                               img->u + (j*16)*edged_width2 + i*16 + 0,
1117                                               edged_width2, 2);
1118                            vfilter_31(img->v + (j*16)*edged_width2 + i*16 - 1,
1119                                               img->v + (j*16)*edged_width2 + i*16 + 0,
1120                                               edged_width2, 2);
1121                    }
1122            }
1123    }

Legend:
Removed from v.1.20.2.6  
changed lines
  Added in v.1.20.2.9

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4