ultravideo / uvg266

An open-source VVC encoder based on Kvazaar
BSD 3-Clause "New" or "Revised" License
217 stars 16 forks source link

Are ultravideo vvc files compatible with other creators? #3

Closed Jamaika1 closed 2 years ago

Jamaika1 commented 2 years ago

I have a problem with video decoding. https://www.sendspace.com/file/204ph0 I use gcc 12.0.1 20220429. http://msystem.waw.pl/x265/mingw-gcc1201-20220429.7z I use plugins for gcc thread/mutex/future/condition_variable https://github.com/Jamaika1/mingw_std_threads

euvg266.exe -i "113.y4m" -o "output_10bit.vvc" --no-info --input-bitdepth 8 --threads 4 --input-res 1280x720 --input-fps 30000/1001 --input-format P420 --ref 15 --gop lp-g16d5t3 -p 256 --bitrate 3000000 -n 200 --preset medium

https://github.com/fraunhoferhhi/vvdec VVDecoderApp.exe -b output_10bit.266 -o rrr.yuv

ERROR: In function "void vvdec::InputBitstream::read(uint32_t, uint32_t&)" in BitStream.cpp:283: Exceeded FIFO size ERROR CONDITION: m_fifo_idx + num_bytes_to_load >= m_fifo.size()

fador commented 2 years ago

Thanks for the report! We are testing uvg266 using VTM and it should work well with vvdec, actually I was testing it quickly and noticed that if you leave --bitrate parameter out it did decode, so we might have to look into that 😅

adamjw24 commented 2 years ago

@fador so is it a vvdec or a uvg266 issue? Is the bitstream decodable with VTM?

adamjw24 commented 2 years ago

@fador so is it a vvdec or a uvg266 issue? Is the bitstream decodable with VTM?

I guess I tested with VTM and thus just answered myself.

Let us know, if you find issues with vvdec.

The enc is pretty fast by the way, nice.

fador commented 2 years ago

@adamjw24 yes definitely uvg266 problem, we still have not verified all the functionality we imported from Kvazaar and it seems even something like rate control is causing problems 😅

Let us know, if you find issues with vvdec.

We will, don't worry!

The enc is pretty fast by the way, nice.

Thanks! But I'm pretty sure we are behind vvenc (in many ways), but we like the challenge and it's nice to have some target 😁

Jovasa commented 2 years ago

The issue with ratecontrol is now fixed with https://github.com/ultravideo/uvg266/commit/3a0c5b78a3870e4705740847133043e58891576b and https://github.com/ultravideo/uvg266/commit/900ce314efe8a1ab68f8b0db629849e50182f932

fador commented 2 years ago

@Jamaika1 btw the original command line parameters you used are actually not working as intended:

euvg266.exe -i "113.y4m" -o "output_10bit.vvc" --no-info --input-bitdepth 8 --threads 4 --input-res 1280x720 --input-fps 30000/1001 --input-format P420 --ref 15 --gop lp-g16d5t3 -p 256 --bitrate 3000000 -n 200 --preset medium

The preset overrides some of the settings and --gop lp-g16d5t3 does not work, if you move --preset medium to the beginning and set --gop lp-g16d4t1 then the output seems to be good.

..so this should work: -i "113.y4m" -o "output_10bit.vvc" --no-info --input-bitdepth 8 --threads 4 --input-res 1280x720 --input-fps 30000/1001 --input-format P420 --preset medium --ref 15 --gop lp-g16d4t1 -p 256 --bitrate 3000000 -n 200

Jamaika1 commented 2 years ago

It is better, but there are still problems. v0.2.3-b4a3d54

euvg266.exe -i "113.y4m" -o "output_10bit.vvc" --no-info --input-bitdepth 8 --threads 4 --input-res 1280x720 --input-fps 30000/1001 --input-format P420 --ref 15 --gop lp-g16d4t1 -p 256 --bitrate 3000000 -n 200 --preset medium

Maybe some more info in help. How the gop counts and what it consists of. Why did I not have an info error that I was doing something wrong.

Result

