diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 5f4cb548f0..7a8ace2c74 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -185,7 +185,7 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
 
     if (!desc || !desc->name)
         return AVERROR(EINVAL);
-    if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA))
+    if (desc->flags & ~(AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB | FF_PSEUDOPAL | AV_PIX_FMT_FLAG_ALPHA | AV_PIX_FMT_FLAG_BE))
         return AVERROR(ENOSYS);
     if (format == AV_PIX_FMT_P010LE || format == AV_PIX_FMT_P010BE || format == AV_PIX_FMT_P016LE || format == AV_PIX_FMT_P016BE)
         return AVERROR(ENOSYS);
@@ -197,7 +197,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
         /* for now, only 8-16 bits formats */
         if (c->depth < 8 || c->depth > 16)
             return AVERROR(ENOSYS);
-        if (desc->flags & AV_PIX_FMT_FLAG_BE)
+        /* native-endian only */
+        if (c->depth + c->shift > 8 && !(desc->flags & AV_PIX_FMT_FLAG_BE) == HAVE_BIGENDIAN)
             return AVERROR(ENOSYS);
         if (c->plane >= MAX_PLANES)
             return AVERROR(ENOSYS);
@@ -268,11 +269,11 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4
         EXPAND(1);
         EXPAND(0);
     } else if (draw->format == AV_PIX_FMT_GRAY8 || draw->format == AV_PIX_FMT_GRAY8A ||
-               draw->format == AV_PIX_FMT_GRAY16LE || draw->format == AV_PIX_FMT_YA16LE ||
-               draw->format == AV_PIX_FMT_GRAY9LE  ||
-               draw->format == AV_PIX_FMT_GRAY10LE ||
-               draw->format == AV_PIX_FMT_GRAY12LE ||
-               draw->format == AV_PIX_FMT_GRAY14LE) {
+               draw->format == AV_PIX_FMT_GRAY16 || draw->format == AV_PIX_FMT_YA16 ||
+               draw->format == AV_PIX_FMT_GRAY9  ||
+               draw->format == AV_PIX_FMT_GRAY10 ||
+               draw->format == AV_PIX_FMT_GRAY12 ||
+               draw->format == AV_PIX_FMT_GRAY14) {
         const AVPixFmtDescriptor *desc = draw->desc;
         color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]);
         EXPAND(0);
