Lynne
f3795e1857
APIchanges: add AVHWAccel changes and bump lavc minor
2023-05-29 00:42:03 +02:00
Lynne
f701f088f4
vulkan_h264: reject end_frame being called without valid session parameters
...
When seeking through MBAFF-coded H264, this can happen. Decoding calls end_frame
without calling start_frame. We are unable to decode this, as no frame
state has been set.
Happens for both VAAPI and Vulkan. Could be an issue elsewhere, hence
the individual commit.
2023-05-29 00:42:01 +02:00
Lynne
77478f6793
av1dec: add Vulkan hwaccel
2023-05-29 00:42:00 +02:00
Lynne
6ec58ff820
cbs_av1: expose tile col/row starts in SBs
2023-05-29 00:41:59 +02:00
Dave Airlie
e49b8b48cd
av1: set skip mode frames properly
...
There are circumstances where the flag isn't set but the skip mode
frames are. So don't use the inferred bit which has other inputs
when deciding to pass the skip mode frames to the device.
This fixes some decoding bugs on intel av1
2023-05-29 00:41:58 +02:00
Lynne
36c16a06b2
hevcdec: add Vulkan hwaccel
...
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne
a9fbe8b472
h264dec: add Vulkan hwaccel
...
Thanks to Dave Airlie for figuring out a lot of the parameters.
2023-05-29 00:41:58 +02:00
Lynne
1e8fefff93
libavcodec: add Vulkan common video decoding code
2023-05-29 00:41:57 +02:00
Lynne
023ae6103f
libavcodec: add Vulkan common video code
2023-05-29 00:41:57 +02:00
Lynne
6733a1a456
avcodec: add AVHWAccel.flush callback
2023-05-29 00:41:57 +02:00
Lynne
be07145109
avcodec: add AVHWAccel.free_frame_priv callback
2023-05-29 00:41:56 +02:00
Lynne
21719c29a2
hevc_ps: expose sps_extension_present_flag
2023-05-29 00:41:35 +02:00
Lynne
8b2d46ee3d
hevc_ps: expose conformance_window_flag
2023-05-29 00:41:34 +02:00
Lynne
cc5fab5c48
hevc_ps: expose sublayer_ordering_info_flag
2023-05-29 00:41:34 +02:00
Lynne
32fcb17e42
hevc_ps: expose vui_present flag
2023-05-29 00:41:33 +02:00
Lynne
f58db8e534
hevc_ps: expose rps fields
2023-05-29 00:41:33 +02:00
Lynne
abdd87d44e
hevc_ps: expose log2_diff_max_min_transform_block_size
2023-05-29 00:41:33 +02:00
Lynne
6eaca2abd8
hevcdec: expose bits_used_for_short_term_rps
2023-05-29 00:41:32 +02:00
Lynne
4e1f3ab184
hevc_ps: expose pps_extension_present_flag
2023-05-29 00:41:32 +02:00
Lynne
d0b02c3aff
hevc_ps: expose vps_id
2023-05-29 00:41:31 +02:00
Lynne
3bc866159c
hevc_ps: expose pps_id
2023-05-29 00:41:31 +02:00
Lynne
fc429d785e
hevc_ps: expose SPS and VPS headers
2023-05-29 00:41:31 +02:00
Lynne
20de09a6de
h264_ps: expose scaling_matrix_present_mask
...
Vulkan requires it.
It technically also requires use_default_scaling_matrix_mask,
but we can just be explicit and give it the matrix we fill in as-non
default.
2023-05-29 00:41:30 +02:00
Lynne
d13b1c42f6
h264_ps: expose bit rate and CPB size fields
2023-05-29 00:41:30 +02:00
Lynne
de6fce727c
h264_ps: expose max_dec_frame_buffering
2023-05-29 00:41:30 +02:00
Lynne
1f66e3347d
h264_ps: comment pic_order_present better
...
The official name which CBS uses is bottom_field_pic_order_in_frame_present_flag.
2023-05-29 00:41:29 +02:00
Lynne
6718b37e5d
h264_ps: set pic_scaling_matrix_present_flag
2023-05-29 00:41:29 +02:00
Lynne
02f38af2dd
h264_ps: expose pps_id
2023-05-29 00:41:29 +02:00
Lynne
317fa3bd1d
h2645_vui: expose aspect_ratio_info_present_flag
2023-05-29 00:41:28 +02:00
Lynne
dc2694557d
h2645_vui: expose aspect_ratio_idc
2023-05-29 00:41:28 +02:00
Lynne
b6a6e2b19d
lavc/decode: allow to allocate hwaccel_priv_data early
2023-05-29 00:41:27 +02:00
Anton Khirnov
8b23644408
lavc/pthread_frame: add support for thread-safe hwaccels
2023-05-29 00:41:27 +02:00
Anton Khirnov
3d2e1aa324
lavc/decode: stop duplicating code from hwaccel_uninit()
2023-05-29 00:41:27 +02:00
Anton Khirnov
a4611e3170
lavc/decode: pass AVHWAccel instead of AVCodecHWConfigInternal to hwaccel_init()
...
The only thing besides the hwaccel that this function uses from
AVCodecHWConfigInternal is the pixel format, which should always match
the hwaccel one.
Will be useful in following commits.
2023-05-29 00:41:25 +02:00
yuanhecai
f6077cc666
avcodec/la: Add LSX optimization for h264 qpel.
...
./configure --disable-lasx
ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
before: 214fps
after: 274fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-25 21:05:01 +02:00
Lu Wang
8815a7719e
avcodec/la: Add LSX optimization for h264 chroma and intrapred.
...
./configure --disable-lasx
ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
before: 199fps
after: 214fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-25 21:04:56 +02:00
Hao Chen
7845b5ecd6
avcodec/la: Add LSX optimization for loop filter.
...
Replaced function(LSX is sufficient for these functions):
ff_h264_v_lpf_chroma_8_lasx
ff_h264_h_lpf_chroma_8_lasx
ff_h264_v_lpf_chroma_intra_8_lasx
ff_h264_h_lpf_chroma_intra_8_lasx
ff_weight_h264_pixels4_8_lasx
ff_biweight_h264_pixels4_8_lasx
./configure --disable-lasx
ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
before: 161fps
after: 199fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-25 21:04:43 +02:00
Shiyou Yin
e1b6ecd20a
avcodec/la: add LSX optimization for h264 idct.
...
loongson_asm.S is LoongArch asm optimization helper.
Add functions:
ff_h264_idct_add_8_lsx
ff_h264_idct8_add_8_lsx
ff_h264_idct_dc_add_8_lsx
ff_h264_idct8_dc_add_8_lsx
ff_h264_idct_add16_8_lsx
ff_h264_idct8_add4_8_lsx
ff_h264_idct_add8_8_lsx
ff_h264_idct_add8_422_8_lsx
ff_h264_idct_add16_intra_8_lsx
ff_h264_luma_dc_dequant_idct_8_lsx
Replaced function(LSX is sufficient for these functions):
ff_h264_idct_add_lasx
ff_h264_idct4x4_addblk_dc_lasx
ff_h264_idct_add16_lasx
ff_h264_idct8_add4_lasx
ff_h264_idct_add8_lasx
ff_h264_idct_add8_422_lasx
ff_h264_idct_add16_intra_lasx
ff_h264_deq_idct_luma_dc_lasx
Renamed functions:
ff_h264_idct8_addblk_lasx ==> ff_h264_idct8_add_8_lasx
ff_h264_idct8_dc_addblk_lasx ==> ff_h264_idct8_dc_add_8_lasx
./configure --disable-lasx
ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -y /dev/null -an
before: 155fps
after: 161fps
Reviewed-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-25 21:04:25 +02:00
Paul B Mahol
c6b6356635
avformat/gifdec: switch to using gif parser
...
Update fate test, more correct as last packet is not truncated.
2023-05-25 19:51:56 +02:00
James Almer
97f4263457
avcodec/av1dec: convert to receive_frame()
...
This removes the overhead of inserting the av1_frame_split bsf as part of the
decoding process.
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-25 11:21:35 -03:00
Haihao Xiang
8e2547ebb2
lavc/qsvenc: the height is aligned to 32 for AV1
...
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-05-25 09:04:13 +08:00
Haihao Xiang
943a42fc54
lavc/qsvenc: make sure continuous allocation
...
Intel MediaSDK and oneVPL expect continuous allocation for data[i],
however there are mandatory padding bytes between data[i] and data[i+1].
when calling av_frame_get_buffer. This patch removes all extra padding
bytes.
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-05-25 09:04:13 +08:00
Haihao Xiang
cf79dab8df
lavc/qsvenc: avoid data copy if possible
...
The data copy is unnecessary for packed formats when frame width and
height are aligned
For example:
$ ffmpeg -f lavfi -i testsrc=size=1920x1088 -vf "format=yuyv422" -c:v hevc_qsv -f null -
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-05-25 09:04:13 +08:00
Haihao Xiang
cfdfd6aa72
lavc/qsvenc: use the right alignment instead of hard coded value
...
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-05-25 09:04:13 +08:00
Haihao Xiang
2b0fe52967
lavc/qsv: fallback to the default mfx implementation for internal session on Windows
...
The mfx implementation based on D3D11 is expected for an internal
session on Windows, however sometimes this implemntation is not
supported [1]. A fallback to the default mfx implementation is added in
this patch.
[1] https://github.com/intel/cartwheel-ffmpeg/issues/246
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-05-25 09:04:13 +08:00
James Almer
f209614290
avcodec/libdav1d: only return EAGAIN when there are no buffered packets
...
Fixes decoding packets containing split temporal units, as generated for example
by the av1_frame_split bsf.
Signed-off-by: James Almer <jamrial@gmail.com>
2023-05-22 16:19:10 -03:00
Michael Niedermayer
43e5e2e423
avcodec/bonk: Avoid undefined integer overflow in predictor_calc_error()
...
Fixes: signed integer overflow: -159584 * 5105950 cannot be represented in type 'int'
Fixes: 55165/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-5796023719297024
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-05-22 02:49:59 +02:00
Paul B Mahol
d912ff19c5
avcodec/fitsenc: mark output packets as keyframes
2023-05-21 20:51:55 +02:00
Paul B Mahol
4d4aed2815
avcodec/fitsdec: fix decoder class category
2023-05-21 20:31:46 +02:00
Paul B Mahol
fcabfcbf6f
avcodec/wavpackenc: unbreak encoding 8bit pcm
...
Otherwise the reference decoder reports crc errors.
2023-05-21 11:30:12 +02:00