+ PixletContext *ctx = avctx->priv_data;
+ int max = (1 << depth) - 1;
+
+ if (ctx->depth == depth)
+ return;
+ ctx->depth = depth;
+
+ for (int i = 0; i < FF_ARRAY_ELEMS(ctx->lut); i++)
+ ctx->lut[i] = ((int64_t)i * i * 65535LL) / max / max;
+}
+
+static void postprocess_luma(AVCodecContext *avctx, AVFrame *frame,
+ int w, int h, int depth)
+{
+ PixletContext *ctx = avctx->priv_data;