-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add fixes for a vaapi-qsv mapping error
- Loading branch information
1 parent
c3da15c
commit f842df1
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
debian/patches/0030-add-fixes-for-a-vaapi-qsv-mapping-error.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Index: jellyfin-ffmpeg/libavcodec/qsvenc_hevc.c | ||
=================================================================== | ||
--- jellyfin-ffmpeg.orig/libavcodec/qsvenc_hevc.c | ||
+++ jellyfin-ffmpeg/libavcodec/qsvenc_hevc.c | ||
@@ -260,9 +260,9 @@ static const AVClass class = { | ||
static const AVCodecDefault qsv_enc_defaults[] = { | ||
{ "b", "1M" }, | ||
{ "refs", "0" }, | ||
- // same as the x264 default | ||
+ // same as the x265 default | ||
{ "g", "248" }, | ||
- { "bf", "8" }, | ||
+ { "bf", "4" }, | ||
{ "qmin", "-1" }, | ||
{ "qmax", "-1" }, | ||
{ "trellis", "-1" }, | ||
Index: jellyfin-ffmpeg/libavcodec/vaapi_decode.c | ||
=================================================================== | ||
--- jellyfin-ffmpeg.orig/libavcodec/vaapi_decode.c | ||
+++ jellyfin-ffmpeg/libavcodec/vaapi_decode.c | ||
@@ -572,22 +572,24 @@ static int vaapi_decode_make_config(AVCo | ||
if (err < 0) | ||
goto fail; | ||
|
||
- frames->initial_pool_size = 1; | ||
- // Add per-codec number of surfaces used for storing reference frames. | ||
- switch (avctx->codec_id) { | ||
- case AV_CODEC_ID_H264: | ||
- case AV_CODEC_ID_HEVC: | ||
- frames->initial_pool_size += 16; | ||
- break; | ||
- case AV_CODEC_ID_VP9: | ||
- case AV_CODEC_ID_AV1: | ||
- frames->initial_pool_size += 8; | ||
- break; | ||
- case AV_CODEC_ID_VP8: | ||
- frames->initial_pool_size += 3; | ||
- break; | ||
- default: | ||
- frames->initial_pool_size += 2; | ||
+ if (!frames->initial_pool_size) { | ||
+ frames->initial_pool_size = 1; | ||
+ // Add per-codec number of surfaces used for storing reference frames. | ||
+ switch (avctx->codec_id) { | ||
+ case AV_CODEC_ID_H264: | ||
+ case AV_CODEC_ID_HEVC: | ||
+ frames->initial_pool_size += 16; | ||
+ break; | ||
+ case AV_CODEC_ID_VP9: | ||
+ case AV_CODEC_ID_AV1: | ||
+ frames->initial_pool_size += 8; | ||
+ break; | ||
+ case AV_CODEC_ID_VP8: | ||
+ frames->initial_pool_size += 3; | ||
+ break; | ||
+ default: | ||
+ frames->initial_pool_size += 2; | ||
+ } | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters