@@ -372,17 +372,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (j = 0; j < w; j++) {
switch (step) {
-#if HAVE_BIGENDIAN
- case 4: outrow[3] = av_bswap16(tab[3][av_bswap16(inrow[3])]); // Fall-through
- case 3: outrow[2] = av_bswap16(tab[2][av_bswap16(inrow[2])]); // Fall-through
- case 2: outrow[1] = av_bswap16(tab[1][av_bswap16(inrow[1])]); // Fall-through
- default: outrow[0] = av_bswap16(tab[0][av_bswap16(inrow[0])]);
-#else
- case 4: outrow[3] = tab[3][inrow[3]]; // Fall-through
- case 3: outrow[2] = tab[2][inrow[2]]; // Fall-through
- case 2: outrow[1] = tab[1][inrow[1]]; // Fall-through
- default: outrow[0] = tab[0][inrow[0]];
-#endif
+ case 4: outrow[3] = av_le2ne16(tab[3][av_le2ne16(inrow[3])]); // Fall-through
+ case 3: outrow[2] = av_le2ne16(tab[2][av_le2ne16(inrow[2])]); // Fall-through
+ case 2: outrow[1] = av_le2ne16(tab[1][av_le2ne16(inrow[1])]); // Fall-through
+ default: outrow[0] = av_le2ne16(tab[0][av_le2ne16(inrow[0])]);
}
outrow += step;
inrow += step;
@@ -437,11 +430,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
-#if HAVE_BIGENDIAN
- outrow[j] = av_bswap16(tab[av_bswap16(inrow[j])]);
-#else
- outrow[j] = tab[inrow[j]];
-#endif
+ outrow[j] = av_le2ne16(tab[av_le2ne16(inrow[j])]);
}
inrow += in_linesize;
outrow += out_linesize;