Exemple #1
0
        public static void av_image_fill_max_pixsteps(int[] max_pixsteps, int[] max_pixstep_comps, AVPixFmtDescriptor pixdesc)
        {
            int i;

            // memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0]));
            Arrays.Fill(max_pixsteps, 0, 4, 0);

            if (max_pixstep_comps != null)
            {
                // memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0]));
                Arrays.Fill(max_pixstep_comps, 0, 4, 0);
            }

            for (i = 0; i < 4; i++)
            {
                AVComponentDescriptor comp = (pixdesc.comp[i]);
                if ((comp.step_minus1 + 1) > max_pixsteps[comp.plane])
                {
                    max_pixsteps[comp.plane] = comp.step_minus1 + 1;
                    if (max_pixstep_comps != null)
                    {
                        max_pixstep_comps[comp.plane] = i;
                    }
                }
            }
        }
 public PixFmtYUV420P()
 {
     name = "yuv420p";
     nb_components = 3;
     log2_chroma_w = 1;
     log2_chroma_h = 1;
     comp = new AVComponentDescriptor[]
     {
         new AVComponentDescriptor(0, 0, 1, 0, 7),        /* Y */
         new AVComponentDescriptor(1, 0, 1, 0, 7),        /* U */
         new AVComponentDescriptor(2, 0, 1, 0, 7),        /* V */
         new AVComponentDescriptor(0, 0, 0, 0, 0),        /* Filler */
     };
 }
 public PixFmtYUV420P()
 {
     name          = "yuv420p";
     nb_components = 3;
     log2_chroma_w = 1;
     log2_chroma_h = 1;
     comp          = new AVComponentDescriptor[]
     {
         new AVComponentDescriptor(0, 0, 1, 0, 7),                /* Y */
         new AVComponentDescriptor(1, 0, 1, 0, 7),                /* U */
         new AVComponentDescriptor(2, 0, 1, 0, 7),                /* V */
         new AVComponentDescriptor(0, 0, 0, 0, 0),                /* Filler */
     };
 }