VVCSoftware: VTM Decoder Version 16.2 [Windows][GCC 12.0.1][64 bit]
POC    0 LId:  0 TId: 0 ( IDR_N_LP, I-SLICE, QP 20 ) [DT  0.047] [L0] [L1] [Checksum:07041807,01cda157,01cd1607,(OK)]
POC   16 LId:  0 TId: 0 ( TRAIL, P-SLICE, QP 20 ) [DT  0.093] [L0 0c] [L1] [Checksum:070357f4,01b57bc2,01d7f965,(OK)]
POC    8 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 27 ) [DT  0.047] [L0 0c] [L1 16] [Checksum:07027fc1,01bde4d3,01e5bb70,(OK)]
POC    4 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 24 ) [DT  0.093] [L0 0c] [L1 8 16] [Checksum:0703b61f,01c81b6a,01cf1859,(OK)]
POC    2 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 34 ) [DT  0.016] [L0 0c] [L1 4 8 16] [Checksum:070353c4,01ca32eb,01cc1553,(OK)]
POC    1 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 30 ) [DT  0.031] [L0 0c] [L1 2 4 8 16] [Checksum:07032fe6,01cb717c,01cd2acf,(OK)]
POC    3 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 28 ) [DT  0.047] [L0 2c 0] [L1 4 8 16] [Checksum:070444c1,01c8c558,01d2269a,(OK)]
POC    6 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 20 ) [DT  0.094] [L0 4c 0] [L1 8 16] [Checksum:0704632e,01c36731,01dde490,(OK)]
POC    5 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 25 ) [DT  0.032] [L0 4c 0] [L1 6 8 16] [Checksum:0704ed0b,01c7941b,01d350b2,(OK)]
POC    7 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 25 ) [DT  0.047] [L0 6c 4 0] [L1 8 16] [Checksum:07049261,01c2a1e8,01e1c7ca,(OK)]
POC   12 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 19 ) [DT  0.094] [L0 8c 0] [L1 16] [Checksum:0708c35a,01b7d0ac,01dc9fe6,(OK)]
POC   10 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 21 ) [DT  0.063] [L0 8c 0] [L1 12 16] [Checksum:0704d995,01b94002,01e1bf87,(OK)]
POC    9 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 24 ) [DT  0.062] [L0 8c 0] [L1 10 12 16] [Checksum:0703b8ce,01bea20d,01e573bd,(OK)]
POC   11 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 21 ) [DT  0.094] [L0 10c 8 0] [L1 12 16] [Checksum:0706b775,01b553d1,01dec551,(OK)]
POC   14 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 20 ) [DT  0.078] [L0 12c 8 0] [L1 16] [Checksum:07079094,01b62849,01db44aa,(OK)]
POC   13 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 23 ) [DT  0.046] [L0 12c 8 0] [L1 14 16] [Checksum:0708aac5,01b78346,01dcbe71,(OK)]
POC   15 LId:  0 TId: 0 ( TRAIL, B-SLICE, QP 22 ) [DT  0.109] [L0 14c 12 8 0] [L1 16] [Checksum:07031860,01b56eb6,01da8e26,(OK)]

ERROR: In function "decompressSlice" in DecSlice.cpp:259: Expecting a terminating bit
Fraunhofer VVC/H.266 Decoder VVdeC, version 1.5.0 [THREADS=4; PARSE_DELAY=4; SIMD=SCALAR]
POC    0 LId:  0 TId: 0 ( I-SLICE, QP 20 ) [DT  0.016] [L0 ] [L1 ]
POC   16 LId:  0 TId: 0 ( P-SLICE, QP 20 ) [DT  0.056] [L0  0c] [L1 ]
POC    8 LId:  0 TId: 0 ( B-SLICE, QP 27 ) [DT  0.027] [L0  0c] [L1 16 ]
POC    4 LId:  0 TId: 0 ( B-SLICE, QP 24 ) [DT  0.030] [L0  0c] [L1 8 16 ]
POC    2 LId:  0 TId: 0 ( B-SLICE, QP 34 ) [DT  0.016] [L0  0c] [L1 4 8 16 ]
POC    1 LId:  0 TId: 0 ( B-SLICE, QP 30 ) [DT  0.024] [L0  0c] [L1 2 4 8 16 ]
POC    6 LId:  0 TId: 0 ( B-SLICE, QP 20 ) [DT  0.028] [L0  4c0 ] [L1 8 16 ]
POC    3 LId:  0 TId: 0 ( B-SLICE, QP 28 ) [DT  0.020] [L0  2c0 ] [L1 4 8 16 ]
POC    5 LId:  0 TId: 0 ( B-SLICE, QP 25 ) [DT  0.024] [L0  4c0 ] [L1 6 8 16 ]
POC    7 LId:  0 TId: 0 ( B-SLICE, QP 25 ) [DT  0.025] [L0  6c4 0 ] [L1 8 16 ]
POC   12 LId:  0 TId: 0 ( B-SLICE, QP 19 ) [DT  0.030] [L0  8c0 ] [L1 16 ]
POC   10 LId:  0 TId: 0 ( B-SLICE, QP 21 ) [DT  0.022] [L0  8c0 ] [L1 12 16 ]
POC    9 LId:  0 TId: 0 ( B-SLICE, QP 24 ) [DT  0.041] [L0  8c0 ] [L1 10 12 16 ]
POC   14 LId:  0 TId: 0 ( B-SLICE, QP 20 ) [DT  0.029] [L0  12c8 0 ] [L1 16 ]
POC   11 LId:  0 TId: 0 ( b-SLICE, QP 21 ) [DT  0.024] [L0  10c8 0 ] [L1 12 16 ]
vvdecapp [error]: decoding failed:  (decoder requires restart) detail: caught unknown exception
ERROR: In function "void vvdec::DecSlice::parseSlice(vvdec::Slice*, vvdec::InputBitstream*, int)" in DecSlice.cpp:179: Expecting a terminating bit
ERROR CONDITION: !binVal
fador commented 2 years ago

One thing to note is that you still have the --preset medium at the end, it overrides the --ref and --gop parameters. But the problem actually was that medium preset defined incorrect intra depth values, c8539a3701f3b615e9a6015a533c08c0e65177de fixes this by disabling the 4x4 blocks completely.

Hopefully your tests work now!

Edit:

..and yes we try to test which parameters work now and try to figure out what we need to do in order to stop users from defining incorrect things, thanks for pointing it out!

Jamaika1 commented 2 years ago

Thanks for the help. I am not asking any more questions and watching vvc development.

fador commented 2 years ago

You're welcome! You can ask more if you like, I'm sorry that you have to be a beta tester for our software but it does help us to figure our problems 😅