@@ -331,11 +332,6 @@ void ff_fill_rectangle(FFDrawContext *draw, FFDrawColor *color,
             return;
         p = p0;
 
-        if (HAVE_BIGENDIAN && draw->desc->comp[0].depth > 8) {
-            for (x = 0; 2*x < draw->pixelstep[plane]; x++)
-                color_tmp.comp[plane].u16[x] = av_bswap16(color_tmp.comp[plane].u16[x]);
-        }
-
         /* copy first line from color */
         for (x = 0; x < wp; x++) {
             memcpy(p, color_tmp.comp[plane].u8, draw->pixelstep[plane]);
@@ -426,19 +422,19 @@ static void blend_line16(uint8_t *dst, unsigned src, unsigned alpha,
 
     if (left) {
         unsigned suba = (left * alpha) >> hsub;
-        uint16_t value = AV_RL16(dst);
-        AV_WL16(dst, (value * (0x10001 - suba) + src * suba) >> 16);
+        uint16_t value = AV_RN16A(dst);
+        AV_WN16A(dst, (value * (0x10001 - suba) + src * suba) >> 16);
         dst += dx;
     }
     for (x = 0; x < w; x++) {
-        uint16_t value = AV_RL16(dst);
-        AV_WL16(dst, (value * tau + asrc) >> 16);
+        uint16_t value = AV_RN16A(dst);
+        AV_WN16A(dst, (value * tau + asrc) >> 16);
         dst += dx;
     }
     if (right) {
         unsigned suba = (right * alpha) >> hsub;
-        uint16_t value = AV_RL16(dst);
-        AV_WL16(dst, (value * (0x10001 - suba) + src * suba) >> 16);
+        uint16_t value = AV_RN16A(dst);
+        AV_WN16A(dst, (value * (0x10001 - suba) + src * suba) >> 16);
     }
 }
 
@@ -531,7 +527,7 @@ static void blend_pixel16(uint8_t *dst, unsigned src, unsigned alpha,
     unsigned xmmod = 7 >> l2depth;
     unsigned mbits = (1 << (1 << l2depth)) - 1;
     unsigned mmult = 255 / mbits;
-    uint16_t value = AV_RL16(dst);
+    uint16_t value = AV_RN16A(dst);
 
     for (y = 0; y < h; y++) {
         xm = xm0;
@@ -543,7 +539,7 @@ static void blend_pixel16(uint8_t *dst, unsigned src, unsigned alpha,
         mask += mask_linesize;
     }
     alpha = (t >> shift) * alpha;
-    AV_WL16(dst, ((0x10001 - alpha) * value + alpha * src) >> 16);
+    AV_WN16A(dst, ((0x10001 - alpha) * value + alpha * src) >> 16);
 }
 
 static void blend_pixel(uint8_t *dst, unsigned src, unsigned alpha,
diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 371ff7f722..0ed8ebff5b 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -145,14 +145,14 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUV444P,  AV_PIX_FMT_YUVJ444P,
         AV_PIX_FMT_YUV420P,  AV_PIX_FMT_YUVJ420P,
         AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA420P,
-        AV_PIX_FMT_YUV420P10LE, AV_PIX_FMT_YUVA420P10LE,
-        AV_PIX_FMT_YUV444P10LE, AV_PIX_FMT_YUVA444P10LE,
-        AV_PIX_FMT_YUV420P12LE,
-        AV_PIX_FMT_YUV444P12LE,
-        AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUVA444P16LE,
-        AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUVA420P16LE,
-        AV_PIX_FMT_YUV444P9LE, AV_PIX_FMT_YUVA444P9LE,
-        AV_PIX_FMT_YUV420P9LE, AV_PIX_FMT_YUVA420P9LE,
+        AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUVA420P10,
+        AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUVA444P10,
+        AV_PIX_FMT_YUV420P12,
+        AV_PIX_FMT_YUV444P12,
+        AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUVA444P16,
+        AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUVA420P16,
+        AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUVA444P9,
+        AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUVA420P9,
         AV_PIX_FMT_NONE
     };
 
@@ -272,14 +272,14 @@ static uint8_t *interpolate_bilinear16(uint8_t *dst_color,
     int int_y1 = FFMIN(int_y+1, max_y);
 
     for (i = 0; i < src_linestep; i+=2) {
-        int s00 = AV_RL16(&src[src_linestep * int_x  + i + src_linesize * int_y ]);
-        int s01 = AV_RL16(&src[src_linestep * int_x1 + i + src_linesize * int_y ]);
-        int s10 = AV_RL16(&src[src_linestep * int_x  + i + src_linesize * int_y1]);
-        int s11 = AV_RL16(&src[src_linestep * int_x1 + i + src_linesize * int_y1]);
+        int s00 = AV_RN16A(&src[src_linestep * int_x  + i + src_linesize * int_y ]);
+        int s01 = AV_RN16A(&src[src_linestep * int_x1 + i + src_linesize * int_y ]);
+        int s10 = AV_RN16A(&src[src_linestep * int_x  + i + src_linesize * int_y1]);
+        int s11 = AV_RN16A(&src[src_linestep * int_x1 + i + src_linesize * int_y1]);
         int s0 = (((1<<16) - frac_x)*s00 + frac_x*s01);
         int s1 = (((1<<16) - frac_x)*s10 + frac_x*s11);
 
-        AV_WL16(&dst_color[i], ((int64_t)((1<<16) - frac_y)*s0 + (int64_t)frac_y*s1) >> 32);
+        AV_WN16A(&dst_color[i], ((int64_t)((1<<16) - frac_y)*s0 + (int64_t)frac_y*s1) >> 32);
     }
 
     return dst_color;
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index 22746ebfb1..9a579211d3 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -92,12 +92,12 @@ static int query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
         AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
         AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P,
-        AV_PIX_FMT_YUV420P10LE, AV_PIX_FMT_YUV422P10LE,
-        AV_PIX_FMT_YUV440P10LE, AV_PIX_FMT_YUV444P10LE,
-        AV_PIX_FMT_YUV420P12LE, AV_PIX_FMT_YUV422P12LE,
-        AV_PIX_FMT_YUV440P12LE, AV_PIX_FMT_YUV444P12LE,
+        AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10,
+        AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV444P10,
+        AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12,
+        AV_PIX_FMT_YUV440P12, AV_PIX_FMT_YUV444P12,
         AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
-        AV_PIX_FMT_YUVA420P10LE, AV_PIX_FMT_YUVA422P10LE, AV_PIX_FMT_YUVA444P10LE,
+        AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
         AV_PIX_FMT_GRAY8, FULL_SCALE_YUVJ_FORMATS,
         AV_PIX_FMT_NONE
     };
@@ -134,9 +134,8 @@ static void lowpass_line_c_16(uint8_t *dst8, ptrdiff_t width, const uint8_t *src
         // this calculation is an integer representation of
         // '0.5 * current + 0.25 * above + 0.25 * below'
         // '1 +' is for rounding.
-        src_x   = av_le2ne16(srcp[i]) << 1;
-        dstp[i] = av_le2ne16((1 + src_x + av_le2ne16(srcp_above[i])
-                             + av_le2ne16(srcp_below[i])) >> 2);
+        src_x   = srcp[i] << 1;
+        dstp[i] = (1 + src_x + srcp_above[i] + srcp_below[i]) >> 2;
     }
 }
 
@@ -181,24 +180,23 @@ static void lowpass_line_complex_c_16(uint8_t *dst8, ptrdiff_t width, const uint
         // this calculation is an integer representation of
         // '0.75 * current + 0.25 * above + 0.25 * below - 0.125 * above2 - 0.125 * below2'
         // '4 +' is for rounding.
-        src_le = av_le2ne16(srcp[i]);
+        src_le = srcp[i];
         src_x  = src_le << 1;
-        src_ab = av_le2ne16(srcp_above[i]) + av_le2ne16(srcp_below[i]);
+        src_ab = srcp_above[i] + srcp_below[i];
         dst_le = av_clip((4 + ((src_le + src_x + src_ab) << 1)
-                         - av_le2ne16(srcp_above2[i])
-                         - av_le2ne16(srcp_below2[i])) >> 3, 0, clip_max);
+                         - srcp_above2[i] - srcp_below2[i]) >> 3, 0, clip_max);
         // Prevent over-sharpening:
         // dst must not exceed src when the average of above and below
         // is less than src. And the other way around.
         if (src_ab > src_x) {
             if (dst_le < src_le)
-                dstp[i] = av_le2ne16(src_le);
+                dstp[i] = src_le;
             else
-                dstp[i] = av_le2ne16(dst_le);
+                dstp[i] = dst_le;
         } else if (dst_le > src_le) {
-            dstp[i] = av_le2ne16(src_le);
+            dstp[i] = src_le;
         } else
-            dstp[i] = av_le2ne16(dst_le);
+            dstp[i] = dst_le;
     }
 }
 
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index 699c9c6ae1..8d151f4c2f 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -680,13 +680,13 @@ FATE_FILTER_PIXFMTS-$(CONFIG_NULL_FILTER) += fate-filter-pixfmts-null
 fate-filter-pixfmts-null:  CMD = pixfmts
 
 FATE_FILTER_PIXFMTS-$(CONFIG_PAD_FILTER) += fate-filter-pixfmts-pad
