{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/start-here/psychovisual",
  "collection": "docs",
  "title": "Psychovisual encoding",
  "description": "What psychovisual quality is, why encoders need psychovisual optimizations such as psy-rd and adaptive quantization, and why metrics often penalize them.",
  "canonicalUrl": "https://encode.wiki/start-here/psychovisual/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/start-here/psychovisual.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/start-here/psychovisual.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "x265 documentation — psycho-visual options",
      "url": "https://x265.readthedocs.io/en/master/cli.html#psycho-visual-options",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "x264 source repository (stable branch; --fullhelp defaults and tunes)",
      "url": "https://code.videolan.org/videolan/x264/-/tree/stable",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "SVT-AV1 v4.2.0 — parameters (ac-bias, variance boost, tune)",
      "url": "https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/v4.2.0/Docs/Parameters.md",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Cloudinary — fidelity or appeal in image compression",
      "url": "https://cloudinary.com/blog/what_to_focus_on_in_image_compression_fidelity_or_appeal",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/introduction/psychovisual.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/introduction/psychovisual.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Why encoders need psychovisual tuning",
      "anchor": "why-encoders-need-psychovisual-tuning"
    },
    {
      "depth": 2,
      "text": "Fidelity versus appeal",
      "anchor": "fidelity-versus-appeal"
    },
    {
      "depth": 2,
      "text": "Common psychovisual options",
      "anchor": "common-psychovisual-options"
    },
    {
      "depth": 2,
      "text": "Psychovisual options and metrics",
      "anchor": "psychovisual-options-and-metrics"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/start-here/psychovisual/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/_preamble.md",
      "checksum": "26e8c545c819cfdddc6c2f084d47fe7c188e44ff387246408792a6421a434aa4",
      "bytes": 497
    },
    {
      "id": "why-encoders-need-psychovisual-tuning",
      "title": "Why encoders need psychovisual tuning",
      "depth": 2,
      "anchor": "why-encoders-need-psychovisual-tuning",
      "canonicalUrl": "https://encode.wiki/start-here/psychovisual/#why-encoders-need-psychovisual-tuning",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/why-encoders-need-psychovisual-tuning.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/why-encoders-need-psychovisual-tuning.md",
      "checksum": "0d4531634a484af8b60ddb3aaea25868c5de48b0fcd6523bbc716fb4fc3fe704",
      "bytes": 1286
    },
    {
      "id": "fidelity-versus-appeal",
      "title": "Fidelity versus appeal",
      "depth": 2,
      "anchor": "fidelity-versus-appeal",
      "canonicalUrl": "https://encode.wiki/start-here/psychovisual/#fidelity-versus-appeal",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/fidelity-versus-appeal.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/fidelity-versus-appeal.md",
      "checksum": "426c9f07fb293c544420af015f61af8a11d1b7b1449f347b9576b8399f8ce500",
      "bytes": 775
    },
    {
      "id": "common-psychovisual-options",
      "title": "Common psychovisual options",
      "depth": 2,
      "anchor": "common-psychovisual-options",
      "canonicalUrl": "https://encode.wiki/start-here/psychovisual/#common-psychovisual-options",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/common-psychovisual-options.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/common-psychovisual-options.md",
      "checksum": "2613cc9666c5c584bea13b88d4ade42ec1e09b87d5c2685234556471ad5881e9",
      "bytes": 1759
    },
    {
      "id": "psychovisual-options-and-metrics",
      "title": "Psychovisual options and metrics",
      "depth": 2,
      "anchor": "psychovisual-options-and-metrics",
      "canonicalUrl": "https://encode.wiki/start-here/psychovisual/#psychovisual-options-and-metrics",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/psychovisual-options-and-metrics.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/start-here/psychovisual/psychovisual-options-and-metrics.md",
      "checksum": "5705c1ac8143bcea66c49c969d459c0b2291056bf3ab7be87a10fe78bed0a550",
      "bytes": 913
    }
  ],
  "outboundReferences": [
    "/guides/compare-encoding-quality/",
    "/reference/metrics/butteraugli/",
    "/reference/metrics/psnr/",
    "/reference/metrics/ssim/",
    "/reference/metrics/ssimulacra2/",
    "/reference/metrics/vmaf/",
    "/tools/software-encoders/svt-av1-essential/",
    "/tools/software-encoders/svt-av1-hdr/",
    "/tools/software-encoders/svt-av1-psy/",
    "/tools/software-encoders/x264/",
    "/tools/software-encoders/x265/",
    "https://cloudinary.com/blog/what_to_focus_on_in_image_compression_fidelity_or_appeal",
    "https://x265.readthedocs.io/en/master/cli.html#psycho-visual-options"
  ],
  "checksum": "0a979e0c2afc9879ff531eaada737853da4a469821a6004efafe944163cc5af1",
  "contentFormat": "markdown",
  "markdown": "**Psychovisual quality** (also called perceptual, subjective or visual quality) is quality as the human visual system perceives it. Psychovisual options in an encoder exist because the encoder's own idea of quality, a simple error measure, often disagrees with what people see.\n\nHow much care an encoder puts into psychovisual quality is a good sign of its maturity. It is a large part of why [x264](/tools/software-encoders/x264/) and [x265](/tools/software-encoders/x265/) are so well regarded.\n\n## Why encoders need psychovisual tuning\n\nAn encoder chooses between coding options with rate–distortion optimization: it picks whichever option gives the least distortion for the bits spent. Distortion is usually measured as squared error, the same thing [PSNR](/reference/metrics/psnr/) measures. The [x265 documentation](https://x265.readthedocs.io/en/master/cli.html#psycho-visual-options) explains the problem:\n\n> Left to its own devices, the encoder will make mode decisions based on a simple rate distortion formula, trading distortion for bitrate. This is generally effective except for the manner in which this distortion is measured. It tends to favor blurred reconstructed blocks over blocks which have wrong motion. The human eye generally prefers the wrong motion over the blur and thus x265 offers psycho-visual adjustments to the rate distortion algorithm.\n\nThe same applies to detail. Viewers prefer a block with texture of roughly the right **energy** (amount of detail), even if the texture is not exactly the source's, over a smooth block that is numerically closer. A blurred picture looks lifeless and smeared; a picture with slightly wrong grain or texture usually looks like the original. Psychovisual options push the encoder towards preserving visual energy.\n\n## Fidelity versus appeal\n\nJon Sneyers draws a useful distinction in [Cloudinary's blog](https://cloudinary.com/blog/what_to_focus_on_in_image_compression_fidelity_or_appeal):\n\n> Fidelity in images is about visually preserving the original; appeal is about hiding the compression artifacts.\n\nAt high bitrates the goal is fidelity: keep the source's detail and grain, which is where psychovisual options shine. At very low bitrates the encoder cannot keep the detail anyway, and a little blur often looks better than blocky or noisy artifacts. That is why psychovisual strength should drop as bitrate drops: x265's documentation notes that \"the lower the bitrate, the lower the optimal psycho-visual settings\", and too much at low bitrates produces ringing and motion judder.\n\n## Common psychovisual options\n\n**Psy-RD** adds a cost to blocks whose visual energy does not match the source, so the encoder stops choosing blurry prediction modes just because they are cheap. In x264 it is `--psy-rd <rd>:<trellis>` (default `1.0:0.0`); the second value is psy-trellis. In x265 it is `--psy-rd` (default 2.0).\n\n**Psy-RDOQ** (x265 `--psy-rdoq`, default 0, or 1.0 at the slow presets) biases quantization towards keeping more non-zero coefficients, which preserves energy in general rather than the source's energy specifically. x265's documentation describes the pair this way:\n\n> `--psy-rd` will add an extra cost to reconstructed blocks which do not match the visual energy of the source block. […] psy-rdoq is less accurate than psy-rd, it is biasing towards energy in general while psy-rd biases towards the energy of the source image.\n\n**Adaptive quantization (AQ)** varies the quantizer within a frame. Flat areas and smooth gradients show errors far more readily than busy texture, so AQ moves bits towards them, which prevents banding and blocking in skies, walls and dark scenes. x264 enables variance AQ by default (`--aq-mode 1`); `--aq-mode 3` adds a bias towards dark scenes.\n\n**In SVT-AV1**, `--tune 0` selects visual-quality tuning (the default, `--tune 1`, targets PSNR), `--enable-variance-boost` is a variance-based AQ for low-contrast areas, and `--ac-bias` is an energy-preserving bias similar to x264 and x265's psy-rd. Several of these came from the community [SVT-AV1-PSY](/tools/software-encoders/svt-av1-psy/) fork, which is now archived; its work continues in mainline and in forks such as [SVT-AV1-HDR](/tools/software-encoders/svt-av1-hdr/) and [SVT-AV1-Essential](/tools/software-encoders/svt-av1-essential/).\n\n## Psychovisual options and metrics\n\nMost metrics penalize psychovisual optimizations. Retained grain or texture that is not pixel-identical to the source counts as error, while a smooth, slightly blurred block scores well. That is why x264's `--tune psnr` and `--tune ssim` simply turn psy-rd off (`--no-psy`), and why an encode tuned for PSNR, SSIM or VMAF can score higher while looking worse.\n\nUse metrics to narrow down settings and find problem scenes, then decide by watching. Some newer metrics such as [SSIMULACRA2](/reference/metrics/ssimulacra2/) and [Butteraugli](/reference/metrics/butteraugli/) track perceived quality better than [PSNR](/reference/metrics/psnr/), [SSIM](/reference/metrics/ssim/) or [VMAF](/reference/metrics/vmaf/), but none of them fully captures the value of psychovisual tuning. The [quality comparison guide](/guides/compare-encoding-quality/) covers how to use metrics well.\n"
}
