diff mbox series

[FFmpeg-devel,v3,3/3] fate/filter-video: add 10bit test for unsharp filter

Message ID 1604056209-16491-3-git-send-email-lance.lmwang@gmail.com
State Superseded
Headers show
Series [FFmpeg-devel,v3,1/3] avfilter/vf_unsharp: add 10bit support | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate warning Make fate failed

Commit Message

Lance Wang Oct. 30, 2020, 11:10 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 tests/fate/filter-video.mak             |  3 ++
 tests/ref/fate/filter-unsharp-yuv420p10 | 55 +++++++++++++++++++++++++++++++++
 2 files changed, 58 insertions(+)
 create mode 100644 tests/ref/fate/filter-unsharp-yuv420p10

Comments

Nicolas George Oct. 30, 2020, 11:12 a.m. UTC | #1
lance.lmwang@gmail.com (12020-10-30):
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  tests/fate/filter-video.mak             |  3 ++
>  tests/ref/fate/filter-unsharp-yuv420p10 | 55 +++++++++++++++++++++++++++++++++
>  2 files changed, 58 insertions(+)
>  create mode 100644 tests/ref/fate/filter-unsharp-yuv420p10

"Remember that a final scale filter is needed for big-endian archs."

Regards,
Lance Wang Oct. 30, 2020, 1:41 p.m. UTC | #2
On Fri, Oct 30, 2020 at 12:12:26PM +0100, Nicolas George wrote:
> lance.lmwang@gmail.com (12020-10-30):
> > From: Limin Wang <lance.lmwang@gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > ---
> >  tests/fate/filter-video.mak             |  3 ++
> >  tests/ref/fate/filter-unsharp-yuv420p10 | 55 +++++++++++++++++++++++++++++++++
> >  2 files changed, 58 insertions(+)
> >  create mode 100644 tests/ref/fate/filter-unsharp-yuv420p10
> 
> "Remember that a final scale filter is needed for big-endian archs."

Sorry, in the previous email I did not understand the meaning of this sentence. 

Now I think it's necessary to add a final scale like below, correct?
scale,format=pix_fmts=yuv420p10,unsharp=11:11:-1.5:11:11:-1.5,scale


> 
> Regards,
> 
> -- 
>   Nicolas George
Nicolas George Oct. 30, 2020, 1:46 p.m. UTC | #3
lance.lmwang@gmail.com (12020-10-30):
> Sorry, in the previous email I did not understand the meaning of this sentence. 

Then maybe ask for clarification instead of just ignoring it?

> Now I think it's necessary to add a final scale like below, correct?
> scale,format=pix_fmts=yuv420p10,unsharp=11:11:-1.5:11:11:-1.5,scale

That would be correct with regard to my remark.

Note that using testsrc2 instead of vsynth would make the first scale
filter unnecessary.

Regards,
Lance Wang Oct. 30, 2020, 1:57 p.m. UTC | #4
On Fri, Oct 30, 2020 at 02:46:50PM +0100, Nicolas George wrote:
> lance.lmwang@gmail.com (12020-10-30):
> > Sorry, in the previous email I did not understand the meaning of this sentence. 
> 
> Then maybe ask for clarification instead of just ignoring it?

Sorry, I ignore it for I haven't realized it's a question in fact.

> 
> > Now I think it's necessary to add a final scale like below, correct?
> > scale,format=pix_fmts=yuv420p10,unsharp=11:11:-1.5:11:11:-1.5,scale
> 
> That would be correct with regard to my remark.
> 
> Note that using testsrc2 instead of vsynth would make the first scale
> filter unnecessary.

Without the first scale, it'll report error, but without the final scale,
no error report but it's not work as expected, do you think it's necessary
to report error in the case?

> 
> Regards,
> 
> -- 
>   Nicolas George



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Nicolas George Oct. 30, 2020, 2:15 p.m. UTC | #5
lance.lmwang@gmail.com (12020-10-30):
> Sorry, I ignore it for I haven't realized it's a question in fact.

Please do not ignore things people write to you. If they (I) took time
writing it, there must be a reason.

> Without the first scale, it'll report error, but without the final scale,
> no error report but it's not work as expected, do you think it's necessary
> to report error in the case?

As I said, the final scale is necessary for big-endian architectures.
Did you test on a big-endian architecture? If not, then you do not see
any consequence for this filter, but it needs to be there.

The first scale can be avoided if you use testsrc2, as I said. If you
use vsynth, it is necessary. Testing that requires less extra code is
better.

Regards,
Lance Wang Oct. 30, 2020, 2:51 p.m. UTC | #6
On Fri, Oct 30, 2020 at 03:15:08PM +0100, Nicolas George wrote:
> lance.lmwang@gmail.com (12020-10-30):
> > Sorry, I ignore it for I haven't realized it's a question in fact.
> 
> Please do not ignore things people write to you. If they (I) took time
> writing it, there must be a reason.
> 
> > Without the first scale, it'll report error, but without the final scale,
> > no error report but it's not work as expected, do you think it's necessary
> > to report error in the case?
> 
> As I said, the final scale is necessary for big-endian architectures.
> Did you test on a big-endian architecture? If not, then you do not see
> any consequence for this filter, but it needs to be there.

