checkasm: Move headers into canonical order

Message ID 1473234717-20454-1-git-send-email-diego@biurrun.de
State New
Headers show

Commit Message

Diego Biurrun Sept. 7, 2016, 7:51 a.m.
---
 tests/checkasm/bswapdsp.c     |  7 +++++--
 tests/checkasm/checkasm.c     | 14 +++++++++-----
 tests/checkasm/checkasm.h     |  4 +++-
 tests/checkasm/dcadsp.c       |  7 ++++---
 tests/checkasm/fmtconvert.c   |  1 +
 tests/checkasm/h264dsp.c      |  9 ++++++---
 tests/checkasm/h264pred.c     |  9 ++++++---
 tests/checkasm/h264qpel.c     |  7 +++++--
 tests/checkasm/hevc_mc.c      |  6 +++---
 tests/checkasm/synth_filter.c |  3 ++-
 tests/checkasm/v210enc.c      |  7 +++++--
 tests/checkasm/vp8dsp.c       |  6 +++---
 12 files changed, 52 insertions(+), 28 deletions(-)

Comments

Anton Khirnov Sept. 7, 2016, 8 a.m. | #1
Quoting Diego Biurrun (2016-09-07 09:51:57)
> ---
>  tests/checkasm/bswapdsp.c     |  7 +++++--
>  tests/checkasm/checkasm.c     | 14 +++++++++-----
>  tests/checkasm/checkasm.h     |  4 +++-
>  tests/checkasm/dcadsp.c       |  7 ++++---
>  tests/checkasm/fmtconvert.c   |  1 +
>  tests/checkasm/h264dsp.c      |  9 ++++++---
>  tests/checkasm/h264pred.c     |  9 ++++++---
>  tests/checkasm/h264qpel.c     |  7 +++++--
>  tests/checkasm/hevc_mc.c      |  6 +++---
>  tests/checkasm/synth_filter.c |  3 ++-
>  tests/checkasm/v210enc.c      |  7 +++++--
>  tests/checkasm/vp8dsp.c       |  6 +++---
>  12 files changed, 52 insertions(+), 28 deletions(-)

IMO this just unnecessarily pollutes the git history and wastes people's
time without adding anything of any value.
And as I said in the other thread, I disagree that we have (or should
have) any agreed-upon "canonical" order.
Luca Barbato Sept. 7, 2016, 9:42 a.m. | #2
On 07/09/16 10:00, Anton Khirnov wrote:
> Quoting Diego Biurrun (2016-09-07 09:51:57)
>> ---
>>  tests/checkasm/bswapdsp.c     |  7 +++++--
>>  tests/checkasm/checkasm.c     | 14 +++++++++-----
>>  tests/checkasm/checkasm.h     |  4 +++-
>>  tests/checkasm/dcadsp.c       |  7 ++++---
>>  tests/checkasm/fmtconvert.c   |  1 +
>>  tests/checkasm/h264dsp.c      |  9 ++++++---
>>  tests/checkasm/h264pred.c     |  9 ++++++---
>>  tests/checkasm/h264qpel.c     |  7 +++++--
>>  tests/checkasm/hevc_mc.c      |  6 +++---
>>  tests/checkasm/synth_filter.c |  3 ++-
>>  tests/checkasm/v210enc.c      |  7 +++++--
>>  tests/checkasm/vp8dsp.c       |  6 +++---
>>  12 files changed, 52 insertions(+), 28 deletions(-)
> 
> IMO this just unnecessarily pollutes the git history and wastes people's
> time without adding anything of any value.
> And as I said in the other thread, I disagree that we have (or should
> have) any agreed-upon "canonical" order.

Being consistent helps readability, but I do not consider it _that_
important to have long discussions over it. Even more since we are
talking about checkasm and not part of the libraries.

IIRC Diego wasn't even the person that proposed the strict ordering and
the wiki history points me and Vittorio as the perpetrators.

If you want it relaxed, I do not have problems with it anyway, the only
care should be over not mixing system headers and local headers to avoid
unexpected behaviors.

