getting started - stills

DaveT
2009-07-28
2013-06-04
  • DaveT
    DaveT
    2009-07-28

    I have downloaded and installed Dirac1.0.2 and I am trying the codec on 1920x1080 still images: Looking at the locally-decoded image, I get poor results. I am sure it must be the command-line arguments that I have set up.
    Is there a guide on how to set these up to avoid/minimise artifacts?

     
    • Can you specify the command line you used to encode the images? The README file in the distribution gives a brief description of the the encoder command line options.

       
      • DaveT
        DaveT
        2009-07-30

        Hi. Below is part of the transcript:-
        My command line =
        ./dirac-1.0.2/encoder/dirac_encoder
            -height 1080 -width 1920 -cformat YUV422P -source_sampling progressive
            -iwlt_filter DAUB9_7  -rwlt_filter DAUB9_7  -wlt_depth 4 -fr 50/1
            -HD1080P50 -local -verbose -qf 10
            zonep.yuv
            dirac_zonep.out

        Dirac encoder initial print-out=

        Source parameters :
            height=1080 width=1920
            chroma=YUV422P
            frame rate=50/1
        Encoder parameters :
            quality factor=10
            GOP parameters : num_L1=7 L1_sep=3
            Block parameters : xblen=24 yblen=24 xbsep=16 ybsep=16
             MV Precision=Half Pixel
             Inter Frame Transform Filter=DAUB9_7
             Intra Frame Transform Filter=DAUB9_7
             Wavelet depth=4
             Spatial Partitioning=true
             Multiple Quantisers=false
             Prefilter=NO_PF
             Field coding=false
             Lossless Coding=false
             Entropy Coding=Arithmetic Coding

        The images I am trying are all single frame 1920x1080 .bmp's. I am looking for a Jpeg2K alternative, @ 10:1 to 20:1 compression. I am hence interested in intra-frame compression. Whatever parameters I try does not give a good veiwable result, so I am assuming that there are some inter-frame settings that I should force to certain values for intra-frame? I am not clear what the various parameters do and their settings.

         
        • Thomas Davies
          Thomas Davies
          2009-07-30

          Dirac does not read bitmap files. You need to convert to planar YUV using the conversion program in the util/conversion folder, or use e.g. ImageMagick.

          If you're doing single frames, there is no need to change any of the inter coding elements. If you want to intra code a number of frames concatenated together, you need to set

          -num_L1 0

          You might not get the best results with DAUB_97, as we've not particularly optimised it, so try the other ones as well.

          cheers

          Thomas

           
          • DaveT
            DaveT
            2009-07-30

            .bmp's:
            I have been using the image preparation tools to convert my .bmps to .rgb and then to .yuv and vice-versa to view the locally-decoded file, per the README file. I know this works because I convert the resulting .yuv back to .rgb and back to .bmp so that I can see the .yuv that is being given to the dirac_encoder.

            -num_L1:
            I tried setting "-num_L1 0", this did set the dirac encoder to "intra". Thankyou.
            But the problem I have still persisted.

            DAUB9_7:
            I tried changing the iwlt transform from DAUB9_7 to one of the others, I chose "DD9_7".
            This did give an improvement. My "lossless" coding looks OK now - it did not before.

            But there still are visible problems.
            I have a few images that I am trying currently. Some photo's, graphics and test patterns.
            Eg One frame of colour bars, top half white-to-black, bottom half in reverse, black-to-white.

            I will continue and try some other wavelet transforms to see if any of those suit my test material.
            There is certainly a bug with DAUB9_7.

             
            • DaveT
              DaveT
              2009-07-30

              I have run the encoder with DD9_7 LEGALL5_3 DD13_7 HAAR0 HAAR1 FIDELITY DAUB9_7 filter settings. There still seems to be a problem.
              For example,
              I see this with my colour bars image, even at high qualities. Looking at the PSNR figures, it is always in the luma. It is a "dark smudge" effect, at the abrupt vertical transition between my "left-to-right" colour bars in top half of image and "right-to-left" colour bars in bottom half.

              Example dirac_encoder settings:-
              Source parameters :
                  height=1080 width=1920
                  chroma=YUV422P
                  frame rate=50/1
              Encoder parameters :
                  quality factor=19
                  GOP parameters : num_L1=0 (I-frame only coding)
                   Intra Frame Transform Filter=LEGALL5_3
                   Wavelet depth=4
                   Spatial Partitioning=true
                   Multiple Quantisers=false
                   Prefilter=NO_PF
                   Field coding=false
                   Lossless Coding=false
                   Entropy Coding=Arithmetic Coding

              It must be another parameter that I have missed.

               
              • Is there a way that I can download a couple of images (.yuv) that you are using for running my own tests?

                 
                • DaveT
                  DaveT
                  2009-07-31

                  Anuradha, Hi,
                  I could e-mail you some, zipped up.
                  I am sure it must be my finger trouble,
                  because I tried the Jasper J2K codec on the images. It was fine.
                  Do you have a e-mail address?

                   
                  • Please email them to asuraparaju at users dot sourceforge dot net. It will get forwarded to the address I'm currently using with sourceforge.

                     
                    • DaveT
                      DaveT
                      2009-08-04

                      OK, done. Script file and source image bmp plus compressed and decompressed images emailed.