Commits on Feb 23, 2021

  1. Reenable AVIF_VERSION_DEVEL

    Joe Drago committed Feb 23, 2021
    Configuration menu
    Copy the full SHA
    bc9730f View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2021

  1. Fail on reformat Identity with subsampling, make avifenc correct this…

    … before reformat (#517)
    
    According to [AV1 Spec](https://aomediacodec.github.io/av1-spec/#color-config-semantics), Identity is only valid with YUV444:
    > If matrix_coefficients is equal to MC_IDENTITY, it is a requirement of bitstream conformance that subsampling_x is equal to 0 and subsampling_y is equal to 0.
    
    But `avifImageRGBToYUV` still tries to do the reformat. avifenc tries to correct this, but after reformat, which will produce an valid image but with wrong color.
    
    This PR lets `avifImageRGBToYUV` failed on `image->matrixCoefficients == AVIF_MATRIX_COEFFICIENTS_IDENTITY && image->yuvFormat != AVIF_PIXEL_FORMAT_YUV444` so that libavif won't produce corrupted file. This PR also makes avifenc correct MC before reformat so that the output image has correct color.
    
    I'm still thinking should we change MC or yuvFormat in this case? If user wants lossless, then maybe we should change yuvFormat instead, which makes output lossless as requested.
    
    By the way, if we try to make an Identity monochrome image (forbid by spec), libavif, Chrome and Firefox all wouldn't reject decoding it. However libavif and Firefox will copy the Y(G) value to U(B) and V(R), but Chrome will fill U(B) and V(R) with 128.
    tongyuantongyu committed Feb 27, 2021
    Configuration menu
    Copy the full SHA
    4f40299 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2021

  1. libavif.pc: respect libdir setting

    Do not hardcode "lib" as that is often the wrong path with multilib.
    On an x86_64 system for example, it should actually be "lib64".
    vapier authored and wantehchang committed Mar 5, 2021
    Configuration menu
    Copy the full SHA
    c6acdf6 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2021

  1. Set codec-specific options for color or alpha only (#534)

    Add a new syntax for codec-specific options so that they can be applied
    to the color or alpha sub-image only.
    
    1. <key>=<value> applies to both color and alpha (if present).
    2. color:<key>=<value> or c:<key>=<value> applies only to color.
    3. alpha:<key>=<value> or a:<key>=<value> applies only to alpha (if
       present).
    
    In the syntax message of avifenc, describe the libaom codec-specific
    options that should not be used with the alpha-subimage.
    
    Remove the special handling of the film-grain-test and film-grain-table
    options for the alpha sub-image.
    
    Fix #533.
    wantehchang committed Mar 9, 2021
    Configuration menu
    Copy the full SHA
    33cff6b View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2021

  1. Use libaom's new all intra mode (#539)

    Use libaom's new all intra mode (added in
    https://crbug.com/aomedia/2959) if it is available at compile time. The
    all intra mode is intended for encoding still images and all intra
    videos.
    
    Fix #538.
    wantehchang committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    e41e6b9 View commit details
    Browse the repository at this point in the history

Commits on Mar 12, 2021

  1. Configuration menu
    Copy the full SHA
    2456d2f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    859c910 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2021

  1. Configuration menu
    Copy the full SHA
    d2340b4 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2021

  1. Code analysis cleanup (MS CL)

    Joe Drago committed Mar 16, 2021
    3 Configuration menu
    Copy the full SHA
    db1009a View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2021

  1. Remove analyze setting -- it enables a bunch of additional, unintende…

    …d analysis per-compile
    Joe Drago committed Mar 18, 2021
    Configuration menu
    Copy the full SHA
    eaeea4a View commit details
    Browse the repository at this point in the history
  2. When encoding single-frame images using libaom, clean up the encoder …

    …immediately after encoding the frame to cut down on resources high watermarks
    
    Fixes: #331
    
    This should also address: https://crbug.com/aomedia/2990
    Joe Drago committed Mar 18, 2021
    Configuration menu
    Copy the full SHA
    452ad41 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2021

  1. Configuration menu
    Copy the full SHA
    741b2a0 View commit details
    Browse the repository at this point in the history
  2. Free codec->internal outside #if block (#546)

    aomCodecDestroyInternal() should call avifFree(codec->internal) outside
    the #if defined(AVIF_CODEC_AOM_ENCODE) block. Otherwise, codec->internal
    will not be freed if AVIF_CODEC_AOM_DECODE is defined but
    AVIF_CODEC_AOM_ENCODE is not defined.
    wantehchang committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    8a82b95 View commit details
    Browse the repository at this point in the history
  3. Use same code pattern to fix MS CL code analysis (#550)

    Use the same code pattern in avifArrayCreate() and avifArrayPushIndex()
    to fix Visual C++ code analysis warnings.
    wantehchang committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    620f491 View commit details
    Browse the repository at this point in the history
  4. Clean up the code that checks imageCountLimit (#549)

    Add the avifGetSampleCountOfChunk() function for the code that was
    duplicated.
    
    Declare the imageCountLimit parameter of
    avifCodecDecodeInputGetSamples() to have the uint32_t type (because
    decoder->imageCountLimit has the uint32_t type) and replace the uint64_t
    variable imageCount with the uint32_t variable imageCountLeft. It is not
    necessary to use the uint64_t type in this code.
    wantehchang committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    b8c8944 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2021

  1. Move aomCodecEncodeFinish() decl inside of an ifdef AVIF_CODEC_AOM_EN…

    …CODE block
    Joe Drago committed Mar 22, 2021
    Configuration menu
    Copy the full SHA
    f56df6d View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2021

  1. Fix incorrect AVIF_RESULT_NO_IMAGES_REMAINING error (#557)

    avifDecoderNextImage() should not return AVIF_RESULT_NO_IMAGES_REMAINING
    when tile->codec->getNextImage() fails to decode the color sub-image.
    
    Fixes #556.
    wantehchang committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    365bd5e View commit details
    Browse the repository at this point in the history
  2. ext: Checkout libaom v3.0.0

    Updates the libaom version checked out in the ext and docker scripts from v2.0.0 to v3.0.0
    EwoutH authored and wantehchang committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    c042762 View commit details
    Browse the repository at this point in the history
  3. In libaom all intra mode, set cq-level for user (#551)

    If libaom's new all intra mode is used, the rc_end_usage encoder setting
    defaults to AOM_Q, which requires cq-level to function. Since a typical
    user is unlikely to know this esoteric internal detail, if the user does
    not set cq-level, set it to the average value of the min and max
    quantizers for the user.
    
    NOTE: An alternative is to replace the min and max quantizers with a
    single quantizer in the avifEncoder struct. This will be an incompatible
    change but is worth considering.
    wantehchang committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    5f86f96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d4f317b View commit details
    Browse the repository at this point in the history
  5. Additional fixes for PR #530

    * Reword syntax explanation of --raw-color
    * Add alpha plane NULL (similar to adjacent YUV plane checks)
    * Refactor avifImageYUVToRGB to avoid goto and make flow clearer, add comments
    Joe Drago committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    dfa2f0a View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2021

  1. Configuration menu
    Copy the full SHA
    7ace982 View commit details
    Browse the repository at this point in the history
  2. Simplify conditional

    Joe Drago committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    7f428ad View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2021

  1. Use aom_codec_set_option() if available (#567)

    Use the new aom_codec_set_option() function, if available, to set
    libaom-specific advanced options.
    
    Fix #548.
    wantehchang committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    1809baa View commit details
    Browse the repository at this point in the history
  2. Check aom_codec_control(AOME_SET_CPUUSED) failure (#570)

    The aom_codec_control(encoder, AOME_SET_CPUUSED, aomCpuUsed) call fails
    if aomCpuUsed is greater than the maximum cpu-used value supported by
    libaom. This should not happen if we set aomCpuUsed correctly, so this
    check is intended to prevent future bugs when we attempt to use libaom's
    new speed 9, which is not supported by libaom 2.0.x or older.
    wantehchang committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    47f573b View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. 2 Configuration menu
    Copy the full SHA
    e568f73 View commit details
    Browse the repository at this point in the history
  2. Rearrange test data, remove old AVIFs

    Joe Drago committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    8d266dc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    97b5178 View commit details
    Browse the repository at this point in the history
  4. One more fix on test IO data

    Joe Drago committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    bc883bb View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Add proof-of-concept iref-box-merge script to fix certain AVIFs gener…

    …ated by old avifenc builds
    
    Related: #561
    Joe Drago committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    7bb0e1f View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Configuration menu
    Copy the full SHA
    0e13ce1 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Describe color and alpha as planes, not sub-images (#575)

    Clarify that color planes refer to the YUV planes, not just the chroma planes.
    wantehchang committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    3775253 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4674eca View commit details
    Browse the repository at this point in the history
  3. Use cargo cinstall in local builds to ensure consistency in target ou…

    …tput, as cbuild no longer builds directly into target/release
    Joe Drago committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    a24c7ea View commit details
    Browse the repository at this point in the history
  4. Recognize the Y4M format string "C420mpeg2" (#576)

    The libavformat/yuv4mpegdec.c file in ffmpeg says:
            case 'C': // Color space
                if (strncmp("420jpeg", tokstart, 7) == 0) {
                    pix_fmt = AV_PIX_FMT_YUV420P;
                    chroma_sample_location = AVCHROMA_LOC_CENTER;
                } else if (strncmp("420mpeg2", tokstart, 8) == 0) {
                    pix_fmt = AV_PIX_FMT_YUV420P;
                    chroma_sample_location = AVCHROMA_LOC_LEFT;
                } else if (strncmp("420paldv", tokstart, 8) == 0) {
                    pix_fmt = AV_PIX_FMT_YUV420P;
                    chroma_sample_location = AVCHROMA_LOC_TOPLEFT;
                } else if ...
                ...
                } else if (strncmp("420", tokstart, 3) == 0) {
                    pix_fmt = AV_PIX_FMT_YUV420P;
                    chroma_sample_location = AVCHROMA_LOC_CENTER;
                } else if ...
    wantehchang committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    e282285 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. ipma box parsing accepts invalid inputs

    Fixes: #485
    Joe Drago authored and joedrago committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c60ccae View commit details
    Browse the repository at this point in the history
  2. A HandlerBox (hdlr) of type 'pict' must be the first box within the M…

    …etaBox (meta)
    
    Fixes: #563
    Joe Drago authored and joedrago committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    e018518 View commit details
    Browse the repository at this point in the history
  3. Require the pixel information property (pixi) for all displayable images

    Fixes: #564
    Joe Drago authored and joedrago committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    c10c6be View commit details
    Browse the repository at this point in the history
  4. Always require a primary item when decoding items

    Fixes: #566
    Joe Drago authored and joedrago committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    51d1114 View commit details
    Browse the repository at this point in the history
  5. Clarify the help message for -r,--raw-color

    Explicitly say the raw values are RGB, which helps explain why this
    option is not applicable to Y4M.
    wantehchang authored and joedrago committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    d37ef74 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. Cast uint8_t variable to uint32_t before << 24

    In avifParseItemPropertyAssociation(), cast the uint8_t variable
    'version' to uint32_t before performing the << 24 operation. Without the
    cast, 'version' is automatically converted to 'int' by the C language,
    so if the most significant bit of 'version' is 1, it will be shifted
    into the sign bit of the 'int' value.
    
    Fix https://crbug.com/oss-fuzz/33032.
    wantehchang authored and joedrago committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    33d6462 View commit details
    Browse the repository at this point in the history
  2. Warn if alpha is limited range (deprecated)

    NOTE: The alpha range is not available when the --info option is used.
    So this warning is emitted only when the image is decoded.
    wantehchang authored and joedrago committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    890e31f View commit details
    Browse the repository at this point in the history
  3. Document toRGBAlphaMode field of avifReformatState

    Document that the toRGBAlphaMode field of avifReformatState is only used
    by avifImageYUVToRGB(), which explains the "toRGB" part of the field's
    name. avifImageRGBToYUV() stores its avifAlphaMultiplyMode in a local
    variable.
    wantehchang authored and joedrago committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    728d670 View commit details
    Browse the repository at this point in the history
  4. Minor comment changes

    wantehchang authored and joedrago committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    ef45bc6 View commit details
    Browse the repository at this point in the history
  5. Simplify the calculation of A (alpha)

    Simplify the calculation of A (alpha) in avifImageYUVAnyToRGBAnySlow().
    Make it look like the code that calculates Y, U, V in the same function.
    For example, replace the state->yuvChannelBytes > 1 test with the
    image->depth == 8 test (and swap the if and else branches), and omit the
    clamping of ptrA8[i] because it cannot possibly be greater than
    yuvMaxChannel.
    wantehchang authored and joedrago committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    ed48a0f View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2021

  1. Add rav1e to AppVeyor builds

    Fixes: #573
    Joe Drago committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    f8b2362 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2021

  1. Configuration menu
    Copy the full SHA
    b6eb607 View commit details
    Browse the repository at this point in the history
  2. Fix reading JPEG YUV as Grayscale

    tongyuantongyu authored and Joe Drago committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    ce701aa View commit details
    Browse the repository at this point in the history
  3. Minor changes to PR #430 -

    * Adjust matrixCoefficients checks to allow MC=5/6, and stop allowing MC=12
    * Add a printf for the enduser when JPEG data was directly copied instead of converted
    * Remove extraneous jpeg_finish_decompress() along with a paired, unnecessary goto to improve readability
    * Add clarifying comments around new functions and paths
    Joe Drago committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    98c9b2f View commit details
    Browse the repository at this point in the history
  4. Add new default setting for avifenc's --yuv: "auto"

    This new setting behaves similarly to the previous default of "444", except when reading in a JPEG
    which is internally YUV420 or YUV400 (grayscale), in which it will adopt the format without
    performing any YUV conversion before encoding.
    Joe Drago committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    d686a55 View commit details
    Browse the repository at this point in the history