Superseded by SSE4. This makes the huffyuv decoders ABI compliant,
e.g. nothing messes up the FPU state at all any more. Therefore
the emms_c() can be removed from huffyuvdec.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Heavily based upon the existing mmxext function, but
it allows to use p{max,min}uw, so also supports 16bpp
pixel formats. It is also faster:
add_hfyu_median_pred_int16_c: 14368.1
add_hfyu_median_pred_int16_mmxext: 7384.2 ( 1.94x)
add_hfyu_median_pred_int16_sse4: 6474.4 ( 2.21x)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Both source and dst are always properly aligned (to stride align)
here; also document this fact.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The current logic would stop demuxing the entire manifest once the first Representation
returned EOF, which could result in plenty of packets from other Representations being
lost.
Signed-off-by: James Almer <jamrial@gmail.com>
Based on a patch by Michael Niedermayer
Fixes: unbounded allocation
Fixes: poc_output_mix_config_dos.iamf
Fixes: 387qWpjUgeKH
Found-by: Duong Tran Thai (CyStack)
Signed-off-by: James Almer <jamrial@gmail.com>
Up until now ff_vc1_v_loop_filter4_ssse3 used MMX registers
despite being an SSSE3 function. Porting it to XMM registers
didn't lead to any change in benchmarks here, but abides
by the ABI (one function less that does not omit emms).
Unfortunately the size of the function increased by 64B
by this.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Using XMM registers in this SSSE3 function leads to fewer shuffles
when transposing the input; it also allows to combine calculating
a1 and a2. Because of this, codesize is the same as before (on Unix64)
although MMX instructions are shorter.
Old benchmarks:
vc1dsp.vc1_h_loop_filter4_bestcase_c: 3.0
vc1dsp.vc1_h_loop_filter4_bestcase_ssse3: 32.0 ( 0.09x)
vc1dsp.vc1_h_loop_filter4_worstcase_c: 42.9
vc1dsp.vc1_h_loop_filter4_worstcase_ssse3: 31.9 ( 1.35x)
New benchmarks:
vc1dsp.vc1_h_loop_filter4_bestcase_c: 3.0
vc1dsp.vc1_h_loop_filter4_bestcase_ssse3: 29.9 ( 0.10x)
vc1dsp.vc1_h_loop_filter4_worstcase_c: 43.7
vc1dsp.vc1_h_loop_filter4_worstcase_ssse3: 29.9 ( 1.46x)
Hint: checkasm's benchmark always uses the same buffer that is
partially updated by the horizontal loop filter function (the
middle two of eight columns are updated using word-sized stores).
They therefore lead to store-to-load-forwarding failure. If
checkasm_alternate were used to alternate between two buffers,
the benchmarks would be as follows:
Old benchmarks:
vc1dsp.vc1_h_loop_filter4_bestcase_c: 3.0
vc1dsp.vc1_h_loop_filter4_bestcase_ssse3: 16.4 ( 0.18x)
vc1dsp.vc1_h_loop_filter4_worstcase_c: 23.9
vc1dsp.vc1_h_loop_filter4_worstcase_ssse3: 16.3 ( 1.47x)
New benchmarks:
vc1dsp.vc1_h_loop_filter4_bestcase_c: 3.0
vc1dsp.vc1_h_loop_filter4_bestcase_ssse3: 15.1 ( 0.20x)
vc1dsp.vc1_h_loop_filter4_worstcase_c: 23.6
vc1dsp.vc1_h_loop_filter4_worstcase_ssse3: 15.2 ( 1.55x)
Notice that at some callsites, the partially modified buffer
is immediately reloaded again*, so that both scenarios can happen.
*: See the TT_4X4 and TT_4X8 cases at the end of vc1_p_h_loop_filter()
or vc1_b_h_intfi_loop_filter() or the luma field blocks in
vc1_p_h_intfr_loop_filter().
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
In particular, apply the rounding before adding the result
of the multiplication. No change in performance here.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Reuse the register that held pq for this instead of using
another one. This saves a push+pop on 32bit systems and avoids
REX prefixes on Unix64.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Multipliying a GPR by 0x01010101 splats a byte to a dword;
the intention was to avoid vector shuffles lateron, yet
this is not true because the byte splat necessitates
a byte->word conversion lateron.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Due to the earlier "if (a1 < a0 || a2 < a0)" check
it is guaranteed that min(a1,a2) is < a0, allowing
simplifications.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
vf_dnn_processing.c and vf_dnn_detect.c both declare an uninitialized
DNNData model_input before using it. This commit initialize it.
Signed-off-by: younengxiao <steven.xiao@amd.com>
Add a new muxer option mpegts_pcr_pid that generates PCR on a dedicated
adaptation-field-only PID, separate from any elementary stream.
ISDB-T 1seg receivers require PCR on a standalone PID. When PCR shares
the video PID, these receivers acquire the service but refuse to decode
video and audio. This is standard practice in Japanese digital
terrestrial broadcasting per ARIB TR-B14.
When mpegts_pcr_pid is set to a valid PID value:
- PCR packets are generated as adaptation-field-only packets on the
specified PID at the interval set by pcr_period
- The video stream adaptation fields do not carry PCR flags
- The PMT PCR_PID field is set to the specified PID
When mpegts_pcr_pid is -1 (default): existing behavior is unchanged.
The existing mpegts_insert_pcr_only function is refactored into a
parameterized mpegts_insert_pcr_only_pid(s, pid, cc, discontinuity)
to avoid code duplication.
Fixes: https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/23649
Signed-off-by: shadowcaster3 <vasyl.samoilov@gmail.com>
Use m aliases instead of xmm registers directly so that certain macros
can work (e.g. SWAP); likewise replace movdqa with mova
Signed-off-by: Zuxy Meng <zuxy.meng@gmail.com>
RTSP redirects retain URL credentials and authentication state when a
Location URI changes to another origin. This can forward reusable
credentials to a server with a different scheme, host, or port.
Clear the stored credentials and authentication state when the redirect
crosses an origin boundary. Preserve them for same-origin redirects.
Fixes: cross-origin credential disclosure
Fixes: rtsp_redirect_auth_leak_poc.py
Fixes: VaKaPOnfN02z
We only need the shuffle a byte in the lower quadword;
also notice that we don't need the clamping provided
by packuswb as these values are averages of byte values.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Avoids saving and restoring volatile xmm registers on Windows;
no change in benchmarks here (on Unix64).
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The pred{8x8,16x16}_plane functions only use five xmm register.
The inflated number of seven (which leads to saving and restoring
xmm6 on Win64) has been introduced in
d20f133ef9, probably because
the mmx version of these functions used seven mmx register.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
The output stream no longer has Atmos metadata, so the
AV_PROFILE_TRUEHD_ATMOS profile, if it was set, is no longer valid.
Fixes issue #23195.
Signed-off-by: James Almer <jamrial@gmail.com>
The output stream no longer has Atmos metadata, so the
AV_PROFILE_EAC3_DDP_ATMOS profile, if it was set, is no longer valid.
Signed-off-by: James Almer <jamrial@gmail.com>
WebM VP8/VP9 alpha is a second bitstream attached via a Matroska
BlockAdditional element (BlockAddID 1). Only the libvpx wrapper
decoders merge it into the output frame; the native vp8/vp9 decoders
have no code path for it and silently return an opaque frame.
Warn once per decoder instance instead of failing silently, pointing
at the decoder that does support it. The av_log_once() state is
synchronized across frame-thread contexts to avoid duplicate warnings
with frame threading.
Reported in https://trac.ffmpeg.org/ticket/11165 and
https://github.com/renpy/renpy/issues/1402.
Signed-off-by: wangnov <wangnov6@gmail.com>