lu

Patch

diff --git a/tests/checkasm/bswapdsp.c b/tests/checkasm/bswapdsp.c
index 829ebaa..63e4735 100644
--- a/tests/checkasm/bswapdsp.c
+++ b/tests/checkasm/bswapdsp.c
@@ -19,12 +19,15 @@ 
  */
 
 #include <string.h>
-#include "checkasm.h"
-#include "libavcodec/bswapdsp.h"
+
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/bswapdsp.h"
+
+#include "checkasm.h"
+
 #define BUF_SIZE 512
 
 #define randomize_buffers()                 \
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c
index 86d3bab..8d9743d 100644
--- a/tests/checkasm/checkasm.c
+++ b/tests/checkasm/checkasm.c
@@ -20,15 +20,12 @@ 
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include "config.h"
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "checkasm.h"
-#include "libavutil/common.h"
-#include "libavutil/cpu.h"
-#include "libavutil/intfloat.h"
-#include "libavutil/random_seed.h"
 
 #if HAVE_IO_H
 #include <io.h>
@@ -49,6 +46,13 @@ 
 #include <unistd.h>
 #endif
 
+#include "libavutil/common.h"
+#include "libavutil/cpu.h"
+#include "libavutil/intfloat.h"
+#include "libavutil/random_seed.h"
+
+#include "checkasm.h"
+
 #if !HAVE_ISATTY
 #define isatty(fd) 1
 #endif
diff --git a/tests/checkasm/checkasm.h b/tests/checkasm/checkasm.h
index 5e67b7d..0142963 100644
--- a/tests/checkasm/checkasm.h
+++ b/tests/checkasm/checkasm.h
@@ -23,8 +23,10 @@ 
 #ifndef TESTS_CHECKASM_CHECKASM_H
 #define TESTS_CHECKASM_CHECKASM_H
 
-#include <stdint.h>
 #include "config.h"
+
+#include <stdint.h>
+
 #include "libavutil/avstring.h"
 #include "libavutil/cpu.h"
 #include "libavutil/internal.h"
diff --git a/tests/checkasm/dcadsp.c b/tests/checkasm/dcadsp.c
index 7251362..eb516c6 100644
--- a/tests/checkasm/dcadsp.c
+++ b/tests/checkasm/dcadsp.c
@@ -22,11 +22,12 @@ 
 #include <string.h>
 #include <stdlib.h>
 
-#include "libavutil/internal.h"
-#include "libavutil/intfloat.h"
 #include "libavcodec/dca.h"
-#include "libavcodec/dcadsp.h"
 #include "libavcodec/dcadata.h"
+#include "libavcodec/dcadsp.h"
+
+#include "libavutil/internal.h"
+#include "libavutil/intfloat.h"
 
 #include "checkasm.h"
 
diff --git a/tests/checkasm/fmtconvert.c b/tests/checkasm/fmtconvert.c
index 1a843b0..2b99bfd 100644
--- a/tests/checkasm/fmtconvert.c
+++ b/tests/checkasm/fmtconvert.c
@@ -24,6 +24,7 @@ 
 
 #include "libavutil/internal.h"
 #include "libavutil/common.h"
+
 #include "libavcodec/fmtconvert.h"
 
 #include "checkasm.h"
diff --git a/tests/checkasm/h264dsp.c b/tests/checkasm/h264dsp.c
index c9ddd52..487723c 100644
--- a/tests/checkasm/h264dsp.c
+++ b/tests/checkasm/h264dsp.c
@@ -19,13 +19,16 @@ 
  */
 
 #include <string.h>
-#include "checkasm.h"
-#include "libavcodec/avcodec.h"
-#include "libavcodec/h264dsp.h"
+
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/avcodec.h"
+#include "libavcodec/h264dsp.h"
+
+#include "checkasm.h"
+
 static const uint32_t pixel_mask[3] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff };
 
 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
