aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qtrle.c
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2019-02-26 10:37:32 +0100
committerMartin Vignali <martin.vignali@gmail.com>2019-03-04 13:03:39 +0100
commit5496a734882cad54fda2c3528f16488dcac3b0a1 (patch)
treebaaba49cf2185f4161e43231e33573912d79540b /libavcodec/qtrle.c
parent9cb576fc1e3d58df3afbe2b23cada466ad8297cb (diff)
downloadffmpeg-5496a734882cad54fda2c3528f16488dcac3b0a1.tar.gz
avcodec/qtrle : avoid swap in 32bpp decoding on little endian
improve speed on little endian benchmark on x86_64 : mainly raw : 33fps -> 38fps mainly rle : 128fps -> 153 fps
Diffstat (limited to 'libavcodec/qtrle.c')
-rw-r--r--libavcodec/qtrle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index 6155b4f3e3..bb55ba8a86 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -367,7 +367,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
} else if (rle_code < 0) {
/* decode the run length code */
rle_code = -rle_code;
- argb = bytestream2_get_be32(&s->g);
+ argb = bytestream2_get_ne32(&s->g);
CHECK_PIXEL_PTR(rle_code * 4);
@@ -380,7 +380,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
/* copy pixels directly to output */
while (rle_code--) {
- argb = bytestream2_get_be32(&s->g);
+ argb = bytestream2_get_ne32(&s->g);
AV_WN32A(rgb + pixel_ptr, argb);
pixel_ptr += 4;
}
@@ -416,7 +416,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx)
break;
case 32:
- avctx->pix_fmt = AV_PIX_FMT_RGB32;
+ avctx->pix_fmt = AV_PIX_FMT_ARGB;
break;
default: