[FFmpeg-cvslog] avcodec/qtrle : 32bpp dec copy two raw argb value at the same time
ffmpeg | branch: master | Martin Vignali | Tue Feb 26 10:38:10 2019 +0100| [3278ea67c8f2a7c1aea8fd3114b35983791e6732] | committer: Martin Vignali avcodec/qtrle : 32bpp dec copy two raw argb value at the same time benchmark on x86_64 : 38 fps -> 40 fps > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3278ea67c8f2a7c1aea8fd3114b35983791e6732 --- libavcodec/qtrle.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index bb55ba8a86..febfea3029 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -346,7 +346,7 @@ static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change) { -int rle_code; +int rle_code, rle_code_half; int pixel_ptr; int row_inc = s->frame->linesize[0]; unsigned int argb; @@ -379,10 +379,15 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change CHECK_PIXEL_PTR(rle_code * 4); /* copy pixels directly to output */ -while (rle_code--) { -argb = bytestream2_get_ne32(&s->g); -AV_WN32A(rgb + pixel_ptr, argb); -pixel_ptr += 4; +rle_code_half = rle_code / 2; +while (rle_code_half--) { /* copy 2 argb raw value at the same time */ +AV_WN64A(rgb + pixel_ptr, bytestream2_get_ne64(&s->g)); +pixel_ptr += 8; +} + +if (rle_code % 2 != 0){ /* not even raw value */ +AV_WN32A(rgb + pixel_ptr, bytestream2_get_ne32(&s->g)); +pixel_ptr += 4; } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/qtrle : avoid swap in 32bpp decoding on little endian
ffmpeg | branch: master | Martin Vignali | Tue Feb 26 10:37:32 2019 +0100| [5496a734882cad54fda2c3528f16488dcac3b0a1] | committer: Martin Vignali 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 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5496a734882cad54fda2c3528f16488dcac3b0a1 --- libavcodec/qtrle.c | 6 +++--- libavcodec/version.h | 2 +- 2 files changed, 4 insertions(+), 4 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: diff --git a/libavcodec/version.h b/libavcodec/version.h index 7c3897e2d4..309e4111cb 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MINOR 47 -#define LIBAVCODEC_VERSION_MICRO 102 +#define LIBAVCODEC_VERSION_MICRO 103 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate/qtrle : change 32b test to output bgra instead of rgb24
ffmpeg | branch: master | Martin Vignali | Tue Feb 26 10:36:34 2019 +0100| [9cb576fc1e3d58df3afbe2b23cada466ad8297cb] | committer: Martin Vignali fate/qtrle : change 32b test to output bgra instead of rgb24 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9cb576fc1e3d58df3afbe2b23cada466ad8297cb --- tests/fate/qtrle.mak | 2 +- tests/ref/fate/qtrle-32bit | 52 +++--- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/fate/qtrle.mak b/tests/fate/qtrle.mak index 774a81652b..1f26ffea7b 100644 --- a/tests/fate/qtrle.mak +++ b/tests/fate/qtrle.mak @@ -17,7 +17,7 @@ FATE_QTRLE += fate-qtrle-24bit fate-qtrle-24bit: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/aletrek-rle.mov FATE_QTRLE += fate-qtrle-32bit -fate-qtrle-32bit: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/ultra_demo_720_480_32bpp_rle.mov -pix_fmt rgb24 +fate-qtrle-32bit: CMD = framecrc -i $(TARGET_SAMPLES)/qtrle/ultra_demo_720_480_32bpp_rle.mov -pix_fmt bgra FATE_SAMPLES_AVCONV-$(call DEMDEC, MOV, QTRLE) += $(FATE_QTRLE) fate-qtrle: $(FATE_QTRLE) diff --git a/tests/ref/fate/qtrle-32bit b/tests/ref/fate/qtrle-32bit index aaaf8d6470..5e2b58dad4 100644 --- a/tests/ref/fate/qtrle-32bit +++ b/tests/ref/fate/qtrle-32bit @@ -3,29 +3,29 @@ #codec_id 0: rawvideo #dimensions 0: 720x480 #sar 0: 0/1 -0, 0, 0,1, 1036800, 0x2a90d062 -0, 1, 1,1, 1036800, 0x6565aded -0, 2, 2,1, 1036800, 0xf0b587d2 -0, 3, 3,1, 1036800, 0xf0b4e53f -0, 4, 4,1, 1036800, 0x5ba4b96a -0, 5, 5,1, 1036800, 0x501df9c1 -0, 6, 6,1, 1036800, 0xcf45b940 -0, 7, 7,1, 1036800, 0xa454df07 -0, 8, 8,1, 1036800, 0xc504d152 -0, 9, 9,1, 1036800, 0xd90ecac7 -0, 10, 10,1, 1036800, 0xe30368df -0, 11, 11,1, 1036800, 0x0ca35522 -0, 12, 12,1, 1036800, 0xe76b8d43 -0, 13, 13,1, 1036800, 0x7c85a447 -0, 14, 14,1, 1036800, 0x3e2d1b5f -0, 15, 15,1, 1036800, 0x230fa5a6 -0, 16, 16,1, 1036800, 0x4fad025e -0, 17, 17,1, 1036800, 0x7d3366ae -0, 18, 18,1, 1036800, 0xa83720f7 -0, 19, 19,1, 1036800, 0x5dbd13b1 -0, 20, 20,1, 1036800, 0xd0ebd56d -0, 21, 21,1, 1036800, 0x4d7c67f3 -0, 22, 22,1, 1036800, 0x226baa3f -0, 23, 23,1, 1036800, 0xc0e93acf -0, 24, 24,1, 1036800, 0x5a466c17 -0, 25, 25,1, 1036800, 0xfdb7d2ea +0, 0, 0,1, 1382400, 0xfe6e6fd3 +0, 1, 1,1, 1382400, 0x3c7809c8 +0, 2, 2,1, 1382400, 0x06901a04 +0, 3, 3,1, 1382400, 0xd7d7c910 +0, 4, 4,1, 1382400, 0x017e8fda +0, 5, 5,1, 1382400, 0xab9ee842 +0, 6, 6,1, 1382400, 0x08615b93 +0, 7, 7,1, 1382400, 0x105cb681 +0, 8, 8,1, 1382400, 0xd9dd224f +0, 9, 9,1, 1382400, 0x058cabbf +0, 10, 10,1, 1382400, 0x73424fc0 +0, 11, 11,1, 1382400, 0x39d0a78b +0, 12, 12,1, 1382400, 0x956d1393 +0, 13, 13,1, 1382400, 0xe4aff472 +0, 14, 14,1, 1382400, 0x83ff20ce +0, 15, 15,1, 1382400, 0xb53383df +0, 16, 16,1, 1382400, 0x181e55e8 +0, 17, 17,1, 1382400, 0x0716c90c +0, 18, 18,1, 1382400, 0x092aae25 +0, 19, 19,1, 1382400, 0x0a23b4cb +0, 20, 20,1, 1382400, 0xe72000b0 +0, 21, 21,1, 1382400, 0x0b8d02e8 +0, 22, 22,1, 1382400, 0xec2a3b0d +0, 23, 23,1, 1382400, 0x4ddc4e19 +0, 24, 24,1, 1382400, 0xc4656abb +0, 25, 25,1, 1382400, 0x60d78517 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/qtrle : improve 24bbp decoding speed
ffmpeg | branch: master | Martin Vignali | Tue Feb 26 10:38:25 2019 +0100| [88d0be1c0eea482e160f90d931547803df2df8d6] | committer: Martin Vignali avcodec/qtrle : improve 24bbp decoding speed benchmark on x86_64 : mainly raw data : 20 -> 39 fps mainly rle data : 97 -> 119fps > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=88d0be1c0eea482e160f90d931547803df2df8d6 --- libavcodec/qtrle.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index febfea3029..a744d7ba68 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -297,10 +297,11 @@ static void qtrle_decode_16bpp(QtrleContext *s, int row_ptr, int lines_to_change static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change) { -int rle_code; +int rle_code, rle_code_half; int pixel_ptr; int row_inc = s->frame->linesize[0]; -uint8_t r, g, b; +uint8_t b; +uint16_t rg; uint8_t *rgb = s->frame->data[0]; int pixel_limit = s->frame->linesize[0] * s->avctx->height; @@ -318,25 +319,31 @@ static void qtrle_decode_24bpp(QtrleContext *s, int row_ptr, int lines_to_change } else if (rle_code < 0) { /* decode the run length code */ rle_code = -rle_code; -r = bytestream2_get_byte(&s->g); -g = bytestream2_get_byte(&s->g); +rg = bytestream2_get_ne16(&s->g); b = bytestream2_get_byte(&s->g); CHECK_PIXEL_PTR(rle_code * 3); while (rle_code--) { -rgb[pixel_ptr++] = r; -rgb[pixel_ptr++] = g; -rgb[pixel_ptr++] = b; +AV_WN16A(rgb + pixel_ptr, rg); +rgb[pixel_ptr + 2] = b; +pixel_ptr += 3; } } else { CHECK_PIXEL_PTR(rle_code * 3); -/* copy pixels directly to output */ -while (rle_code--) { -rgb[pixel_ptr++] = bytestream2_get_byte(&s->g); -rgb[pixel_ptr++] = bytestream2_get_byte(&s->g); -rgb[pixel_ptr++] = bytestream2_get_byte(&s->g); +rle_code_half = rle_code / 2; + +while (rle_code_half--) { /* copy 2 raw rgb value at the same time */ +AV_WN32A(rgb + pixel_ptr, bytestream2_get_ne32(&s->g)); /* rgbr */ +AV_WN16A(rgb + pixel_ptr + 4, bytestream2_get_ne16(&s->g)); /* rgbr */ +pixel_ptr += 6; +} + +if (rle_code % 2 != 0){ /* not even raw value */ +AV_WN16A(rgb + pixel_ptr, bytestream2_get_ne16(&s->g)); +rgb[pixel_ptr + 2] = bytestream2_get_byte(&s->g); +pixel_ptr += 3; } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: use vpx_codec_vp8_dx/cx for libvpx-vp8 checking
ffmpeg | branch: master | Guo, Yejun | Tue Mar 5 06:09:18 2019 +0800| [d9b2668766e3e924d4ebb3c6531b449874e13666] | committer: James Almer configure: use vpx_codec_vp8_dx/cx for libvpx-vp8 checking Signed-off-by: Guo, Yejun Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9b2668766e3e924d4ebb3c6531b449874e13666 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 4c39da13d7..a5cd279838 100755 --- a/configure +++ b/configure @@ -6226,12 +6226,12 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h enabled libvpx&& { enabled libvpx_vp8_decoder && { check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || -check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || +check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" || die "ERROR: libvpx decoder version must be >=1.4.0"; } enabled libvpx_vp8_encoder && { check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || -check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx || +check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" || die "ERROR: libvpx encoder version must be >=1.4.0"; } enabled libvpx_vp9_decoder && { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: add missing pthreads extralibs dependency for libvpx-vp9
ffmpeg | branch: master | Guo, Yejun | Tue Mar 5 06:09:11 2019 +0800| [402bf262375dfecd0e90d7acc67c238abe952fc3] | committer: James Almer configure: add missing pthreads extralibs dependency for libvpx-vp9 Signed-off-by: Guo, Yejun Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=402bf262375dfecd0e90d7acc67c238abe952fc3 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 3042ab9176..4c39da13d7 100755 --- a/configure +++ b/configure @@ -6236,11 +6236,11 @@ enabled libvpx&& { } enabled libvpx_vp9_decoder && { check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || -check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs" +check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } enabled libvpx_vp9_encoder && { check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || -check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs" +check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then die "libvpx enabled but no supported decoders found" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: allow enabling libvpx vp9 modules when vp8 is disabled
ffmpeg | branch: master | James Almer | Mon Mar 4 11:50:53 2019 -0300| [db332832a17c6da68067869da815dfcef174dca3] | committer: James Almer configure: allow enabling libvpx vp9 modules when vp8 is disabled libvpx can be compiled with the VP8 decoder and encoder disabled, and there's no reason to force their presence if the user only wants VP9. Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db332832a17c6da68067869da815dfcef174dca3 --- configure | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/configure b/configure index a5cd279838..dcead3a300 100755 --- a/configure +++ b/configure @@ -6226,13 +6226,11 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h enabled libvpx&& { enabled libvpx_vp8_decoder && { check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || -check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" || -die "ERROR: libvpx decoder version must be >=1.4.0"; +check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } enabled libvpx_vp8_encoder && { check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || -check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" || -die "ERROR: libvpx encoder version must be >=1.4.0"; +check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" } enabled libvpx_vp9_decoder && { check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog