Perceptual quantization is the encoder technique of spending bits where the eye will notice and saving bits where it won't. Instead of treating every block in a frame as equally important, the encoder analyses the local content and adjusts how aggressively it quantizes (rounds away detail) based on how visible the loss will be to a human viewer. The principle: a smooth flat region of skin or sky shows compression damage clearly, while a busy patch of grass or moving water hides it.
The two main mechanisms inside modern encoders. psy-rd (psycho-visual rate-distortion) penalises mode decisions that flatten high-frequency texture — the encoder slightly prefers choices that "look" more like the source even when they cost more bits. psy-rdoq (psycho-visual RDOQ) modifies the quantization stage to retain noise and grain that pure rate-distortion would have rounded to zero. Both are tunable parameters in x264 and x265, with sensible defaults that already produce visibly better video than encoders without them. Content-adaptive quantization goes further by detecting faces, text and motion regions and protecting them with finer quantization.
For a product team, perceptual quantization is the single most important "modern" trick in encoder quality. It's part of why x264 has remained competitive against newer commercial encoders, why HEVC's perceptual modes look much better than its default math modes, and why the same codec's output looks dramatically better today than the same codec's output from 2015. The cost is purely computational — perceptual quantization needs the encoder to do extra analysis per block — but the visible quality gains are large enough that essentially every production encoder ships with perceptual modes enabled by default.

