| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
w/ new master branch
First of all, big KUDOS to the Handbreak team to pull-in and maintain the libav -> ffmpeg transition
as well as the nvenc-encoder work load.
This new nvenc-encoder branch uses my settings for CQ (VBR) on NVENC,
while giving some references to the documentation.
I like the new init_qp* settings, good job.
What might be helpful here is to have 'bf' paramter for B frames to be set,
as well as NVENC specific parameters like AQ and LOOKAHEAD?
Here I use the recommended best values and 'bf=2', a compromise between low animation and sports.
Since LOOKAHEAD does a dynamic b-frame adaptation, this should be OK - if not great.
Below my comment section about my settings:
// NVEnc Performance see Chapter 4 of Video_Codec_SDK_8.0.14/doc/NVENC_Application_Note.pdf
// [email protected] usually uses the nvenc-h264 setting:
// - constant quality (cq) of 26-24, which enforces variable bitrate (vbr),
// - constant framerate (cfr) w/ framerate=source
// - preset=hq (high quality), profile=high, level=auto
//
// Resulting to av_opts:
// 'preset=hq,rc=vbr_hq,cq=26.00,init_qpP=26.00,init_qpB=28.00,init_qpI=24.00,bf=2,rc-lookahead=16,spatial-aq=1,forced-idr=1,profile=high'
//
// NVEnc:
// - GeForce GTX 950, has Compute SM 5.2
// - AQ enabled
// - Lookahead enabled: depth 16, scenecut enabled, B-adapt enabled.
//
// This achieves w/ HD 1080p source and even frame cropping in Handbreak around 160fps,
// matching the net expected of around 270fps less consumption via decoding and cropping.
|
| |
| |
| |
| | |
configure.py
|
| | |
|
| |
| |
| |
| | |
patch drops mingw.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
w/ AMD NAVI10), untested: h265, vp8 and vp9
Tested using lates mesa master branch patched with
- contrib/mesa/A00-gallium_vaapi_encpackedheader01-commit-5e10db6.patch
to enable Matroska and correct packed header in general using ffmpeg.
Test hardware and configuration:
- Mesa Gallium driver 20.2.0-devel for AMD Radeon RX 5700 XT (NAVI10, DRM 3.37.0, 5.7.0-1-amd64, LLVM 9.0.1)
Codev h264_vaapi, avcodec_open options: rc_mode=CQP,qp=24,b_depth=2,profile=100,level=40 (profile high, level 4.0)
HD1080 source ~45min with 212fps
PSNR and SSIM difference to x264 below 1%,
having x264 using profile high, level 4.0, preset fast, rc 23.
Both using constant-quality w/ variable bitrate.
++++
If FEATURE vaapi is enable (autodetected),
the following libraries are linked: X11 va va-drm va-x11.
- hb.c:
- Adding global static 'vaapi_device_ctx0' default device
initialized via hb_avcodec_init() and released via hb_avcodec_free().
The 'vaapi_device_ctx0' is used in vaa_common hb_avcodec_vaapi_set_hwframe_ctx(..).
- hb_avcodec_vaapi_set_hwframe_ctx() attaches the new AVHWFramesContext
to the AVCodecContext at initializing the encoder.
This is the final sink for the vaapi hw-encoder
and Encode(..) performs the frame conversion into it.
- hb_avcodec_test_encoder(..) adds VAAPI branch,
needs refinement
- encavcodec.c
- adding VAAPI branches, enabling available, needs refinement.
Currently profile and level are set to the user preferences,
additionally 'b_depth=2' is being passed.
- added hb_avcodec_test_encoder*(..) functions, currently only
used to check vaapi-*codec*-availability.
We used this codefragment regularly in an earlier HB version.
+++
Discussion:
Previous version of this patch of mine worked well on Intel hardware,
as described above - AMD NAVI10 also performs quite well.
VAAPI Workflow:
- It uses hardware frames on the target device, which are being transported
from the software device. The frame transport implicitly converts the pix_fmt.
- AVCodecContext's pix_fmt uses AV_PIX_FMT_VAAPI
- AVHWFramesContext: format uses AV_PIX_FMT_VAAPI and sw_format AV_PIX_FMT_NV12,
the latter hinting on the actual hw-frame's target format.
- AV_PIX_FMT_NV12 uses interleaved UV data, where AV_PIX_FMT_YUV420P uses
seperated planes. Both use a separated Y plane upfront.
Therefor both formats are not picture compatible, memory requirements are same.
- Encode(..) allocates a hw_frame and the source frame is being transported
to the hw-frame target using the pic_fmt conversion to NV12.
Finally the hw_frame is being sent 'avcodec_send_frame' and the code-path re-aligns
with non VAAPI.
Further fixes to do:
Validate whether 'b_depth=2' (b-frames) works for all vaapi implementations,
add custom extra-video-encoder field!
|
|
|
|
| |
options if global_verbosity_level >= 3
|
|
|
|
| |
get some decode support (not yet)
|
|
|
|
| |
some filters were producing psychedelic results
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
the jobs were started with the queue window closed.
|
| |
|
| |
|
|
|
|
| |
information to display the image in the proper colorspace.
|
| |
|
|
|
|
|
| |
How this was missed for so long, I don't know. I guess nobody ever used
anamorphic settings with rotate.
|
|
|
|
| |
avfilter does not gracefully handle invalid pad width or height
|
|
|
|
| |
Enables display of effects of filters on preview images
|
|
|
|
|
|
|
|
| |
New APIs hb_get_preview3 and JSON version hb_get_preview3_json to
retrieve a cached preview image and apply relevant filters from an
hb_job_t to the image.
Returned image also has PAR applied, i.e. PAR of image is 1:1
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
current preset as modified.
|
| |
|
|
|
|
| |
preview and preset support is not implemented yet.)
|
| |
|
|
|
|
|
|
|
| |
back to no hardware mode.
It was checking initSuccess which had not been set to true. Changed initSuccess to a local variable and changed to check globalInitialized instead.
Also properly set initNoHardware flag when we do auto fallback to no hardware mode.
|
|
|
|
| |
the Caliburn Micro upgrade.
|
| |
|
| |
|
| |
|
|
|
|
| |
Still not finished, but will soon, so add first initial support. I've confirmed with the localizer, that "Persian (Iran) (فارسی)" is correct.
|
| |
|
| |
|
|
|
|
| |
application will still run but certain features are unavailable or broken.
|
| |
|