From bb4f3fa6a029c31ca7fddba7136eb37ecb953ff3 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sat, 17 Sep 2005 17:17:59 +0000 Subject: [PATCH] 24 bit conversion check Original commit message from CVS: 24 bit conversion check --- ChangeLog | 5 +++++ check/elements/audioconvert.c | 14 ++++++++++++++ common | 2 +- tests/check/elements/audioconvert.c | 14 ++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a199b3d6c7..5e50fd9b91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-17 Thomas Vander Stichele + + * check/elements/audioconvert.c: (GST_START_TEST): + try out 24 bit conversion + 2005-09-15 Thomas Vander Stichele * ext/vorbis/vorbisenc.c: (gst_vorbisenc_init), diff --git a/check/elements/audioconvert.c b/check/elements/audioconvert.c index a1f2d17d63..f3b13cb3dd 100644 --- a/check/elements/audioconvert.c +++ b/check/elements/audioconvert.c @@ -251,6 +251,20 @@ GST_START_TEST (test_int_conversion) in, get_int_caps (1, "BYTE_ORDER", 8, 8, FALSE) ); } + + /* 8 <-> 24 signed */ + /* NOTE: if audioconvert was doing dithering we'd have a problem */ + { + gint8 in[] = { 0, 1, 127 }; + guint8 out[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x7f }; + + RUN_CONVERSION (in, get_int_caps (1, "BYTE_ORDER", 8, 8, TRUE), + out, get_int_caps (1, "BYTE_ORDER", 24, 24, TRUE) + ); + RUN_CONVERSION (out, get_int_caps (1, "BYTE_ORDER", 24, 24, TRUE), + in, get_int_caps (1, "BYTE_ORDER", 8, 8, TRUE) + ); + } } GST_END_TEST; diff --git a/common b/common index 62cd70d46e..39250a956e 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 62cd70d46eb00c3eb6b973b8a3b5fe6c202dbb29 +Subproject commit 39250a956e1dfc010fe9f9d93ca1e2c3a343cdca diff --git a/tests/check/elements/audioconvert.c b/tests/check/elements/audioconvert.c index a1f2d17d63..f3b13cb3dd 100644 --- a/tests/check/elements/audioconvert.c +++ b/tests/check/elements/audioconvert.c @@ -251,6 +251,20 @@ GST_START_TEST (test_int_conversion) in, get_int_caps (1, "BYTE_ORDER", 8, 8, FALSE) ); } + + /* 8 <-> 24 signed */ + /* NOTE: if audioconvert was doing dithering we'd have a problem */ + { + gint8 in[] = { 0, 1, 127 }; + guint8 out[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x7f }; + + RUN_CONVERSION (in, get_int_caps (1, "BYTE_ORDER", 8, 8, TRUE), + out, get_int_caps (1, "BYTE_ORDER", 24, 24, TRUE) + ); + RUN_CONVERSION (out, get_int_caps (1, "BYTE_ORDER", 24, 24, TRUE), + in, get_int_caps (1, "BYTE_ORDER", 8, 8, TRUE) + ); + } } GST_END_TEST;