History

swscale: introduce new, dynamic scaling API

As part of a larger, ongoing effort to modernize and partially rewrite libswscale, it was decided and generally agreed upon to introduce a new public API for libswscale. This API is designed to be less stateful, more explicitly defined, and considerably easier to use than the existing one. Most of the API work has been already accomplished in the previous commits, this commit merely introduces the ability to use sws_scale_frame() dynamically, without prior sws_init_context() calls. Instead, the new API takes frame properties from the frames themselves, and the implementation is based on the new SwsGraph API, which we simply reinitialize as needed. This high-level wrapper also recreates the logic that used to live inside vf_scale for scaling interlaced frames, enabling it to be reused more easily by end users. Finally, this function is designed to simply copy refs directly when nothing needs to be done, substantially improving throughput of the noop fast path.

Niklas Haas committed 1 year ago

Commit 2a091d41 parent bf738417 files · +276 −30Browse files

Showing the changes to doc/APIchanges (1 of 7 files). Show all

Unified · Split

doc/APIchanges+4−0
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07 · 1 unmodified line
22
33 API changes, most recent first:
44
5+2024-11-25 - xxxxxxxxxx - lsws 8.12.100 - swscale.h
6+ Allow using sws_frame_scale() dynamically, without first initializing the
7+ SwsContext. Deprecate sws_init_context(). Add sws_frame_setup() instead.
8+
59 2024-11-25 - xxxxxxxxxx - lsws 8.11.100 - swscale.h
610 Replace #define-based SWS_* flags by enum SwsFlags.
711

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t