-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.
Description
From the code itself:
torchcodec/src/torchcodec/_core/CpuDeviceInterface.h
Lines 98 to 105 in 6d72f11
// TODO: The names of these fields is confusing, as the actual color | |
// conversion object for Sws has "context" in the name, and we use | |
// "context" for the structs we store to know if we need to recreate a | |
// color conversion object. We should clean that up. | |
std::unique_ptr<FilterGraph> filterGraph_; | |
FiltersContext prevFiltersContext_; | |
UniqueSwsContext swsContext_; | |
SwsFrameContext prevSwsFrameContext_; |
Part of the problem here is that "context" is an overused term. We've used it to mean "the values for the current version of filtergraph or swscale that let us know if we can reuse it," but context is also commonly used in FFmpeg for the names of objects that control access to a thing.
Because "context" is so pervasive in FFmpeg type names, we should probably not use it our type names. This does mean we'll probably also want to rename FiltersContext
as well as SwsFrameContext
Metadata
Metadata
Assignees
Labels
refactorImproves code itself, but does not fix a bug or add new functionality.Improves code itself, but does not fix a bug or add new functionality.