Shifting Histograms >>
Forum

Forum



SearchSearch   Users   Registration   Entrance
Today: 20.10.2025 - 13:38:36
Pages:  1  

Shifting Histograms

MessageAuthor

Hi, Recently I was comparing codecs for the 100th time, and I made a surprise discovery. Some codecs shift the entire histograms of image up or down by 1-2%. Xvid and Ffdshow (trying several compressions) both exhibited clear histogram shifting. X264 and Morgan Multimedia Mj2k held the histograms in place. I was wondering if this is well known? I expect lossy compression to lose image detail, but not to make entire red, green or blue channels lighter/darker. Cheers, A

---------------------------

SoonerE39

users




Statistics:
Messages: 341
Registration: 03.05.2003
02.09.20 - 23:35:21
Message # 1
RE: Shifting Histograms

You sure you're decoding the outputs correctly? The TV / PC levels issue is pretty well known and causes lots of issues. ~MiSfit

---------------------------

M3formeM3foryou

users




Statistics:
Messages: 150
Registration: 08.28.2002
02.09.20 - 23:45:03
Message # 2
RE: Shifting Histograms

Like Ben said. Have a look at:

---------------------------
Chris

CMT

users




Statistics:
Messages: 3,138
Registration: 02.26.2001
02.09.20 - 23:52:55
Message # 3
RE: Shifting Histograms

I did some more controlled testing. Using only VirtualDub, I encoded a sample clip and then decoded it. To test the YUV conversions that were occurring inside the codecs, I set VirtualDub to output RGB24 to codecs during encoding, and to request RGB24 from codecs when decoding. The histogram shifting reappeared, in contrast to tests that directly encoded/decoded YV12 instead, where there was no shifting. Morgan MJPEG2K, X264, and Lagarith (YV12 mode) all had no histogram shifting. Xvid made all three RGB channels 1% darker or so. Ffdshow Mjpg made the Red channel 1% darker or so, the Blue channel a much smaller about darker, maybe 0.2%. To make sure this wasn't a 601/709 issue, I repeated the tests on a solid 50% gray frame. The same shifting still occurs. I iterated the procedure for Xvid and Ffdshow, and the shifting accumulates. Xvid frames get darker with each iteration. Ffdshow frames turn green/cyan. After five iterations, the differences are very clear to the naked eye. If anybody else cares to try these simple tests, I'd love to hear if they get similar results. Regards, A

---------------------------

craaaazzy

users




Statistics:
Messages: 71
Registration: 04.12.2002
02.09.20 - 23:57:16
Message # 4
RE: Shifting Histograms

Update: The issue has been confirmed by the Xvid team and was indeed a rounding problem in the RGB/YUV conversion code. A fix is in the works. Cheers, A

---------------------------

dave1126

users




Statistics:
Messages: 226
Registration: 01.31.2002
03.09.20 - 00:01:34
Message # 5
RE: Shifting Histograms

Ah, this explains what I've been seeing too. Thought I was going crazy. Thanks for figuring this out, looking forward to the fix.

---------------------------

Quaife101

users




Statistics:
Messages: 176
Registration: 04.24.2003
03.09.20 - 00:08:27
Message # 6
RE: Shifting Histograms
Mic Recording of Guitars versus Not Mic Recording : Previous topic
Pages:  1  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants

Created with: XenForo 5.1.1