[FFmpeg-devel] [PATCH 3/5] avfilter/vf_super2xsai: fix big-endian writing
Muhammad Faiz
mfcc64 at gmail.com
Sun Jan 27 11:36:17 EET 2019
Fix mismatched checksum on fate-filter-pixfmts-super2xsai.
Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
---
libavfilter/vf_super2xsai.c | 4 ++--
tests/ref/fate/filter-pixfmts-super2xsai | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c
index 87eec04da8..4901e03e23 100644
--- a/libavfilter/vf_super2xsai.c
+++ b/libavfilter/vf_super2xsai.c
@@ -180,8 +180,8 @@ static void super2xsai(AVFilterContext *ctx,
break;
default: // bpp = 2
if (s->is_be) {
- AV_WB32(dst_line[0] + x * 4, product1a | (product1b << 16));
- AV_WB32(dst_line[1] + x * 4, product2a | (product2b << 16));
+ AV_WB32(dst_line[0] + x * 4, (product1a << 16) | product1b);
+ AV_WB32(dst_line[1] + x * 4, (product2a << 16) | product2b);
} else {
AV_WL32(dst_line[0] + x * 4, product1a | (product1b << 16));
AV_WL32(dst_line[1] + x * 4, product2a | (product2b << 16));
diff --git a/tests/ref/fate/filter-pixfmts-super2xsai b/tests/ref/fate/filter-pixfmts-super2xsai
index d42601dab1..c76d469880 100644
--- a/tests/ref/fate/filter-pixfmts-super2xsai
+++ b/tests/ref/fate/filter-pixfmts-super2xsai
@@ -1,14 +1,14 @@
abgr e21be14b5fe9d7a29740a418c325b17e
argb 563489534663cb2b32beed2b41370c37
bgr24 a933eac9bb53c3ce3c33950b229996b5
-bgr555le d69e39a24027afcb28feaabb46f0948d
bgr555le 70b819425f79f823356229b90b41cc84
-bgr565le 78f3b43ddcc1f8558444c97d249a6123
+bgr555le 70b819425f79f823356229b90b41cc84
+bgr565le 6fb9dc50a81b853800ba65d5ec6b8417
bgr565le 6fb9dc50a81b853800ba65d5ec6b8417
bgra e9cc6644e2f35103c241094ab4bb8fec
rgb24 3fd7653f414f350ddb0c0a236ce0c809
-rgb555le f2f9f30e8be582729f12a03331e3c635
rgb555le 53325a20c913826566880eb25d1d2946
-rgb565le 340ffed3645809f68346280764ca3de6
+rgb555le 53325a20c913826566880eb25d1d2946
+rgb565le 14fe550f449a7539d9f1e99e85cf40f1
rgb565le 14fe550f449a7539d9f1e99e85cf40f1
rgba 7041184d35c316e73e849504b64bc4f6
--
2.17.2
More information about the ffmpeg-devel
mailing list