Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005530

[lcms] Improve performance of ColorConverOp for default destinations

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b82
    • CPU:
      generic
    • OS:
      generic

      Description

      ColorConvertOp.createCompatibleDestImage() provides default destination image,
      if user does not specify one. However, images created by this method often has
      custom type and are not recognized by LCMSImageLayout. This results in processing
      the color conversion in quite general way and causes a performance loss.
      Benchmark results below demonstrate the problem:

      Test(cmm.colorconv.ccop.op_img) took 2010ms for 351 reps
      Test(cmm.colorconv.ccop.op_img) took 1964ms for 351 reps
      Test(cmm.colorconv.ccop.op_img) took 1957ms for 351 reps
      Test(cmm.colorconv.ccop.op_img) took 1958ms for 351 reps
      Test(cmm.colorconv.ccop.op_img) took 1982ms for 351 reps
      Test(cmm.colorconv.ccop.op_img) averaged 177.79353662242934 units/sec
          with 3BYTE_BGR, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) took 1920ms for 138 reps
      Test(cmm.colorconv.ccop.op_img) took 1925ms for 138 reps
      Test(cmm.colorconv.ccop.op_img) took 1913ms for 138 reps
      Test(cmm.colorconv.ccop.op_img) took 1923ms for 138 reps
      Test(cmm.colorconv.ccop.op_img) took 1942ms for 138 reps
      Test(cmm.colorconv.ccop.op_img) averaged 71.70321105684299 units/sec
          with Compatible, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) took 1467ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 1525ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 1529ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 1482ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 1482ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) averaged 0.668002672010688 units/sec
          with 3BYTE_BGR, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) took 5718ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 5511ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 5476ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 5472ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) took 5509ms for 1 reps
      Test(cmm.colorconv.ccop.op_img) averaged 0.1805966914686123 units/sec
          with Compatible, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ

      All test results:
      Test(cmm.colorconv.ccop.op_img) averaged 177.79353662242934 units/sec
          with 3BYTE_BGR, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) averaged 71.70321105684299 units/sec
          with Compatible, photo, 3BYTE_BGR, 250x250, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) averaged 0.668002672010688 units/sec
          with 3BYTE_BGR, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ
      Test(cmm.colorconv.ccop.op_img) averaged 0.1805966914686123 units/sec
          with Compatible, photo, 3BYTE_BGR, 4000x4000, CS_CIEXYZ

        Activity

        Hide
        bae Andrew Brygin added a comment -
        LCMSImageLayout should accept component images which appropriate structure.
        This allows to process the color conversion in most efficient way.

        Suggested fix: http://cr.openjdk.java.net/~bae/8005530/webrev.00/
        Show
        bae Andrew Brygin added a comment - LCMSImageLayout should accept component images which appropriate structure. This allows to process the color conversion in most efficient way. Suggested fix: http://cr.openjdk.java.net/~bae/8005530/webrev.00/
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk8/2d/jdk/rev/fd8810d50c99
        User: bae
        Date: 2013-03-07 11:57:07 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/2d/jdk/rev/fd8810d50c99 User: bae Date: 2013-03-07 11:57:07 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/fd8810d50c99
        User: lana
        Date: 2013-03-15 17:04:08 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/fd8810d50c99 User: lana Date: 2013-03-15 17:04:08 +0000
        Hide
        bae Andrew Brygin added a comment -
        No new regression test: this fix results in performance change. CMM becnchmarks from J2DBench can be used for verification.
        Show
        bae Andrew Brygin added a comment - No new regression test: this fix results in performance change. CMM becnchmarks from J2DBench can be used for verification.

          People

          • Assignee:
            bae Andrew Brygin
            Reporter:
            bae Andrew Brygin
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: