| 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!
|
| |
|
|
|
|
| |
muxavformat: add logic to compare avio error message, and add description of the
error if the output destination file cannot be written or accessed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
Fixes #3200.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
An empty string was getting set for the mkv lang code.
Need to test that the string is not NULL **and** not empty.
Affects Hebrew, Indonesian, Javanese, and Yiddish.
Fixes https://github.com/HandBrake/HandBrake/issues/2903
|
| |
|
| |
|
|
|
|
| |
Remove trailing whitespace in "*.c", "*.m", "*.h" and "*.cpp" files.
|
|
|
|
| |
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
|
|
|
|
| |
not sure how/why I committed somethng I didn't even compile :-\
|
| |
|
|
|
|
| |
ffmpeg changed the name of the metadata key at some point
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Fix some typos
|
|
|
| |
Note that since webm has no official subtitle support, only burned in subtitles can be used with this muxer at this time.
|
|
|
|
| |
Fixes https://github.com/HandBrake/HandBrake/issues/1802
|
|
|
|
|
| |
We were only applying SSA inline override tags. With this patch we now
parse SSA style descritions in the SSA header and apply them per event.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The extradata handling hasn't changed since 0.7 when we only used
encavcodec for mpeg4 encoding. It was not designed to handle the
additional codecs we are encoding now.
|
|
|
|
|
|
| |
Adding the Nvidia NVEnc H.264 and H.265 encoders.
Based on Initial work by sgothel
--enable-nvenc is the new compile time configure option to enable for builds.
|
|
|
|
| |
Set samples per frame for audio tracks
|
|
|
|
|
|
| |
avformat_alloc_output_context2 does several things for us that we were
doing in separate steps. It also allocates AVFormatContext.url for us
so we do not have a case where we alloc something that ffmpeg frees.
|
|
|
|
|
|
| |
We allocate AVFormatContext.url, but libavformat frees it. So we must
use an allocation function that is compatible with the free function
used by libavformat.
|
|
|
|
|
|
| |
The new way is AVFormat.url. AVFormat.filename had lenght limitations
that url does not since it is allocated by the caller (and freed by
libavformat).
|
|
|
|
|
|
| |
ffmpeg expect SSA packets in matroska format.
Fixes https://github.com/HandBrake/HandBrake/issues/1379
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Patch 1/2 for https://github.com/HandBrake/HandBrake/issues/974
moving to FFMPEG 3.4.1 from LIBAV 12.2.
The re-ordering of to be linked modules was required to solve
statically linked dependencies. See libhb/module.defs etc.
|
| |
|
|
|
| |
there is a redundant 'the the' in this string, please advise
|
| |
|
|
|
|
|
| |
* add sdtp (sample dependency) box to mp4
The AppleTV 4K requires this box in order to play 2160p60 video.
|
|
|
|
|
|
|
| |
"Adaptive streaming" allows changing video parameters mid-stream at IDR
boundaries. Such changes require new SPS and PPS NALs at the IDR. MP4
supports this with 'avc3' and 'hev1' sample entry types.
|
|
|
| |
Fixes https://forum.handbrake.fr/viewtopic.php?f=5&t=37034
|
|
|
|
| |
Fixes https://github.com/HandBrake/HandBrake/issues/815
|
|
|
| |
This provides compatibility with apple software
|
| |
|
|
|
|
|
|
|
| |
initial_padding is used to inform libav muxers of initial encoder delay
duration. When set for mkv it can be used to remove the silence samples
during playback since the delay value gets stored in the mkv CodecDelay
element.
|