-fate-filter-pixfmts-pad:   CMD = pixfmts "500:400:20:20"
+fate-filter-pixfmts-pad:   CMD = pixfmts "500:400:20:20" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(call ALLYES, TELECINE_FILTER PULLUP_FILTER) += fate-filter-pixfmts-pullup
 fate-filter-pixfmts-pullup: CMD = pixfmts "" "telecine," 25
 
 FATE_FILTER_PIXFMTS-$(CONFIG_ROTATE_FILTER) += fate-filter-pixfmts-rotate
-fate-filter-pixfmts-rotate: CMD = pixfmts "2*PI*n/50"
+fate-filter-pixfmts-rotate: CMD = pixfmts "2*PI*n/50" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(CONFIG_SCALE_FILTER) += fate-filter-pixfmts-scale
 fate-filter-pixfmts-scale: CMD = pixfmts "200:100"
@@ -698,16 +698,16 @@ FATE_FILTER_PIXFMTS-$(CONFIG_SWAPUV_FILTER) += fate-filter-pixfmts-swapuv
 fate-filter-pixfmts-swapuv: CMD = pixfmts
 
 FATE_FILTER_PIXFMTS-$(CONFIG_TINTERLACE_FILTER) += fate-filter-pixfmts-tinterlace_cvlpf
-fate-filter-pixfmts-tinterlace_cvlpf: CMD = pixfmts "interleave_top:cvlpf"
+fate-filter-pixfmts-tinterlace_cvlpf: CMD = pixfmts "interleave_top:cvlpf" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(CONFIG_TINTERLACE_FILTER) += fate-filter-pixfmts-tinterlace_merge
-fate-filter-pixfmts-tinterlace_merge: CMD = pixfmts "merge"
+fate-filter-pixfmts-tinterlace_merge: CMD = pixfmts "merge" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(CONFIG_TINTERLACE_FILTER) += fate-filter-pixfmts-tinterlace_pad
-fate-filter-pixfmts-tinterlace_pad: CMD = pixfmts "pad"
+fate-filter-pixfmts-tinterlace_pad: CMD = pixfmts "pad" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(CONFIG_TINTERLACE_FILTER) += fate-filter-pixfmts-tinterlace_vlpf
-fate-filter-pixfmts-tinterlace_vlpf: CMD = pixfmts "interleave_top:vlpf"
+fate-filter-pixfmts-tinterlace_vlpf: CMD = pixfmts "interleave_top:vlpf" "" "" ne
 
 FATE_FILTER_PIXFMTS-$(CONFIG_TRANSPOSE_FILTER) += fate-filter-pixfmts-transpose
 fate-filter-pixfmts-transpose: CMD = pixfmts "dir=cclock_flip"
diff --git a/tests/ref/fate/filter-pixfmts-pad b/tests/ref/fate/filter-pixfmts-pad
index c863d541f6..b709559336 100644
--- a/tests/ref/fate/filter-pixfmts-pad
+++ b/tests/ref/fate/filter-pixfmts-pad
@@ -6,66 +6,109 @@ bgr0                32207a2de1b2ac7937e940a8459b97c0
 bgr24               f8b65ad845905c7d0c93ca28dfbb826f
 bgra                929aac15e848038e367c250037575f9f
 gbrap               5f16cccab5a17cb766c882e865995167
-gbrap10le           a677322100409f9b1d22136b14bfb534
-gbrap12le           e0e43f838cfbe98086042ba54b5f70be
-gbrap16le           0f4414db67b84a720106d7a3b2435766
+gbrap10(be)         d5f146242e3406fa845ab434378ed9b0
+gbrap10(le)         a677322100409f9b1d22136b14bfb534
+gbrap12(be)         906e13124397f0cd81ae2e8bc075f392
+gbrap12(le)         e0e43f838cfbe98086042ba54b5f70be
+gbrap16(be)         9ccf2819d721472722b0b7da3f122bcb
+gbrap16(le)         0f4414db67b84a720106d7a3b2435766
 gbrp                3c94d39256db2409015df913fd330a90
-gbrp10le            5b356737cd8a396f39bbdadb7cb35e06
-gbrp12le            91fdad0d1edf7bfa2805e2041e8da3cd
-gbrp14le            deb2c3af6b48faa52f6a1f6590a0cdf7
-gbrp16le            a6156d1a37e05ee621b2a343fb158bd6
-gbrp9le             9e827f438e081d334a6cae7e282698b0
+gbrp10(be)          0818312bebc3bb292b9459b05aed24d9
+gbrp10(le)          5b356737cd8a396f39bbdadb7cb35e06
+gbrp12(be)          fd78cb39a47c8910defd5897c84a2583
+gbrp12(le)          91fdad0d1edf7bfa2805e2041e8da3cd
+gbrp14(be)          b46d7b7ce75bdb4531b0b14e4cb8f645
+gbrp14(le)          deb2c3af6b48faa52f6a1f6590a0cdf7
+gbrp16(be)          d325dc6dc6ec17a973ca16ea506dcc73
+gbrp16(le)          a6156d1a37e05ee621b2a343fb158bd6
+gbrp9(be)           c7c840e567c8a300f1e53459d35c59bb
+gbrp9(le)           9e827f438e081d334a6cae7e282698b0
 gray                ddc663a0491df3959d9c5795dceaa72e
-gray10le            e6559c1c8c05ce89f44b465573db44e7
-gray12le            1e6c6757658c7ae8a1f830432c5b7722
-gray14le            af3f2f911c71cb34a8179a3291b5c90f
-gray16le            468bda6155bdc7a7a20c34d6e599fd16
-gray9le             f8f3dfe31ca5fcba828285bceefdab9a
+gray10(be)          99aa33582c0e1b024c27a11ba1fcba7b
+gray10(le)          e6559c1c8c05ce89f44b465573db44e7
+gray12(be)          e4c732c6760ace5e485785a43496d830
+gray12(le)          1e6c6757658c7ae8a1f830432c5b7722
+gray14(be)          c7255f62bcfb865d30adc2757720e5ff
+gray14(le)          af3f2f911c71cb34a8179a3291b5c90f
+gray16(be)          0feca50dda3c94af547cec1e825b3f59
+gray16(le)          468bda6155bdc7a7a20c34d6e599fd16
+gray9(be)           b17ebee33640ecdf460b70d59a98f2ce
+gray9(le)           f8f3dfe31ca5fcba828285bceefdab9a
 nv12                381574979cb04be10c9168540310afad
 nv21                0fdeb2cdd56cf5a7147dc273456fa217
 rgb0                78d500c8361ab6423a4826a00268c908
 rgb24               17f9e2e0c609009acaf2175c42d4a2a5
 rgba                b157c90191463d34fb3ce77b36c96386