diff --git a/tests/checkasm/h264pred.c b/tests/checkasm/h264pred.c
index 4994947..be7f058 100644
--- a/tests/checkasm/h264pred.c
+++ b/tests/checkasm/h264pred.c
@@ -19,13 +19,16 @@ 
  */
 
 #include <string.h>
-#include "checkasm.h"
-#include "libavcodec/avcodec.h"
-#include "libavcodec/h264pred.h"
+
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/avcodec.h"
+#include "libavcodec/h264pred.h"
+
+#include "checkasm.h"
+
 static const int codec_ids[4] = { AV_CODEC_ID_H264, AV_CODEC_ID_VP8, AV_CODEC_ID_RV40, AV_CODEC_ID_SVQ3 };
 
 static const char * const pred4x4_modes[4][15] = {
diff --git a/tests/checkasm/h264qpel.c b/tests/checkasm/h264qpel.c
index d92f223..2819a5d 100644
--- a/tests/checkasm/h264qpel.c
+++ b/tests/checkasm/h264qpel.c
@@ -19,12 +19,15 @@ 
  */
 
 #include <string.h>
-#include "checkasm.h"
-#include "libavcodec/h264qpel.h"
+
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/h264qpel.h"
+
+#include "checkasm.h"
+
 static const uint32_t pixel_mask[3] = { 0xffffffff, 0x01ff01ff, 0x03ff03ff };
 
 #define SIZEOF_PIXEL ((bit_depth + 7) / 8)
diff --git a/tests/checkasm/hevc_mc.c b/tests/checkasm/hevc_mc.c
index 385c33e..91f9bc2 100644
--- a/tests/checkasm/hevc_mc.c
+++ b/tests/checkasm/hevc_mc.c
@@ -20,13 +20,13 @@ 
 
 #include <string.h>
 
-#include "checkasm.h"
+#include "libavutil/common.h"
+#include "libavutil/intreadwrite.h"
 
 #include "libavcodec/avcodec.h"
 #include "libavcodec/hevcdsp.h"
 
-#include "libavutil/common.h"
-#include "libavutil/intreadwrite.h"
+#include "checkasm.h"
 
 // max PU size + interpolation stencil
 #define BUF_SIZE (FFALIGN(64 + 7, 16) * (64 + 7) * 2)
diff --git a/tests/checkasm/synth_filter.c b/tests/checkasm/synth_filter.c
index 157400b..4b31854 100644
--- a/tests/checkasm/synth_filter.c
+++ b/tests/checkasm/synth_filter.c
@@ -19,12 +19,13 @@ 
  */
 
 #include <math.h>
-#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include "libavutil/internal.h"
 #include "libavutil/intfloat.h"
+
 #include "libavcodec/dcadata.h"
 #include "libavcodec/synth_filter.h"
 
diff --git a/tests/checkasm/v210enc.c b/tests/checkasm/v210enc.c
index 4f5f6ba..10e1791 100644
--- a/tests/checkasm/v210enc.c
+++ b/tests/checkasm/v210enc.c
@@ -19,12 +19,15 @@ 
  */
 
 #include <string.h>
-#include "checkasm.h"
-#include "libavcodec/v210enc.h"
+
 #include "libavutil/common.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/v210enc.h"
+
+#include "checkasm.h"
+
 #define BUF_SIZE 512
 
 #define randomize_buffers(mask)                        \
diff --git a/tests/checkasm/vp8dsp.c b/tests/checkasm/vp8dsp.c
index 40e4061..f3dbfea 100644
--- a/tests/checkasm/vp8dsp.c
+++ b/tests/checkasm/vp8dsp.c
@@ -20,12 +20,12 @@ 
 
 #include <string.h>
 
-#include "libavcodec/avcodec.h"
-#include "libavcodec/vp8dsp.h"
-
 #include "libavutil/common.h"
 #include "libavutil/intreadwrite.h"
 
+#include "libavcodec/avcodec.h"
+#include "libavcodec/vp8dsp.h"
+
 #include "checkasm.h"
 
 #define PIXEL_STRIDE 16