From: Domenico Del Monaco via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Domenico Del Monaco <dmdrsf@gmail.com>
Subject: [FFmpeg-devel] Native jpeg2000 encoder produces random color artifacts with 12-bit YUV422P12 HDR content
Date: Mon, 23 Feb 2026 12:03:07 +0100
Message-ID: <62ee3e74-3f65-4a58-9159-6e171c718bcf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
## Description
The native `jpeg2000` encoder produces random green/red pixel artifacts
when encoding 12-bit YUV422P12 HDR content via AviSynth input.
The issue is reproducible regardless of:
- dithering settings (error_diffusion, ordered, none)
- q:v parameter (with or without)
- FFmpeg limiter filter
The same pipeline using `libopenjpeg` produces correct output with no
artifacts.
## Command that produces artifacts
ffmpeg -i input.avs -c:v jpeg2000 -q:v 1 -pix_fmt yuv422p12le
-colorspace bt2020nc -color_trc smpte2084 -color_primaries bt2020
-color_range limited -y -f mxf output.mxf
## Command that works correctly
ffmpeg -i input.avs -c:v libopenjpeg -compression_level 6 -pix_fmt
yuv422p12le -colorspace bt2020nc -color_trc smpte2084 -color_primaries
bt2020 -color_range limited -y -f mxf output.mxf
## Input pipeline
AviSynth script with Dolby Vision FEL content processed via DoViBaker
plugin.
Output is RGB converted to YUV422P12 via z_ConvertFormat:
colorspace_op="rgb:st2084:2020:full=>2020ncl:st2084:2020:limited"
dither_type="error_diffusion"
## Expected behavior
Clean 12-bit output identical to libopenjpeg output.
## Actual behavior
Random green/red pixel artifacts scattered randomly across frames.
Artifacts are visible in DaVinci Resolve and media players.
Artifacts change position randomly between frames.
## FFmpeg version 8.01
I am attaching an image of the bug detected.
Thank you
Domenico
[-- Attachment #2: Artifacts ffmpeg jpeg2000.png --]
[-- Type: image/png, Size: 756765 bytes --]
[-- Attachment #3: Type: text/plain, Size: 163 bytes --]
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
reply other threads:[~2026-02-24 22:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62ee3e74-3f65-4a58-9159-6e171c718bcf@gmail.com \
--to=ffmpeg-devel@ffmpeg.org \
--cc=dmdrsf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git