-xyz12le             85abf80b77a9236a76ba0b00fcbdea2d
-ya16le              17cbe58356d56ff0f0f00280a31e6ca6
+xyz12(be)           637d73fbe088c9499a2dda5588fdc4fd
+xyz12(le)           85abf80b77a9236a76ba0b00fcbdea2d
+ya16(be)            17a3357f5d61794cd23a810b6b54fb45
+ya16(le)            17cbe58356d56ff0f0f00280a31e6ca6
 ya8                 5fc0f471207ddf7aa01b07027d56b672
 yuv410p             cb871dcc1e84a7ef1d21f9237b88cf6e
 yuv411p             aec2c1740de9a62db0d41f4dda9121b0
 yuv420p             4398e408fc35436ce4b20468946f58b6
-yuv420p10le         74518a7d68457c54da3300e80c683e9c
-yuv420p12le         32086c64c814315aa9253580708a192e
-yuv420p14le         265e9fefb8b92f3cae678eb3cf4e00b4
-yuv420p16le         1ca89e47164d5f2481e39d4ac6eab2ed
-yuv420p9le          59f0209084d1d1dd2861e058d1df63f4
+yuv420p10(be)       e021af22c5813cdd8e082bb2a31e33d6
+yuv420p10(le)       74518a7d68457c54da3300e80c683e9c
+yuv420p12(be)       80a35aecd4a6254109233a941e9e370f
+yuv420p12(le)       32086c64c814315aa9253580708a192e
+yuv420p14(be)       cd7a578d21e5fb2c3d2dd54e88213201
+yuv420p14(le)       265e9fefb8b92f3cae678eb3cf4e00b4
+yuv420p16(be)       2c2006abff6eebd17139607d4858231b
+yuv420p16(le)       1ca89e47164d5f2481e39d4ac6eab2ed
+yuv420p9(be)        3525aae58b23fbe766ed8d2c596e7847
+yuv420p9(le)        59f0209084d1d1dd2861e058d1df63f4
 yuv422p             e43d68568d9f782908ba56bf1e09d5d5
-yuv422p10le         18667cf7f87d8ffe1c4cc3db2100c559
-yuv422p12le         71e32220fa1bbdcac95fb57ba0dbd4f0
-yuv422p14le         a0064be4d29079a811e5a315341da09a
-yuv422p16le         836057e9999c763697c66c21869492b8
-yuv422p9le          3213bed797e7b4cefa4f174dc33bf246
+yuv422p10(be)       dbbc4fbed4a4cdcfc52b77cd326a64cc
+yuv422p10(le)       18667cf7f87d8ffe1c4cc3db2100c559
+yuv422p12(be)       110dbc82453c486de3f79cbe2dcd1482
+yuv422p12(le)       71e32220fa1bbdcac95fb57ba0dbd4f0
+yuv422p14(be)       cc422de987be07fc71bd73b162d21ce3
+yuv422p14(le)       a0064be4d29079a811e5a315341da09a
+yuv422p16(be)       d32ef961672b50a9ff929daedab72645
+yuv422p16(le)       836057e9999c763697c66c21869492b8
+yuv422p9(be)        a5714e9244c3565cbf4dbe97e5cdaf80
+yuv422p9(le)        3213bed797e7b4cefa4f174dc33bf246
 yuv440p             a7e34de74c96b0224fe1381ec1db2ba7
-yuv440p10le         f91a481e27be7ea4a38a878e5e4330a3
-yuv440p12le         0e9953a09ac09fe5f1523b350cf7cb72
+yuv440p10(be)       f87f831c7c8511f3f31d72ab4199b034
+yuv440p10(le)       f91a481e27be7ea4a38a878e5e4330a3
+yuv440p12(be)       02ca4324f64c8db5a005fccc02372621
+yuv440p12(le)       0e9953a09ac09fe5f1523b350cf7cb72
 yuv444p             6bfd89286dc36f2789b77d747ed8fa22
-yuv444p10le         b10afb5fda970dbce8aac5aab981a8cb
-yuv444p12le         8f1b4b0f91d309fdaaec8a1ba6c7107f
-yuv444p14le         2a87a84fa01237de9c08dd7e9ffbf78d
-yuv444p16le         28508867fe7470c3539f8a84e8fb8271
-yuv444p9le          99d39ef897c6037d6c7aa6e7a0398f84
+yuv444p10(be)       ef52233249ac03dd0ab0ac21bf5a4860
+yuv444p10(le)       b10afb5fda970dbce8aac5aab981a8cb
+yuv444p12(be)       57248d70bded12966624ad7287b7f9d3
+yuv444p12(le)       8f1b4b0f91d309fdaaec8a1ba6c7107f
+yuv444p14(be)       17f48a9693850f6b5ebe58afa5ef4d2f
+yuv444p14(le)       2a87a84fa01237de9c08dd7e9ffbf78d
+yuv444p16(be)       7e080bfed69b94ec66f996ae56249408
+yuv444p16(le)       28508867fe7470c3539f8a84e8fb8271
+yuv444p9(be)        b088fcdab772ea7c67091996952fb996
+yuv444p9(le)        99d39ef897c6037d6c7aa6e7a0398f84
 yuva420p            842c27169ecdcf6de79f2b787367b51c
