| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
edit.
|
|
|
|
| |
Windows (mingw-w64) only for now.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works fine for e.g. the Qualcomm H264 and HEVC encoders on
ARM64 windows devices, and should work the same for other vendors
HW encoders on X86 devices (even though those encoders usually are
available via vendor specific APIs as well, and this patch is currently
only tested and tuned for Qualcomm).
There's no detection for whether the MediaFoundation wrapper is going
to provide a working encoder for either format (it currently forcibly
tries to use a HW encoder and fails if there isn't a matchine one,
or if it doesn't accept the parameters that have been set).
|
| |
|
| |
|
|
|
|
| |
the begin of the pipeline. Fix a typo in the preset key that prevented it from working.
|
|
|
|
| |
struct changes.
|
|
|
|
| |
colorspace filter in the cli
|
| |
|
| |
|
| |
|
|
|
|
| |
decode video to 10bit or 12bit yuv if there is no 8bit filter in the chain.
|
| |
|
|
|
|
| |
encoding mode when available.
|
| |
|
| |
|
|
|
|
|
| |
If dither is "auto", only enable dither if source depth > dest depth
Lossy codecs do not have a fixed bit depth, so we treat them as >= 24
|
|
|
|
|
| |
DVD and BD do not have PAR specified at container level. Since the
title is initialized with PAR 1:1, the warning was triggered.
|
| |
|
| |
|
|
|
|
| |
passthrough will hopefully come later ;)
|
|
|
|
| |
Currently using it for pgs, srt, and ssa subtitles.
|
| |
|
|
|
|
| |
hb_buffer_t conflicts with a harfbuzz typedef by the same name
|
|
|
|
|
|
|
| |
Newest versions appear to have a "common.h" somewhere that is
interfering with libhb/common.h.
move headers into "handbrake" subdirectory
|
|
|
|
| |
Rename hb.h to handbrake.h
|
|
|
|
| |
Empty subtitle name could result in double free
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Works similar to audio track names.
If source has a subtitle track name, hb_subtitle_t.name is set.
To set output subtitle track name, set hb_subtitle_config_t.name.
Source track names are available in title returned by hb_title_to_dict
and hb_title_to_json in SubtitleList[].Name
In job dict it is also SubtitleList[].Name
hb_preset_job_init and hb_preset_job_init_json initialize output tracks
with the source track name.
Also adds subtitle name support to LinGui
|
|
|
|
| |
fixes a memory leak makes name const
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It gets stored in new hb_audio_config_t.in.name field.
It is available in the title dict read through hb_title_to_dict() or
hb_title_to_json() in AudioList[].Name.
When a job is initialized with hb_preset_job_init or
hb_preset_job_init_json(), output audio tracks are initialized with the
source track name.
Also adds output track name initialization to LinGui.
|
|
|
| |
Fix some typos
|
|
|
|
|
|
|
| |
The subtitle ID assigned to CC embedded in video collided with regular
track IDs in some file types.
Fixes https://github.com/HandBrake/HandBrake/issues/2103
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Reserve VideoColorMatrixCode for doing color conversion.
VideoColorMatrixCodeOverride sets color flags without transforming video
frame colors.
|
| |
|
|
|
|
|
|
|
|
|
| |
Propagates pix_fmt, range, primaries, transfer, and matrix everywhere.
Everything that passes or creates video frames tags the frames with
their color matrix info.
All filters know the expected color matrix info of input frames.
|
| |
|
|
|
| |
Note that since webm has no official subtitle support, only burned in subtitles can be used with this muxer at this time.
|