| 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!
|
|
|
|
| |
some filters were producing psychedelic results
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
| |
Also silences a warning about nested pointer type qualifiers.
|
| |
|
| |
|
|
|
|
| |
Simplifies code, removes encvobsub.c (was never used) and decvobsub.c.
|
|
|
|
| |
simplifies code, eliminates deccc608sub.c
|
|
|
|
| |
Currently using it for pgs, srt, and ssa subtitles.
|
| |
|
|
|
|
| |
Remove trailing whitespace in "*.c", "*.m", "*.h" and "*.cpp" files.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
swscale looks at all 4 elements even when the format has less than 4
planes. Initialize all to previent spurious warning messages.
|
| |
|
| |
|
|
|
| |
Fix some typos
|
|
|
|
| |
Was getting logged when hardening was disabled
|
|
|
|
| |
and tweak the layout per BradleyS suggestions
|
|
|
|
|
|
| |
buffer overflow protection.
Prints the hardening status on global init to the log. Closes #2027. Was #2040.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Use this interface in decavcodec.
Remove cropscale.c and use avfilter for crop and scale.
Improve log output of filters that are aliases for avfilter.
|
|
|
|
|
| |
These messages only appear rarely, but they annoy.
It's complaining about an uninitialized unused plane
|
|
|
|
| |
control reaches end of non-void function
|
|
|
|
| |
encoder/decode init and check code. For users where drivers or other system issues prevent HandBrake from loading.
|
|
|
|
| |
previews are not being removed for a user. #1851
|
| |
|
|
|
|
| |
Extension of and closes #1422.
|
| |
|
|
|
|
|
|
|
|
|
| |
The sequence_id was only available for the WORKING state and not the
WORKDONE state. But frontends poll for status periodically and can miss
all status updates for the WORKING state if the file is very short or an
error occurs early during transcoding. When WORKING status is missed,
there was no way to know the sequence_id associated with the WORKDONE
status.
|
|
|
|
| |
Eliminates deprecation warnings for avresample
|
|
|
|
|
| |
Our handling of temporary directory paths could truncate resulting
filenames. This fixes the warnings and prevents possible truncation.
|
|
|
|
| |
...and avformat_register_all
|
|
|
|
| |
It's a NOP and does nothing in current code
|
|
|
|
|
|
|
| |
avcodec_close(..)
Hence rename hb_avcodec_close -> hb_avcodec_free_context and pass the required ptr-ptr.
avcodec_free_context(..) ensures releasing of all resources attached to the context.
|
|
|
| |
Found via `codespell -q 3 --skip="./gtk/po`
|
| |
|
| |
|
|
|
|
| |
Fixes https://github.com/HandBrake/HandBrake/issues/815
|
|
|
|
| |
It was only used for scaling, it fails far too often and is only
faster on a limited selectoin of hardware.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This wrapper can be used to frame parallelize simple video filters. By
simple, I mean there can be no temporal context that is shared from one
frame to the next.
Wrap unsharp and lapsharp filters. unsharp required a small rework to
separate out temporary storage that is required when processing each
frame. We now need to duplicate this storage for each thread.
Closes #759.
|
|
|
| |
Fixes https://forum.handbrake.fr/viewtopic.php?f=12&t=35583
|
|
|
|
| |
with valid inputs. #496
|
| |
|
| |
|