-yuva420p10le        336fcb42c5b665c2028661e73325b359
-yuva420p16le        ff45de790e7bdd3c25d8aad51289aba9
-yuva420p9le         8ef1f3b3e01b5ce222e4caeec3dec396
+yuva420p10(be)      7e352ec163ecb109b4b69197ba9206b0
+yuva420p10(le)      336fcb42c5b665c2028661e73325b359
+yuva420p16(be)      fbdbe6d3632469ee4168eab2b125f278
+yuva420p16(le)      ff45de790e7bdd3c25d8aad51289aba9
+yuva420p9(be)       752ad41b57437a8bbf7afaff16583bd8
+yuva420p9(le)       8ef1f3b3e01b5ce222e4caeec3dec396
 yuva422p            91dcecc4bfdff1f0db9ef8b9b5b9ac2a
-yuva422p10le        1ba292c74c8646fd077a6116142b1bc8
-yuva422p12le        50e59879a9b64ac0fc7f76a110537baa
-yuva422p16le        383226550fe9c93d6e8bf0d45d1423d1
-yuva422p9le         0fb76788c905c6d448143aa3c5eae116
+yuva422p10(be)      60d5f623492b0272b6991b65fb6d0d07
+yuva422p10(le)      1ba292c74c8646fd077a6116142b1bc8
+yuva422p12(be)      943976a6f02215248797bc59c81482d6
+yuva422p12(le)      50e59879a9b64ac0fc7f76a110537baa
+yuva422p16(be)      cdf2eda328edeb647c4b9031d13d2623
+yuva422p16(le)      383226550fe9c93d6e8bf0d45d1423d1
+yuva422p9(be)       10028ca99a2c36f2c6a7e451a05b79c7
+yuva422p9(le)       0fb76788c905c6d448143aa3c5eae116
 yuva444p            fb60941a57596b277417a3c7c00aa194
-yuva444p10le        251ea4ead8300d752eb355a08cbb0352
-yuva444p12le        f38b7c5747b43bcc6d647f143cb069cf
-yuva444p16le        5b65287e1862d2d9f1ad2cfdcde94661
-yuva444p9le         e6946c10b94c271e7ea24b3bcff314e1
+yuva444p10(be)      d1ba797e579c80c8861bc9c4346cc365
+yuva444p10(le)      251ea4ead8300d752eb355a08cbb0352
+yuva444p12(be)      a632c9c7778227abbb6e7f6935c24617
+yuva444p12(le)      f38b7c5747b43bcc6d647f143cb069cf
+yuva444p16(be)      3b78740c00b98d11699755685964e105
+yuva444p16(le)      5b65287e1862d2d9f1ad2cfdcde94661
+yuva444p9(be)       ffa19028be2f9418e0da02a62da77bc6
+yuva444p9(le)       e6946c10b94c271e7ea24b3bcff314e1
 yuvj411p            87dbac57b211ab4823c1abbd702f1516
 yuvj420p            1abef62bce65131ca4913eb2006fd860
 yuvj422p            198c57b519e2be14b150889bd7f94898
diff --git a/tests/ref/fate/filter-pixfmts-rotate b/tests/ref/fate/filter-pixfmts-rotate
index e4ed81e71a..01347606e1 100644
--- a/tests/ref/fate/filter-pixfmts-rotate
+++ b/tests/ref/fate/filter-pixfmts-rotate
@@ -13,22 +13,36 @@ rgb24               f4438057d046e6d98ade4e45294b21be
 rgba                b6e1b441c365e03b5ffdf9b7b68d9a0c
 yuv410p             5d4d992a7728431aa4e0700f87fb7fd8
 yuv420p             a014c7eb7a8385d1dd092b7a583f1bff
-yuv420p10le         15c83294ef560d57f25d16ae6e0fc70c
-yuv420p12le         c19a477a07fcf88e37ab37b416d064c0
-yuv420p16le         dae8da9edd4255051e3e546ae7ed9bd3
-yuv420p9le          83a6d32c91c15a3bc334bb9abf920654
+yuv420p10(be)       f9b154364efaa1af376fa6d8eeae6955
+yuv420p10(le)       15c83294ef560d57f25d16ae6e0fc70c
+yuv420p12(be)       34da9c4e289124122ba36a9d4fb133fa
+yuv420p12(le)       c19a477a07fcf88e37ab37b416d064c0
+yuv420p16(be)       268b07358d8dc733ee81d0b87990d5af
+yuv420p16(le)       dae8da9edd4255051e3e546ae7ed9bd3
+yuv420p9(be)        37f0476e8458a93d3d22db568f617aca
+yuv420p9(le)        83a6d32c91c15a3bc334bb9abf920654
 yuv444p             8f90fb3a757878c545a8bfe5d19a9bab
-yuv444p10le         6d736fa464ff2de2b07e0a56af8444b7
-yuv444p12le         08a81b2ea9c7c8b447e40ef8f4a46a4a
-yuv444p16le         781c22317c02b3dd4225709000bdb847
-yuv444p9le          caef947b8aff5b52285385c6ae9b2439
+yuv444p10(be)       6683d5cb82c708d5f3a2a89d0311f7a4
+yuv444p10(le)       6d736fa464ff2de2b07e0a56af8444b7
+yuv444p12(be)       04320ad158450ee158f84a27c6325702
+yuv444p12(le)       08a81b2ea9c7c8b447e40ef8f4a46a4a
+yuv444p16(be)       aee24ab2e9a4656f889399f1b0d98639
+yuv444p16(le)       781c22317c02b3dd4225709000bdb847
+yuv444p9(be)        ac09917e5d2abc82c0d260007f4dfd77
+yuv444p9(le)        caef947b8aff5b52285385c6ae9b2439
 yuva420p            b227672e56215e184e702c02a771d7f3
