You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The saved pictures pf DCVC-FM have obvious color differences. #85
I try to save the decoded frame of DCVC-FM of run_one_point_fast, so I add the code below: recon_writer = PNGWriter(args['bin_folder'], args['src_width'], args['src_height'])
and
def save_yuv444(yuv, filepath):
y = yuv[0]
u = yuv[1]
v = yuv[2]
y = y * 255.0
u = (u - 0.5) * 255.0 + 128.0
v = (v - 0.5) * 255.0 + 128.0
y = np.clip(y, 0, 255).astype(np.uint8)
u = np.clip(u, 0, 255).astype(np.uint8)
v = np.clip(v, 0, 255).astype(np.uint8)
with open(filepath, "wb") as f:
y.tofile(f)
u.tofile(f)
v.tofile(f)
Activity
yaohualibin commentedon Mar 20, 2025
Are you encoding RGB or YUV? If RGB, are you using the same conversion matrix from YUV to RGB and RGB to YUV?
QIN921 commentedon Mar 20, 2025
The input are YUV videos, and i am trying to save RGB png
yaohualibin commentedon Mar 20, 2025
Does saving as YUV work as expected?
QIN921 commentedon Mar 20, 2025
Yes, saving as YUV work as expected.
yaohualibin commentedon Mar 20, 2025
Then I suspect different conversion methods were used to convert YUV to RGB.
ichlubna commentedon Apr 16, 2026
For anyone interested. Added to test_helper.py:
then using as
and then decoding to png as
Seem to work well.