Selur's Little Message Board
x264 mixed_ref=0 issue - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: x264 mixed_ref=0 issue (/thread-3946.html)



x264 mixed_ref=0 issue - Lipomo - 09.12.2024

The mixed ref box is checked by default but mixed_ref=0 on the encoding.

I think that's a bug


RE: x264 mixed_ref=0 issue - Selur - 09.12.2024

Mixed ref, should be on by default.
There only is an option in the command line interface to disable it:
--no-mixed-refs         Don't decide references on a per partition basis
source: x264 --fullhelp

Just tried to reproduce it using:
x264 --pass 1 --bitrate 1500 --profile high --level 5.1 --ref 1 --keyint 250 --min-keyint 0 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 0 --sync-lookahead 11 --cplxblur 20.0 --qcomp 0.50 --qblur 0.50 --mbtree --rc-lookahead 40 --ipratio 1.40 --pbratio 1.30 --chroma-qp-offset 0 --qpmin 0 --qpmax 51 --qpstep 4 --partitions none --no-8x8dct --8x8dct --me dia --mvrange -1 --subme 2 --cabac --trellis 0 --weightp 1 --aq-mode 0 --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --stats "/Users/selur/tmp/test.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-csp i420 --output-depth 8 --output NUL -

x264 --pass 2 --bitrate 1500 --profile high --level 5.1 --ref 3 --keyint 250 --min-keyint 0 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 0 --sync-lookahead 11 --cplxblur 20.0 --qcomp 0.50 --qblur 0.50 --mbtree --rc-lookahead 40 --ipratio 1.40 --pbratio 1.30 --chroma-qp-offset 0 --qpmin 0 --qpmax 51 --qpstep 4 --partitions i4x4,p8x8,b8x8 --8x8dct --no-fast-pskip --me hex --merange 16 --mvrange -1 --subme 5 --cabac --trellis 0 --weightp 1 --aq-mode 0 --vbv-maxrate 300000 --vbv-bufsize 300000 --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --colormatrix smpte170m --stats "/Users/selur/tmp/test.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-csp i420 --output-depth 8 --output "/Users/selur/tmp/test.264" -

then looked with MediaInfo at the output:
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x111 / me=hex / subme=5 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=11 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=0 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1500 / ratetol=1.0 / qcomp=0.50 / qpmin=0 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=300000 / vbv_bufsize=300000 / nal_hrd=none / filler=0 / ip_ratio=1.40 / aq=1:0.00
=> Can't reproduce it, here 'mixed_ref=1' is properly set.

I can look at it more (tomorrow evening) if you read the sticky and provide proper details.

Cu Selur


RE: x264 mixed_ref=0 issue - Lipomo - 09.12.2024

Wait a sec, before doing a full post I think I found the issue.

-> When minimize command line is checked : mixed_ref = 0
-> When minimize command line is not checked : mixed_ref = 1

Can you try ?


RE: x264 mixed_ref=0 issue - Selur - 09.12.2024

I can reproduce the problem.
Strange.
with minimize on:
x264 --preset veryfast --pass 1 --bitrate 1500 --profile high --level 5.1 --direct auto --b-adapt 0 --sync-lookahead 11 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --partitions none --no-8x8dct --me dia --aq-mode 0 --sar 1:1 --qpfile GENERATED_QP_FILE --non-deterministic --range tv --stats "/Users/selur/tmp/test_new.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-depth 8 --output NUL -

x264 --preset veryfast --pass 2 --bitrate 1500 --profile high --level 5.1 --ref 3 --direct auto --b-adapt 0 --sync-lookahead 11 --qcomp 0.50 --rc-lookahead 40 --qpmax 51 --partitions i4x4,p8x8,b8x8 --no-fast-pskip --subme 5 --aq-mode 0 --vbv-maxrate 300000 --vbv-bufsize 300000 --sar 1:1 --qpfile GENERATED_QP_FILE --non-deterministic --range tv --colormatrix smpte170m --stats "/Users/selur/tmp/test_new.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-depth 8 --output "/Users/selur/tmp/test_new.264" -
with minimize off:
x264 --pass 1 --bitrate 1500 --profile high --level 5.1 --ref 1 --keyint 250 --min-keyint 0 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 0 --sync-lookahead 11 --cplxblur 20.0 --qcomp 0.50 --qblur 0.50 --mbtree --rc-lookahead 40 --ipratio 1.40 --pbratio 1.30 --chroma-qp-offset 0 --qpmin 0 --qpmax 51 --qpstep 4 --partitions none --no-8x8dct --8x8dct --me dia --mvrange -1 --subme 2 --cabac --trellis 0 --weightp 1 --aq-mode 0 --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --stats "/Users/selur/tmp/test_new.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-csp i420 --output-depth 8 --output NUL -

x264 --pass 2 --bitrate 1500 --profile high --level 5.1 --ref 3 --keyint 250 --min-keyint 0 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct auto --b-adapt 0 --sync-lookahead 11 --cplxblur 20.0 --qcomp 0.50 --qblur 0.50 --mbtree --rc-lookahead 40 --ipratio 1.40 --pbratio 1.30 --chroma-qp-offset 0 --qpmin 0 --qpmax 51 --qpstep 4 --partitions i4x4,p8x8,b8x8 --8x8dct --no-fast-pskip --me hex --merange 16 --mvrange -1 --subme 5 --cabac --trellis 0 --weightp 1 --aq-mode 0 --vbv-maxrate 300000 --vbv-bufsize 300000 --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads auto --sar 1:1 --qpfile GENERATED_QP_FILE --deblock 0:0 --non-deterministic --range tv --colormatrix smpte170m --stats "/Users/selur/tmp/test_new.stats" --demuxer raw --input-res 640x352 --input-csp i420 --input-range tv --input-depth 8 --fps 25/1 --output-csp i420 --output-depth 8 --output "/Users/selur/tmp/test_new.264" -
=> I see the problem:
'veryfast':
- veryfast:
                                    --no-mixed-refs --rc-lookahead 10
                                    --ref 1 --subme 2 --trellis 0 --weightp 1
disables, the mixed-refs, and there is no option to enable it which Hybrid could use.

=> will fix tomorrow evening.
I will adjust Hybrid to not minimize to 'veryfast','superfast','ultrafast' unless '--no-mixed-refs' is enabled tomorrow.

Cu Selur


RE: x264 mixed_ref=0 issue - Lipomo - 09.12.2024

Cool, perfect Smile


RE: x264 mixed_ref=0 issue - Selur - 10.12.2024

Uploaded a new dev, which should fix the problem, before going to work.

Cu Selur


RE: x264 mixed_ref=0 issue - Lipomo - 12.12.2024

It's fixed, I can't reproduce the problem. Whether I encode with minimized command line or no, mixed_ref is enabled.