| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
The loop to skip the remaining bytes was off by one for all markers
except for Adob.
This patch uses post-decrement instead of pre-decrement in the while
loop to make the len value easier to understand, and updates the len
value to reflect this change for the Adob marker.
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes compilation with librsvg 2.50.3: error: viewport undeclared
This was a regression since commit
86ed68420d3b60439d0b7767c53d0fdc1deb7277.
Fixes #10722.
Reviewed-by: Leo Izen <[email protected]>
|
|
|
|
|
|
|
|
| |
Namely the part that creates a temporary LUT.
Reviewed-by: Zhao Zhili <[email protected]>
Reviewed-by: Lynne <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can be done by reusing the destination array to store
a temporary LUT (with only half the amount of elements, but
double the element size). This relies on certain assumptions
about sizes, but they are always fulfilled for systems supported
by us (sizeof(double) == 8 is needed/guaranteed since commit
3383a53e7d0abb9639c3ea3481f0eda9dca61a26). Furthermore,
sizeof(uint32_t) is always >= four because CHAR_BIT is eight
(in fact, sizeof(uint32_t) is four, because the exact width
types don't have any padding).
Reviewed-by: Zhao Zhili <[email protected]>
Reviewed-by: Lynne <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ff_cbrt_tableinit{,_fixed}() uses a LUT of doubles of the same size
as the actual LUT to be initialized (8192 elems). Said LUT is only
used to initialize another LUT, but because it is static, the dirty
memory (64KiB) is not released. It is also too large to be put on
the stack.
This commit mitigates this: We only use a LUT for the powers of
odd values, thereby halving its size. The generated LUT stays unchanged.
Reviewed-by: Zhao Zhili <[email protected]>
Reviewed-by: Lynne <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Each ff_cbrt_tableinit*() is called at most once, making this
check always-false.
Reviewed-by: Zhao Zhili <[email protected]>
Reviewed-by: Lynne <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
| |
av_hwframe_map() is documented to work with a blank dst frame, but
hwcontext_drm currently fails if dst->format == AV_PIX_FMT_NONE.
Signed-off-by: Cameron Gutman <[email protected]>
|
|
|
|
|
|
| |
See c2ce387385996c4e6824116931930b08cfcaecc9
Signed-off-by: Wu Jianhua <[email protected]>
|
|
|
|
| |
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
| |
Since 9d037c54f209958d47ac376d2a9561608f98dfae id3v2_extra_meta
can only be != NULL if the input format wants ID3v2 tags to be
read generically.
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag governs whether avformat_open_input() reads
ID3v2 tags generically; some demuxers without this flag
read these tags themselves in a non-generic way,
e.g. oma. This makes this flag an implementation detail
that should not be exposed to the user, i.e. an internal flag.
Given that 9d037c54f209958d47ac376d2a9561608f98dfae
did not bump version and added no APIchanges entry
I deemded it inappropriate to bump version or add
an APIchanges entry for the removal of AVFMT_FLAG_ID3V2_AUTO.
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following compiler error, if compiling with MSVC
for ARM (32 bit):
src/libswscale/ops_chain.c(48): error C2719: 'priv': formal parameter with requested alignment of 16 won't be aligned
This change shouldn't affect the performance of this operation
(which in itself probably isn't relevant); instead of copying the
contents of the SwsOpPriv struct from the stack as parameter,
it gets copied straight from the caller function's stack frame
instead.
Separately from this issue, MSVC 17.8 and 17.9 end up in an
internal compiler error when compiling libswscale/ops.c, but
older and newer versions do compile it successfully.
|
|
|
|
|
|
|
|
|
| |
ID3v2 headers are now only parsed for formats that explicitly support them,
avoiding premature data consumption that broke demuxing in other formats.
Introduces AVFMT_FLAG_ID3V2_AUTO and applies it to mp3, aac, tta, and wav.
Signed-off-by: nilfm <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
It makes no sense to ever call it that way given that
avio_context_free() accepts a pointer to a pointer to an AVIOContext.
Other double-pointer-free functions like av_freep() also do it
that way (and therefore avio_context_free(NULL) still crashes
even with 870cfed2317e311a71bc14773332486a162f059c).
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Broken in ae448e00afb43d7f72dfa9c82a4c45994e4fea6a.
Notice that config_components.h is safe to include,
as it is valid for both the host and the target
(in contrast to config.h).
Reviewed-by: Zhao Zhili <[email protected]>
Signed-off-by: Andreas Rheinhardt <[email protected]>
|
|
|
|
|
|
|
|
|
| |
This patch adds support for the texture array feature
used by AMD boards in the D3D12 HEVC encoder.
In texture array mode, a single texture array is shared for all
reference and reconstructed pictures using different subresources.
The implementation ensures compatibility
and has been successfully tested on AMD, Intel, and NVIDIA GPUs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch, prof_grad_filter calculate
gh[0], gh[1], gv[0], gv[1] and save them to stack.
derive_bdof_vx_vy load them from stack and calculate
gh[0] + gh[1], gv[0] + gv[1].
apply_bdof_min_block load them from stack and calculate
gh[0] - gh[1], gv[0] - gv[1]
This patch add bdof_grad_filter, which calculate gh[0] + gh[1],
gh[0] - gh[1], gv[0] + gv[1], gv[0] - gv[1], and save them to
stack, so derive_bdof_vx_vy and apply_bdof_min_block can use the
results directly.
prof_grad_filter is kept for reuse by other functions in the future.
Benchmark on rpi5 with gcc 12
Before After
--------------------------------------------------------------------
apply_bdof_8_8x16_c: | 7431.4 ( 1.00x) | 7371.7 ( 1.00x)
apply_bdof_8_8x16_neon: | 1175.4 ( 6.32x) | 1036.3 ( 7.11x)
apply_bdof_8_16x8_c: | 7182.2 ( 1.00x) | 7201.1 ( 1.00x)
apply_bdof_8_16x8_neon: | 1021.7 ( 7.03x) | 879.9 ( 8.18x)
apply_bdof_8_16x16_c: | 14577.1 ( 1.00x) | 14589.3 ( 1.00x)
apply_bdof_8_16x16_neon: | 2012.8 ( 7.24x) | 1743.3 ( 8.37x)
apply_bdof_10_8x16_c: | 7292.4 ( 1.00x) | 7308.5 ( 1.00x)
apply_bdof_10_8x16_neon: | 1156.3 ( 6.31x) | 1045.3 ( 6.99x)
apply_bdof_10_16x8_c: | 7112.4 ( 1.00x) | 7214.4 ( 1.00x)
apply_bdof_10_16x8_neon: | 1007.6 ( 7.06x) | 904.8 ( 7.97x)
apply_bdof_10_16x16_c: | 14363.3 ( 1.00x) | 14476.4 ( 1.00x)
apply_bdof_10_16x16_neon: | 1986.9 ( 7.23x) | 1783.1 ( 8.12x)
apply_bdof_12_8x16_c: | 7433.3 ( 1.00x) | 7374.7 ( 1.00x)
apply_bdof_12_8x16_neon: | 1155.9 ( 6.43x) | 1040.8 ( 7.09x)
apply_bdof_12_16x8_c: | 7171.1 ( 1.00x) | 7376.3 ( 1.00x)
apply_bdof_12_16x8_neon: | 1010.8 ( 7.09x) | 899.4 ( 8.20x)
apply_bdof_12_16x16_c: | 14515.5 ( 1.00x) | 14731.5 ( 1.00x)
apply_bdof_12_16x16_neon: | 1988.4 ( 7.30x) | 1785.2 ( 8.25x)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement line tricks and pixel tricks. See comments in inter.S
for details.
Benchmark on rpi5 with gcc 12
Before After
-----------------------------------------------------------------
apply_bdof_8_8x16_c: | 7375.5 ( 1.00x) | 7473.8 ( 1.00x)
apply_bdof_8_8x16_neon: | 1875.1 ( 3.93x) | 1135.8 ( 6.58x)
apply_bdof_8_16x8_c: | 7273.9 ( 1.00x) | 7204.0 ( 1.00x)
apply_bdof_8_16x8_neon: | 1738.2 ( 4.18x) | 1013.0 ( 7.11x)
apply_bdof_8_16x16_c: | 14744.9 ( 1.00x) | 14712.6 ( 1.00x)
apply_bdof_8_16x16_neon: | 3446.7 ( 4.28x) | 1997.7 ( 7.36x)
apply_bdof_10_8x16_c: | 7352.4 ( 1.00x) | 7485.7 ( 1.00x)
apply_bdof_10_8x16_neon: | 1861.0 ( 3.95x) | 1134.1 ( 6.60x)
apply_bdof_10_16x8_c: | 7330.5 ( 1.00x) | 7232.8 ( 1.00x)
apply_bdof_10_16x8_neon: | 1747.2 ( 4.20x) | 1002.6 ( 7.21x)
apply_bdof_10_16x16_c: | 14522.4 ( 1.00x) | 14664.8 ( 1.00x)
apply_bdof_10_16x16_neon: | 3490.5 ( 4.16x) | 1978.4 ( 7.41x)
apply_bdof_12_8x16_c: | 7389.0 ( 1.00x) | 7380.1 ( 1.00x)
apply_bdof_12_8x16_neon: | 1861.3 ( 3.97x) | 1134.0 ( 6.51x)
apply_bdof_12_16x8_c: | 7283.1 ( 1.00x) | 7336.9 ( 1.00x)
apply_bdof_12_16x8_neon: | 1749.1 ( 4.16x) | 1002.3 ( 7.32x)
apply_bdof_12_16x16_c: | 14580.7 ( 1.00x) | 14502.7 ( 1.00x)
apply_bdof_12_16x16_neon: | 3472.9 ( 4.20x) | 1978.3 ( 7.33x)
Signed-off-by: Zhao Zhili <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There's no reason to use a completely separate graph just to process the
alpha plane in isolation - zimg supports native alpha handling as part of the
main image.
Fixes several issues with this filter when adding or removing alpha planes,
and also adds support for scaling premultiplied alpha (which reduces artefacts
near the image borders).
|
|
|
|
|
|
|
|
|
|
| |
Fortunately, we only care if this flag is set - otherwise, this filter is
alpha mode agnostic (since it is purely scaling, etc).
That said, there is an argument to be made that we should prefer premul
alpha when scaling, because scaling in straight alpha will leak garbage
pixels; but I think that would be a too backwards-incompatible change to
be worth thinking about at this time.
|
| |
|
|
|
|
|
| |
This allows drawing colors onto images with premultiplied alpha, by first
premultiplying the specified RGBA values.
|
| |
|
|
|
|
|
|
| |
The overwhelming majority of references to ff_draw_init2() just set the
colorspace properties from a filter link. This wrapper allows us to update
all such referencen automatically.
|
|
|
|
|
| |
Fading to black in non-alpha mode works for either straight or premultiplied
alpha, but fading to a color does not.
|
|
|
|
|
| |
No reason to pass all the variables again, if we're already passing the
context.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conceptually, these are pretty simple to handle, since they are basically
equivalent to the case of alpha being absent, since the only thing the
destination alpha plane is used for is unpremultiplyng straight alpha.
For planar formats, the total number of cases doesn't change in principle,
since before this patch we have:
- alpha present, overlay straight
- alpha present, overlay premultiplied
- alpha absent, overlay straight
- alpha absent, overlay premultiplied
And now we have:
- main straight, overlay straight
- main straight, overlay premultiplied
- main premultiplied, overlay straight
- main premultiplied, overlay premultiplied
That said, we do gain some cases now that we used to (incorrectly) ignore,
like premultiplied yuva420p10.
Notably, we can skip defining separate functions for the case of main alpha
being absent, since that can be a single cheap branch inside the function
itself, on whether or not to also process the alpha plane. Otherwise, as long
as we treat "alpha absent" as "main premultiplied", the per-plane logic will
skip touching the nonexistent alpha plane.
The only format that actually needs extra cases is packed rgb, but that's only
two additional cases in total.
Also arguably simplifies the assignment logic massively.
|
|
|
|
|
| |
`is_straight`, `alpha_mode` etc. are more consistently named to refer to
either the main image, or the overlay.
|
|
|
|
| |
And use the link-tagged value instead of the hard-coded parameter.
|
|
|
|
|
|
| |
Chooses the desired output alpha mode. Note that this depends on
an upstream version of libplacebo new enough to respect the corresponding
AVFrame field in pl_map_avframe_ex.
|
| |
|
|
|
|
|
|
| |
While vf_scale cannot directly convert between premultiplied and straight
alpha, the effective tagging can still change as a result of a change in
the pixel format (i.e. adding or removing an alpha channel).
|
| |
|
| |
|
| |
|
|
|
|
| |
SDL seems to hard-code straight alpha compositing.
|
|
|
|
|
| |
The implementation exactly mirrors the existing plumbing for color_ranges
and color_spaces.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This header bit ("alpha_associated") was incorrectly ignored.
|
|
|
|
|
| |
Works around a bug where older versions of libjxl don't correctly forward
the alpha channel information to the extra channel info.
|
|
|
|
|
|
| |
JPEG XL supports both premultiplied and straight alpha, and the basic info
struct contains signalling for this. Forward the correct tagging on decode
and encode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OpenEXR always uses premultiplied alpha, as per the spec.
cf. https://openexr.com/en/latest/TechnicalIntroduction.html
> By convention, all color channels are premultiplied by alpha, so that
> `foreground + (1-alpha) x background` performs a correct “over” operation.
> (See Premultiplied vs. Un-Premultiplied Color Channels)
>
> In the visual effects industry premultiplied color channels are the norm,
> and application software packages typically use internal image
> representations that are also premultiplied.
|
|
|
|
|
|
|
|
|
|
| |
PNG always uses straight alpha.
cf. https://www.w3.org/TR/PNG-Rationale.html
> Although each form of alpha storage has its advantages, we did not want to
> require all PNG viewers to handle both forms. We standardized on non-
> premultiplied alpha as being the lossless and more general case.
|
|
|
|
| |
Error out if trying to encode frames with an incompatible alpha mode.
|
|
|
|
|
|
|
|
|
|
| |
Following in the footsteps of the previous commit, this commit adds the
new fields to AVCodecContext so we can start properly setting it on codecs,
as well as limiting the list of supported options to detect a format mismatch
during encode.
This commit also sets up the necessary infrastructure to start using the
newly added field in all codecs.
|
| |
|