This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new 213c4205b0 avcodec/notchlc: replicate the high bits when widening
chroma endpoints
213c4205b0 is described below
commit 213c4205b09d07f918c4f042ffd7c2010d958eb5
Author: Daniel Brodie <[email protected]>
AuthorDate: Wed Oct 21 14:43:03 2026 -0400
Commit: Peter Ross <[email protected]>
CommitDate: Sun Nov 8 06:57:15 2026 +0000
avcodec/notchlc: replicate the high bits when widening chroma endpoints
(x << 4) | (x & 0xF) repeats the low nibble, so 8-bit chroma endpoints
land up to 15 codes off on the 12-bit scale. (x << 4) | (x >> 4)
replicates the high nibble, maps 0 to 0 and 255 to 4095, and matches the
alpha endpoint expansion from 01fc714fc4.
The NotchLC FATE references change in U and V only; Y and alpha are
unchanged.
Signed-off-by: Daniel Brodie
<[email protected]>
---
libavcodec/notchlc.c | 24 ++++++++++++------------
tests/ref/fate/notchlc-alpha-blocks | 2 +-
tests/ref/fate/notchlc-alpha-macroblocks | 2 +-
tests/ref/fate/notchlc-alpha-ramp | 2 +-
tests/ref/fate/notchlc-alpha-ramp-oddsize | 2 +-
tests/ref/fate/notchlc-chroma-alpha | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c
index b520f9a9ea..a6e263cbc5 100644
--- a/libavcodec/notchlc.c
+++ b/libavcodec/notchlc.c
@@ -380,10 +380,10 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame
*p,
u1 = bytestream2_get_byte(&dgb);
v1 = bytestream2_get_byte(&dgb);
loc = bytestream2_get_le32(&dgb);
- u0 = (u0 << 4) | (u0 & 0xF);
- v0 = (v0 << 4) | (v0 & 0xF);
- u1 = (u1 << 4) | (u1 & 0xF);
- v1 = (v1 << 4) | (v1 & 0xF);
+ u0 = (u0 << 4) | (u0 >> 4);
+ v0 = (v0 << 4) | (v0 >> 4);
+ u1 = (u1 << 4) | (u1 >> 4);
+ v1 = (v1 << 4) | (v1 >> 4);
for (int i = 0; i < 16; i += 4) {
for (int j = 0; j < 16; j += 4) {
@@ -408,10 +408,10 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame
*p,
u1 = bytestream2_get_byte(&dgb);
v1 = bytestream2_get_byte(&dgb);
loc = bytestream2_get_le32(&dgb);
- u0 = (u0 << 4) | (u0 & 0xF);
- v0 = (v0 << 4) | (v0 & 0xF);
- u1 = (u1 << 4) | (u1 & 0xF);
- v1 = (v1 << 4) | (v1 & 0xF);
+ u0 = (u0 << 4) | (u0 >> 4);
+ v0 = (v0 << 4) | (v0 >> 4);
+ u1 = (u1 << 4) | (u1 >> 4);
+ v1 = (v1 << 4) | (v1 >> 4);
for (int ii = 0; ii < 8; ii += 2) {
for (int jj = 0; jj < 8; jj += 2) {
@@ -435,10 +435,10 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame
*p,
u1 = bytestream2_get_byte(&dgb);
v1 = bytestream2_get_byte(&dgb);
loc = bytestream2_get_le32(&dgb);
- u0 = (u0 << 4) | (u0 & 0xF);
- v0 = (v0 << 4) | (v0 & 0xF);
- u1 = (u1 << 4) | (u1 & 0xF);
- v1 = (v1 << 4) | (v1 & 0xF);
+ u0 = (u0 << 4) | (u0 >> 4);
+ v0 = (v0 << 4) | (v0 >> 4);
+ u1 = (u1 << 4) | (u1 >> 4);
+ v1 = (v1 << 4) | (v1 >> 4);
for (int iii = 0; iii < 4; iii++) {
for (int jjj = 0; jjj < 4; jjj++) {
diff --git a/tests/ref/fate/notchlc-alpha-blocks
b/tests/ref/fate/notchlc-alpha-blocks
index e38ca1f8e1..d31d83cd22 100644
--- a/tests/ref/fate/notchlc-alpha-blocks
+++ b/tests/ref/fate/notchlc-alpha-blocks
@@ -7,4 +7,4 @@
#dimensions 0: 512x512
#sar 0: 0/1
#stream#, dts, pts, duration, size, hash
-0, 0, 0, 1, 2097152, 67bd65546c55ffbd1a64b7f9492a42fb
+0, 0, 0, 1, 2097152, 90e28683fad25df2c6c98c55b7cd8077
diff --git a/tests/ref/fate/notchlc-alpha-macroblocks
b/tests/ref/fate/notchlc-alpha-macroblocks
index cea7275da7..9cc2dfc65f 100644
--- a/tests/ref/fate/notchlc-alpha-macroblocks
+++ b/tests/ref/fate/notchlc-alpha-macroblocks
@@ -7,4 +7,4 @@
#dimensions 0: 512x512
#sar 0: 0/1
#stream#, dts, pts, duration, size, hash
-0, 0, 0, 1, 2097152, 640574a89b3940be667ed53d248d3f53
+0, 0, 0, 1, 2097152, d45dcd0793ccdf11acee45afd6fb788e
diff --git a/tests/ref/fate/notchlc-alpha-ramp
b/tests/ref/fate/notchlc-alpha-ramp
index c861dbc17d..aba485dd87 100644
--- a/tests/ref/fate/notchlc-alpha-ramp
+++ b/tests/ref/fate/notchlc-alpha-ramp
@@ -7,4 +7,4 @@
#dimensions 0: 512x512
#sar 0: 0/1
#stream#, dts, pts, duration, size, hash
-0, 0, 0, 1, 2097152, b4f2fc126dd4b69c536d8b606273386c
+0, 0, 0, 1, 2097152, cafa06e1fe4a07b87ee8e189bf933bfc
diff --git a/tests/ref/fate/notchlc-alpha-ramp-oddsize
b/tests/ref/fate/notchlc-alpha-ramp-oddsize
index 0333c8c808..2ac3171624 100644
--- a/tests/ref/fate/notchlc-alpha-ramp-oddsize
+++ b/tests/ref/fate/notchlc-alpha-ramp-oddsize
@@ -7,4 +7,4 @@
#dimensions 0: 500x300
#sar 0: 0/1
#stream#, dts, pts, duration, size, hash
-0, 0, 0, 1, 1200000, 24e3f542b4fee8fe1cbe6805f1979eb0
+0, 0, 0, 1, 1200000, a403be2465abb74f7d0da16542f29ecc
diff --git a/tests/ref/fate/notchlc-chroma-alpha
b/tests/ref/fate/notchlc-chroma-alpha
index 5ec3d5587c..9527503bb5 100644
--- a/tests/ref/fate/notchlc-chroma-alpha
+++ b/tests/ref/fate/notchlc-chroma-alpha
@@ -7,4 +7,4 @@
#dimensions 0: 512x512
#sar 0: 0/1
#stream#, dts, pts, duration, size, hash
-0, 0, 0, 1, 2097152, 51b012d44f2e69bce68bafb7261923e9
+0, 0, 0, 1, 2097152, 363e1790732eadce720471451c703758
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]