-yuva420p10le        01e94ee605714396e69b013c11dda348
-yuva420p16le        b1930ab28ffe031c78ca28d3406311c8
-yuva420p9le         0e9c9803aaaddc9f38e419de587793c2
+yuva420p10(be)      f66e7d677625380f7504867fab51305c
+yuva420p10(le)      01e94ee605714396e69b013c11dda348
+yuva420p16(be)      76e5e65eae1e7c5681a397a3462f4a9d
+yuva420p16(le)      b1930ab28ffe031c78ca28d3406311c8
+yuva420p9(be)       48dfa24cf0ea3864f35285074e8fa888
+yuva420p9(le)       0e9c9803aaaddc9f38e419de587793c2
 yuva444p            459fad5abfd16db9bb6a52761dc74cc1
-yuva444p10le        92f820d3481b7ebcb48b98a73e7b4c90
-yuva444p16le        2ed56ea50fafda4d226c9b133755dad8
-yuva444p9le         4eeb5988df0740fea720da1e31bbb829
+yuva444p10(be)      fa16bae4fc25429deb944ffa9f5b28a0
+yuva444p10(le)      92f820d3481b7ebcb48b98a73e7b4c90
+yuva444p16(be)      c80c1899789a6411d0025730efc8f01c
+yuva444p16(le)      2ed56ea50fafda4d226c9b133755dad8
+yuva444p9(be)       4903fde22b15d28da90761ac1cfcb1c5
+yuva444p9(le)       4eeb5988df0740fea720da1e31bbb829
 yuvj420p            8f3d8f1b4577d11082d5ab8a901e048d
 yuvj444p            b161e6d5a941e2a4bb7bc56ef8af623f
diff --git a/tests/ref/fate/filter-pixfmts-tinterlace_cvlpf b/tests/ref/fate/filter-pixfmts-tinterlace_cvlpf
index 99703fa1af..60cb3088a4 100644
--- a/tests/ref/fate/filter-pixfmts-tinterlace_cvlpf
+++ b/tests/ref/fate/filter-pixfmts-tinterlace_cvlpf
@@ -2,23 +2,34 @@ gray                9849d71519ae9c584ae8abfa8adb2f8e
 yuv410p             44ee4b74b95c82d6f79ddf53b5e3aa9d
 yuv411p             5fa9d1fba7adfd6f7fa04464332b631a
 yuv420p             ee9591ea3ab06c73be902c4b8868c69e
-yuv420p10le         19b2dcf5e82725b2c9e366d5d3a4b67b
-yuv420p12le         e5b76eb58cab2dfa42738f665d8b8059
+yuv420p10(be)       e976c5fb9ddbae162539e6586be567e0
+yuv420p10(le)       19b2dcf5e82725b2c9e366d5d3a4b67b
+yuv420p12(be)       11a6962ab6de27b6f8022e4bd0058be7
+yuv420p12(le)       e5b76eb58cab2dfa42738f665d8b8059
 yuv422p             b1be7b55567bde86d655adf80fac1257
-yuv422p10le         66f7433c7423d6289ee20c19c4e8dd90
-yuv422p12le         b4a4b5ed81341b36f685b14b2bb8a798
+yuv422p10(be)       1c61c36a2731be190113aaf08acbc15f
+yuv422p10(le)       66f7433c7423d6289ee20c19c4e8dd90
+yuv422p12(be)       0d7f1775203d9780dfeca24061f53a42
+yuv422p12(le)       b4a4b5ed81341b36f685b14b2bb8a798
 yuv440p             ddf6ee697f4ff4f90d501e6869392309
-yuv440p10le         7e44a92d9e47e15f0728b125725ccd41
-yuv440p12le         c2cac82661e10be4917bd9dacb419fce
+yuv440p10(be)       eb263ac9c8fcc2d3701a833fc8e4f000
+yuv440p10(le)       7e44a92d9e47e15f0728b125725ccd41
+yuv440p12(be)       2ffc5d2614c74c85e134176621bd0251
+yuv440p12(le)       c2cac82661e10be4917bd9dacb419fce
 yuv444p             7cb5d0c0997c8c2545a16bfc4cb9fd6d
-yuv444p10le         08fb13c69b40229014a6ccf0bdd5498f
-yuv444p12le         796c5559b9f426470eb2997c21be5d14
+yuv444p10(be)       39e3397e62a681a871e0fe6341f416ea
+yuv444p10(le)       08fb13c69b40229014a6ccf0bdd5498f
+yuv444p12(be)       74b16d281dc65201c0d454e816904653
+yuv444p12(le)       796c5559b9f426470eb2997c21be5d14
 yuva420p            ee0761e2f76ec441c545feede77103e4
-yuva420p10le        4bb6b3a1cbf2fd1fe5aefcc11ce8029f
+yuva420p10(be)      c4f223c98304d51b1bf3ac85586542a5
+yuva420p10(le)      4bb6b3a1cbf2fd1fe5aefcc11ce8029f
 yuva422p            a8da2806e21a88449079faa7f4303ffa
-yuva422p10le        d2965b5b5a43a7165badaff0718a17d8
+yuva422p10(be)      94fd1d508fdb47da97f830a1b690371e
+yuva422p10(le)      d2965b5b5a43a7165badaff0718a17d8
 yuva444p            a3f57734d6f72bdf37f8f612ea7cce63
-yuva444p10le        e020512901fd9ac7088898a4e3a8c7c1
+yuva444p10(be)      7fde326349306482cd9f5d99f3202d73
+yuva444p10(le)      e020512901fd9ac7088898a4e3a8c7c1
 yuvj420p            9f358e311b694bcd01e1a07d1120ade5
 yuvj422p            9a7628a9f1630d35c7176951ddc1b2f6
 yuvj440p            112fe35292c687746ec0c622a42c611b