thanks, I see the point now, I haven't got error just for my system is little-endian. 

> 
> The first scale can be avoided if you use testsrc2, as I said. If you
> use vsynth, it is necessary. Testing that requires less extra code is
> better.

OK, I'll update the patch to use testsrc2 instead of vsync for testing.

> 
> Regards,
> 
> -- 
>   Nicolas George



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 639f957..d7420f8 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -410,6 +410,9 @@  fate-filter-untile: CMD = framecrc -lavfi testsrc2=d=1:r=2,untile=2x2
 FATE_FILTER_VSYNTH-$(CONFIG_UNSHARP_FILTER) += fate-filter-unsharp
 fate-filter-unsharp: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf unsharp=11:11:-1.5:11:11:-1.5
 
+FATE_FILTER_VSYNTH-$(CONFIG_UNSHARP_FILTER) += fate-filter-unsharp-yuv420p10
+fate-filter-unsharp-yuv420p10: CMD = framecrc -c:v pgmyuv -i $(SRC) -vf scale,format=pix_fmts=yuv420p10,unsharp=11:11:-1.5:11:11:-1.5 -pix_fmt yuv420p10le -flags +bitexact -sws_flags +accurate_rnd+bitexact
+
 FATE_FILTER_SAMPLES-$(call ALLYES, SMJPEG_DEMUXER MJPEG_DECODER PERMS_FILTER HQDN3D_FILTER) += fate-filter-hqdn3d-sample
 fate-filter-hqdn3d-sample: tests/data/filtergraphs/hqdn3d
 fate-filter-hqdn3d-sample: CMD = framecrc -idct simple -i $(TARGET_SAMPLES)/smjpeg/scenwin.mjpg -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/hqdn3d -an
diff --git a/tests/ref/fate/filter-unsharp-yuv420p10 b/tests/ref/fate/filter-unsharp-yuv420p10
new file mode 100644
index 0000000..20f82f1
--- /dev/null
+++ b/tests/ref/fate/filter-unsharp-yuv420p10
@@ -0,0 +1,55 @@ 
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 352x288
+#sar 0: 0/1
+0,          0,          0,        1,   304128, 0x375a055d
+0,          1,          1,        1,   304128, 0x43374234
+0,          2,          2,        1,   304128, 0xba34fded
+0,          3,          3,        1,   304128, 0xaab09f3b
+0,          4,          4,        1,   304128, 0x1e42b90e
+0,          5,          5,        1,   304128, 0x135f1088
+0,          6,          6,        1,   304128, 0x780c001a
+0,          7,          7,        1,   304128, 0x10f209fa
+0,          8,          8,        1,   304128, 0x54aa698a
+0,          9,          9,        1,   304128, 0x72470a4b
+0,         10,         10,        1,   304128, 0x7cac80ed
+0,         11,         11,        1,   304128, 0x820ffb09
+0,         12,         12,        1,   304128, 0x7386656a
+0,         13,         13,        1,   304128, 0x3662c47e
+0,         14,         14,        1,   304128, 0x1b07cbce
+0,         15,         15,        1,   304128, 0x2577c6d2
+0,         16,         16,        1,   304128, 0xb478c1a6
+0,         17,         17,        1,   304128, 0x27549b49
+0,         18,         18,        1,   304128, 0xd2f628ca
+0,         19,         19,        1,   304128, 0x95cc5544
+0,         20,         20,        1,   304128, 0x844a1bda
+0,         21,         21,        1,   304128, 0x4bcfc8b2
+0,         22,         22,        1,   304128, 0x403e2302
+0,         23,         23,        1,   304128, 0x275214bf
+0,         24,         24,        1,   304128, 0x2f1e8e7b
+0,         25,         25,        1,   304128, 0x14d68a42
+0,         26,         26,        1,   304128, 0x2d966e74
+0,         27,         27,        1,   304128, 0x7d2f0bf2
+0,         28,         28,        1,   304128, 0x5744d92e
+0,         29,         29,        1,   304128, 0x4c89f858
+0,         30,         30,        1,   304128, 0x9702e22e
+0,         31,         31,        1,   304128, 0xea18c80e
+0,         32,         32,        1,   304128, 0x5290813c
+0,         33,         33,        1,   304128, 0xc8909e8c
+0,         34,         34,        1,   304128, 0xf9c985f9
+0,         35,         35,        1,   304128, 0xcdf626f0
+0,         36,         36,        1,   304128, 0xc517d607
+0,         37,         37,        1,   304128, 0xe765923b
+0,         38,         38,        1,   304128, 0xf12fa5f6
+0,         39,         39,        1,   304128, 0x04bf7f2b
+0,         40,         40,        1,   304128, 0x695762d6
+0,         41,         41,        1,   304128, 0xb1bf1983
+0,         42,         42,        1,   304128, 0x654dc4b2
+0,         43,         43,        1,   304128, 0x161854b6
+0,         44,         44,        1,   304128, 0x3d56b1c1
+0,         45,         45,        1,   304128, 0xa16f54a8
+0,         46,         46,        1,   304128, 0x02fffb2f
+0,         47,         47,        1,   304128, 0x04bddde4
+0,         48,         48,        1,   304128, 0xf5687316
+0,         49,         49,        1,   304128, 0x2a9a7dc6