Closed Xaymar closed 7 years ago
After some digging into the history, i found out that the OVE headers perfectly match what AMF logs to the trace, which means that the OpenVideo Encoder parameters still exist but stopped being exposed for some odd reason. I don't know what reasoning would have led to that choice.
Apparently OVE had both a "full" AVC encoding mode and an entry only encoding mode. According to wikipedia on VCE, the entropy-only mode is part of AMF App SDK but I could not find it there.
This actually has two values, 1 being NV12 (AMF default) and 2 being YV12 (flipped NV12). Not necessarily needed to be exposed, or maybe already is.
Exposed by AMF.
Allowed to choose between Normal and Low Latency encoding, which i believe i exposed through Usage now - except with the downside that Usage Low Latency breaks streaming while requestedPriority Low Latency did not.
Exposed by AMF.
GOP Size that was removed for creating "too complex logic", whatever that means. Technically implemented by anything that forced I-Frames at specific intervals. x264 implements dynamically (I-Frames inserted at scenecuts and large changes that P/B-Frames can't easily cover), nvenc does the same.
Bit 0 is what FrameSkipping is now, bits 1-31 have no known meaning. Partially exposed?
Exposed by AMF.
Exposed but not documented or explained how these work. Best guess so far resulting in drastic quality flickering or outright just black frames.
Forces the use of constrained intra prediction when set to 1.
"cabac_init_id", three possible values (0, 1, 2). No information about what each one does or how it works.
"Loop filter control, slice_beta_offset (N.B. only used if deblocking filter is not disabled, and there is no div2 as defined in the h264 bitstream syntax)"
"Loop filter control, slice_alpha_c0_offset (N.B. only used if deblocking filter is not disabled, and there is no div2 as defined in the h264 bitstream syntax)"
The before mentioned I-Picture Period that can control GOP Size, which can also be manually implemented by forcing individual frame picture types.
"1 serves to load intra refresh bitmap from address force_intra_refresh_bitmap_mc_addr when equal to 1, 3 also loads dirty clean bitmap on top of the intra refresh". Seems to be useless?
Spacing between Intra-Refresh Macroblocks, shifts intra-refreshed mbs by set value if encForceIntraRefresh is 2.
Insert VUI params in SPS, iirc exposed.
Apparently used to control what contents the SEI message had. Exact effects unknown. Bits 1,2,3 were always set in any OVE using application.
Slicing mode, 1 or 2 as options. Already exposed, but not documented enough. Earlier testing kinda revealed 1=Row, 2=Column, at least it seemed to behave like that.
Parameter for the above. "either number of bytes per slice or number of MBs per slice"
Exposed by AMF.
Luma Search Window in Macroblocks as a Vector, OVE had either 5x3, 9x5 or 13x7 as options. lsmVert was the actual property and lsmVert5, lsmVert3 & lsmVert1 were used to further control it. lsmVert5, lsmVert3, lsmVert1 seemed to have vanished in later OVE versions.
Limitation for "Forward Prediction" Motion Vector range for performance. Definitely should be exposed.
Limitation for forward prediction of 2nd Motion Vector range for performance. Also should be exposed.
Apparently used by B-Frames only, limits 16x16 block sizes on first frame after I-Frame?
Disables SATD (sum absolute transform distortion) cost calculation, switching to SAD (sum of absolute differences) cost only. Potentially useful to be exposed.
"FME advanced mode decision".
"Sub-sample Search window", potentially improves per-pixel movement detection.
Disables some internal ME features, comment only says "FME".
Enable overwriting of fme_disable_submode (encDisableSubMode) in IME with enable mode number, equal to ime_overw_dis_subm_no (only 8x8 and above could be enabled). Don't see any immediate uses for this.
Numbers of mode IME will pick if en_ime_overw_dis_subm (encEnImeOverwDisSubm) is equal to 1.
IME additional search window size, X limit 1-4, Y limit none. Limit is +- from center point.
Disable prediction modes for I/P Frames,
zero_residues_luma. Useful for lossless perhaps?
zero_residues_chroma. Useful for lossless perhaps?
Something of note is that i also found what Quality Presets did back in OVE days, the new ones are only minimally different:
OpenVideo (Decoder and Encoder) APIs are retired and removed from the driver. The fact that internal parameters visible in AMF logging have the same names as parameters in old headers means a little. AMF public parameters is what Codec team approved for safe usage with modern drivers. If a particular feature from OVE is missing in AMF and is really useful I can put a request to expose it and the codec team will consider the request.
Well then this is the official request for the following parameters to be able to fine-tune Quality Presets to the end hardware of the actual users. I'd like to see the following exposed directly in the future:
If possible, it would also be nice to be able to tell VCE/HEVC encoding one or two regions of interest in order to improve encoding efficiency. HEVC encoding (when software is used) allows specifying this and it helps in bitrate constrained situations where the user knows what areas are important to the viewers.
Closing as I've been told a straight up no to this, even if it would benefit performance and quality.
has something changed now in 2021? NVenc is going further ahead and AMD AMFenc needs improvement...
As an ex-user of the OpenVideo Encoder based OBS Classic fork, I can't help but wonder what happened to all the options - are they no longer available? Additionally, would it be possible to expose more parameters to developers?
OpenVideo Encoder had:
Additionally the following are logged to AMF Trace but not exposed or changable:
A lot of these map to the original OpenVideo Encoder settings, why have they been omitted from Media SDK and Advanced Media Framework SDK? Can and will they be exposed again?