diff --git a/tests/ref/fate/filter-pixfmts-tinterlace_merge b/tests/ref/fate/filter-pixfmts-tinterlace_merge
index fa6151c272..cbcffd6998 100644
--- a/tests/ref/fate/filter-pixfmts-tinterlace_merge
+++ b/tests/ref/fate/filter-pixfmts-tinterlace_merge
@@ -2,23 +2,34 @@ gray                fab3a7abc4f076cf926205aeacadbe51
 yuv410p             d4506e49eeb64c7ce714c07597e7dd69
 yuv411p             2e8bb385cb4a53a0f3771815020f7213
 yuv420p             c967d3d5f3200d1b2417b0f2356f12fc
-yuv420p10le         404d90eca9b93f7c0949be23187804c7
-yuv420p12le         eb2ef81b82f1342618e4c9fe8e086592
+yuv420p10(be)       940f0a53cca463a306ed134397264f51
+yuv420p10(le)       404d90eca9b93f7c0949be23187804c7
+yuv420p12(be)       b3ad6a039755310863c53b1fe00d2992
+yuv420p12(le)       eb2ef81b82f1342618e4c9fe8e086592
 yuv422p             febaa84ea2e3246af742a7ed37c030f6
-yuv422p10le         0dc5f3833c0f11a0fcd0422d76508c10
-yuv422p12le         190eb7e76af5fc481588ded472901b58
+yuv422p10(be)       dbc69a83016ad55248dad3d9469d3264
+yuv422p10(le)       0dc5f3833c0f11a0fcd0422d76508c10
+yuv422p12(be)       839a29be465442ab581a13fe1a452dd2
+yuv422p12(le)       190eb7e76af5fc481588ded472901b58
 yuv440p             13a934b42df65f11e153314ebb4f311e
-yuv440p10le         7fabea51d6e52b718ef3ab919b24f8d2
-yuv440p12le         c7b138374a18f258bdd1a2d21b4421b0
+yuv440p10(be)       0580da29240232b539dd2f72cb6a973a
+yuv440p10(le)       7fabea51d6e52b718ef3ab919b24f8d2
+yuv440p12(be)       585f592ecbf39002d7b8f81ce13bb878
+yuv440p12(le)       c7b138374a18f258bdd1a2d21b4421b0
 yuv444p             45d4466f5689942a4effb0fd23e44949
-yuv444p10le         fde95627ba0e66be7ec863386b3e5ca6
-yuv444p12le         c1e15c934ce3bc562a869dd78c75db17
+yuv444p10(be)       91846fb7ff97f6af1ed2ca8da0c096ac
+yuv444p10(le)       fde95627ba0e66be7ec863386b3e5ca6
+yuv444p12(be)       59dcc1d71a749d9ba6f81ca1562f963e
+yuv444p12(le)       c1e15c934ce3bc562a869dd78c75db17
 yuva420p            dc1173a07c3f993b277ea0c94d513e1f
-yuva420p10le        d85972762437105a932759c4bb9759c9
+yuva420p10(be)      0993e89dc56040c6ab52d521390addaf
+yuva420p10(le)      d85972762437105a932759c4bb9759c9
 yuva422p            ca200be80e5bfdb159e1aea57129ed3a
-yuva422p10le        06d4f79ee2ddf31d9fe15af8ca573f46
+yuva422p10(be)      42990c7d06ca6bc4fd39a339ec812f64
+yuva422p10(le)      06d4f79ee2ddf31d9fe15af8ca573f46
 yuva444p            9f39c35d6899dcb8b9a9b07c339ca365
-yuva444p10le        b0c54fc3efad73f252d86127407aa1fd
+yuva444p10(be)      f27e329407186341e0b2b4954b24c4bf
+yuva444p10(le)      b0c54fc3efad73f252d86127407aa1fd
 yuvj420p            844359293bb6ff81549f3fc0090cc587
 yuvj422p            526af049d43974822baa7b48aa1e1098
 yuvj440p            af9285194da8efbc40d93bf8109f9dc5
diff --git a/tests/ref/fate/filter-pixfmts-tinterlace_pad b/tests/ref/fate/filter-pixfmts-tinterlace_pad
index 8f6b1c42e2..7121e6c2d6 100644
--- a/tests/ref/fate/filter-pixfmts-tinterlace_pad
+++ b/tests/ref/fate/filter-pixfmts-tinterlace_pad
@@ -2,23 +2,34 @@ gray                7ef396fecd8d1c9fe32173e4415ba671
 yuv410p             35bc11d0d32efc9e9a969be7d720f4e6
 yuv411p             17ef3cd22a74f7368b5e02f68779f294
 yuv420p             93d5b6a4c44d67e4d4447e8dd0bf3d33
-yuv420p10le         14e754c6e9d41cb048ce3c93512d7d35
-yuv420p12le         ce54a2e38d121a7575dff30542facaad
+yuv420p10(be)       b9e80c2171c879b082c4d38dc6392550
+yuv420p10(le)       14e754c6e9d41cb048ce3c93512d7d35
+yuv420p12(be)       b66d35bff90709a474bffaf940f8115c
+yuv420p12(le)       ce54a2e38d121a7575dff30542facaad
 yuv422p             3ee40b0b6533b9183764b85c853ec3f9
-yuv422p10le         d4b61a84b93e74b07b7020ceed40e39e
-yuv422p12le         8fd90be12a97307645ecfcd09d576643
+yuv422p10(be)       4afd07d23eb9d9d4f0ec803c4f71ab03
+yuv422p10(le)       d4b61a84b93e74b07b7020ceed40e39e
+yuv422p12(be)       aa1032db2dad8a71334e30931c1d5ce5
+yuv422p12(le)       8fd90be12a97307645ecfcd09d576643
 yuv440p             1d3c1258a51d09e778cd8368b1a4126f
-yuv440p10le         29d116cb550a05920e5619ab58284d30
-yuv440p12le         d7518f941a3b2c137f944afe9da816a1
+yuv440p10(be)       fdb301395903e74761e29205a9fd9d36
+yuv440p10(le)       29d116cb550a05920e5619ab58284d30
+yuv440p12(be)       c2faf1197b887c0eeba13e73147920b2
+yuv440p12(le)       d7518f941a3b2c137f944afe9da816a1
 yuv444p             1093568ad8f479ec20e738d018dd3f8f
