History

swscale/x86: use dedicated int for self-modifying MMX dstW

I want to pull options out of SwsInternal, so we need to make this field a dedicated int that gets updated as appropriate in ff_swscale().

Niklas Haas committed 2 years ago

Commit f1f54d21 parent b03c7582 files · +3 −1Browse files

Unified · Split

2 files
  1. libswscale/swscale.c +1 −0
  2. libswscale/swscale_internal.h +2 −1
libswscale/swscale.c+1−0
@@ -488,6 +488,7 @@ int ff_swscale(SwsContext *c, const uint8_t *const src[], const int srcStride[], · 487 unmodified lines
488488
489489 #if HAVE_MMX_INLINE
490490 ff_updateMMXDitherTables(c, dstY);
491+ c->dstW_mmx = c->dstW;
491492 #endif
492493 if (should_dither) {
493494 c->chrDither8 = ff_dither_8x8_128[chrDstY & 7];
libswscale/swscale_internal.h+2−1
@@ -345,6 +345,7 @@ struct SwsContext { · 344 unmodified lines
345345 SwsFunc convert_unscaled;
346346 int srcW; ///< Width of source luma/alpha planes.
347347 int srcH; ///< Height of source luma/alpha planes.
348+ int dstW; ///< Width of destination luma/alpha planes.
348349 int dstH; ///< Height of destination luma/alpha planes.
349350 int chrSrcW; ///< Width of source chroma planes.
350351 int chrSrcH; ///< Height of source chroma planes.
@@ -534,7 +535,7 @@ struct SwsContext { · 183 unmodified lines
534535 DECLARE_ALIGNED(8, uint64_t, vOffset);
535536 int32_t lumMmxFilter[4 * MAX_FILTER_SIZE];
536537 int32_t chrMmxFilter[4 * MAX_FILTER_SIZE];
537− int dstW; ///< Width of destination luma/alpha planes.
538+ int dstW_mmx;
538539 DECLARE_ALIGNED(8, uint64_t, esp);
539540 DECLARE_ALIGNED(8, uint64_t, vRounder);
540541 DECLARE_ALIGNED(8, uint64_t, u_temp);

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