Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: May 2005
Posts: 1,453
|
Lossless with "-QP 0"?
Speaking of lossless, how lossless is encoding with "-QP 0" (x264) really?
I have a project that requires several passes, with lossless intermediate steps. Will "-QP 0" do it? Thanks.
__________________
Gorgeous, delicious, deculture! |
![]() |
![]() |
![]() |
#2 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,239
|
--qp 0 is entirely lossless, if you also ensure it uses the same pixel format (ie. chroma is not being resampled, or anything like that)
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
![]() |
![]() |
![]() |
#3 | Link | |
Registered User
Join Date: May 2005
Posts: 1,453
|
Quote:
![]()
__________________
Gorgeous, delicious, deculture! |
|
![]() |
![]() |
![]() |
#5 | Link | |
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,230
|
Quote:
Those don't apply to lossless encoding, for obvious reasons.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ |
|
![]() |
![]() |
![]() |
#6 | Link | |
Registered User
Join Date: Oct 2007
Posts: 47
|
Quote:
The same goes for --trellis, and --deadzone-intra - I guess lossless uses a different quantization algorithm to both trellis and deadzone (either that or it locks off these parameters). Options like --subme and --me do change the output size though, so these are not locked off in lossless. And --subme 7 results in a lower file size than --subme 5 implying that normal non-psy RDO is still active in lossless. In lossless there is not very much different in output size as long as you don't go below --preset fast (eg, medium, slow, slower don't offer much benefit). And lossless is significantly slower than non-lossless even with all else equal, eg lossless with --preset fast is much slower than --preset fast is normally. I could have done this testing myself instead of asking you, sorry! Last edited by F J Walter; 10th September 2014 at 02:48. |
|
![]() |
![]() |
![]() |
#7 | Link |
ангел смерти
![]() Join Date: Nov 2004
Location: Lost
Posts: 9,565
|
Any options that trade-off different artifacts (like AQ & psy prefer more noise instead of more blur, trellis and deadzone also affect the blur vs noise) don't matter when there's no blur or noise. I'm pretty sure they're ignored in lossless, but the result would be the same if they weren't.
|
![]() |
![]() |
![]() |
#8 | Link |
x264 author
Join Date: Jul 2014
Posts: 6
|
From encoder.c:
Code:
if( b_open && (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF) && h->param.rc.i_qp_constant == 0 ) { h->mb.b_lossless = 1; h->param.i_cqm_preset = X264_CQM_FLAT; h->param.psz_cqm_file = NULL; h->param.rc.i_rc_method = X264_RC_CQP; h->param.rc.f_ip_factor = 1; h->param.rc.f_pb_factor = 1; h->param.analyse.b_psnr = 0; h->param.analyse.b_ssim = 0; h->param.analyse.i_chroma_qp_offset = 0; h->param.analyse.i_trellis = 0; h->param.analyse.b_fast_pskip = 0; h->param.analyse.i_noise_reduction = 0; h->param.analyse.b_psy = 0; h->param.i_bframe = 0; /* 8x8dct is not useful without RD in CAVLC lossless */ if( !h->param.b_cabac && h->param.analyse.i_subpel_refine < 6 ) h->param.analyse.b_transform_8x8 = 0; h->param.analyse.inter &= ~X264_ANALYSE_I8x8; h->param.analyse.intra &= ~X264_ANALYSE_I8x8; } |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|