-yuv444p10le         c65233e1d8b01f3369c20738f7386801
-yuv444p12le         70dc51a857bfb215b3a81fceb114b74c
+yuv444p10(be)       28e051601bb569beb86b7764b4a2f7cc
+yuv444p10(le)       c65233e1d8b01f3369c20738f7386801
+yuv444p12(be)       84b7cf9ed3e065050a8292e87522e079
+yuv444p12(le)       70dc51a857bfb215b3a81fceb114b74c
 yuva420p            4588aef20c0010e514550c9391219724
-yuva420p10le        3181e84fd7aaed606bb86eecd2e13f20
+yuva420p10(be)      70929e9650327b3a63125c2e319cc537
+yuva420p10(le)      3181e84fd7aaed606bb86eecd2e13f20
 yuva422p            3426ed1ac9429202d8c29fa62a04d4c3
-yuva422p10le        c00acd7c437d41755dff09c5ca3642cf
+yuva422p10(be)      6682c4865f953db28b992806425ebb91
+yuva422p10(le)      c00acd7c437d41755dff09c5ca3642cf
 yuva444p            1b9fc791c7d774b4ba8c9dc836f78cf5
-yuva444p10le        616b42a232c83b8f9e5c5168ec4b5da5
+yuva444p10(be)      2eb61e7d6a656252fc044da731eb5bed
+yuva444p10(le)      616b42a232c83b8f9e5c5168ec4b5da5
 yuvj420p            9a872e0c1b3c0b6fe856415696b758bd
 yuvj422p            da3c9ef25528a2ee96746ce44e6969f3
 yuvj440p            a9a5495c6b0e2bf6e561998ea1c356a7
diff --git a/tests/ref/fate/filter-pixfmts-tinterlace_vlpf b/tests/ref/fate/filter-pixfmts-tinterlace_vlpf
index 5a5f80b115..56123a2aaf 100644
--- a/tests/ref/fate/filter-pixfmts-tinterlace_vlpf
+++ b/tests/ref/fate/filter-pixfmts-tinterlace_vlpf
@@ -2,23 +2,34 @@ gray                b79791449947c25cd5b36d9d3b9d1831
 yuv410p             5bc03f4cf6b441b421f0fdaeeff1e9ed
 yuv411p             19046df1876c46ed1ef0458680270bd3
 yuv420p             69c743b84996be9430b051a55cfbcb29
-yuv420p10le         85948ad609abded6b50882d459f5a2f8
-yuv420p12le         7cebe45f51bdadc766f66c68db8d347d
+yuv420p10(be)       a52ca4a13625ced9f9ee1f590d2a2b21
+yuv420p10(le)       85948ad609abded6b50882d459f5a2f8
+yuv420p12(be)       93e61aee0063c7261b7b0e98d011279c
+yuv420p12(le)       7cebe45f51bdadc766f66c68db8d347d
 yuv422p             d710ccd1941f6f389c97a09bc977e709
-yuv422p10le         c54873f77dac1d710fb2aa1b0ce2669c
-yuv422p12le         94a527bb787b9d121ffbbcb3a6c545d8
+yuv422p10(be)       8af196aadbfc7fd1c385d9e8879ded4d
+yuv422p10(le)       c54873f77dac1d710fb2aa1b0ce2669c
+yuv422p12(be)       551f767bbf33505f711fbf571c8ac799
+yuv422p12(le)       94a527bb787b9d121ffbbcb3a6c545d8
 yuv440p             1a482a23fe5a9b7d02388c299fd0a423
-yuv440p10le         506efa287ecce9c951da2039fa1de2ae
-yuv440p12le         631bcf190f409ccbc5c27b9f0f6ba5e2
+yuv440p10(be)       33b782a7bc13574223964d2b21bcbb4b
+yuv440p10(le)       506efa287ecce9c951da2039fa1de2ae
+yuv440p12(be)       b8fe7cfbfdd170e388308893f700c36a
+yuv440p12(le)       631bcf190f409ccbc5c27b9f0f6ba5e2
 yuv444p             c968a92f4b7ab6706ee9b425eb5345b5
-yuv444p10le         0af437e635d49feccf7dfae201e6dfc5
-yuv444p12le         2e9e9f7caae1fae3b026810246fc6ac1
+yuv444p10(be)       5d56342498379edaa29fd88e3af6fdd0
+yuv444p10(le)       0af437e635d49feccf7dfae201e6dfc5
+yuv444p12(be)       83e0ffbc306156f6bf63add302719983
+yuv444p12(le)       2e9e9f7caae1fae3b026810246fc6ac1
 yuva420p            3f89a166f309c0cda8b91a9e8a0ce937
-yuva420p10le        79de1cc549c03d4893cf6f1aca86e057
+yuva420p10(be)      bd4e138c4703b584114085c989447aed
+yuva420p10(le)      79de1cc549c03d4893cf6f1aca86e057
 yuva422p            ef8fdbe910d68e88e98227b0e99fb5a6
-yuva422p10le        257a4aec41f9b5412179272d8a7fb6f7
+yuva422p10(be)      80fd3addc80ee4d3ded0f7523d8f143f
+yuva422p10(le)      257a4aec41f9b5412179272d8a7fb6f7
 yuva444p            3662eadd5f61a6edbc9d715ea8591415
-yuva444p10le        0905cf5b7f42c11be3f0486a66533c71
+yuva444p10(be)      1dd5125963c528090863948ae1a2de2b
+yuva444p10(le)      0905cf5b7f42c11be3f0486a66533c71
 yuvj420p            14c4390b319c5d679184503309060ac3
 yuvj422p            bbe00a26526931b72a024febe1cd6b90
 yuvj440p            f654cf28b7879c6a6c950c3cb9612580
