From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D9A3E474CD for ; Fri, 8 Sep 2023 21:00:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D3AC968C873; Sat, 9 Sep 2023 00:00:38 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8650668BF52 for ; Sat, 9 Sep 2023 00:00:31 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 932341BF207 for ; Fri, 8 Sep 2023 21:00:30 +0000 (UTC) Date: Fri, 8 Sep 2023 23:00:29 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230908210029.GZ8640@pb2> References: <20230908081508.510-1-christophe.gisquet@gmail.com> MIME-Version: 1.0 In-Reply-To: <20230908081508.510-1-christophe.gisquet@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/7] proresdec2: port and fix for cached reader X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============3179902696617510748==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3179902696617510748== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xd76R9tHJzDpbIo0" Content-Disposition: inline --xd76R9tHJzDpbIo0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 08, 2023 at 10:15:02AM +0200, Christophe Gisquet wrote: > Summary of changes > - move back to regular, non-macro, get_bits API > - reduce the lookup to switch the coding method > - shorter reads wherever possible, in particular for the end of bitstream > (16 bits instead of 32, as per the above) >=20 > There are cases that really need longer lengths (larger EG codes) of up > to 27 bits. >=20 > Win64: 6.10 -> 4.87 (~20% speedup) >=20 > Reference for an hypothetical 32bits version of the cached reader: > Win32: 11.4 -> 9.8 (14%, because iDCT is not SIMDed) > --- > libavcodec/proresdec2.c | 53 ++++++++++++++++++----------------------- > 1 file changed, 23 insertions(+), 30 deletions(-) causes assertion failure: Assertion n <=3D 32 failed at libavcodec/bitstream_template.h:338/0 Thread 36 "read_thread" received signal SIGABRT, Aborted. [Switching to Thread 0x7fff56ffd700 (LWP 12751)] __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=3Dsig@entry=3D6) at ../sysdeps/unix/sysv/linux/raise.c:= 51 #1 0x00007fffefd097f1 in __GI_abort () at abort.c:79 #2 0x0000555556035277 in bits_peek_be (bc=3D0x7fff56ffb270, n=3D4294967295= ) at libavcodec/bitstream_template.h:338 #3 0x0000555556036b35 in decode_ac_coeffs (avctx=3D0x7fff28002680, gb=3D0x= 7fff56ffb270, out=3D0x7fff56ffb2a0, blocks_per_slice=3D32) at libavcodec/pr= oresdec2.c:590 #4 0x000055555603715c in decode_slice_chroma (avctx=3D0x7fff28002680, slic= e=3D0x7fff28055c20, dst=3D0x7fff9450b940, dst_stride=3D7680, buf=3D0x7fff28= 03d072 "#\a`\002g\240", , buf_size=3D43, qmat=3D0= x7fff56ffc450, log2_blocks_per_mb=3D2) at libavcodec/proresdec2.c:674 #5 0x0000555556037ae2 in decode_slice_thread (avctx=3D0x7fff28002680, arg= =3D0x0, jobnr=3D145, threadnr=3D0) at libavcodec/proresdec2.c:807 #6 0x0000555555c815a0 in avcodec_default_execute2 (c=3D0x7fff28002680, fun= c=3D0x555556037465 , arg=3D0x0, ret=3D0x0, count=3D510= ) at libavcodec/avcodec.c:74 #7 0x0000555556037d1e in decode_picture (avctx=3D0x7fff28002680) at libavc= odec/proresdec2.c:846 #8 0x0000555556037fda in decode_frame (avctx=3D0x7fff28002680, frame=3D0x7= fff28007440, got_frame=3D0x7fff56ffc5f0, avpkt=3D0x7fff28007dc0) at libavco= dec/proresdec2.c:912 #9 0x0000555555d732ec in decode_simple_internal (avctx=3D0x7fff28002680, f= rame=3D0x7fff28007440, discarded_samples=3D0x7fff56ffc650) at libavcodec/de= code.c:433 #10 0x0000555555d73843 in decode_simple_receive_frame (avctx=3D0x7fff280026= 80, frame=3D0x7fff28007440) at libavcodec/decode.c:607 #11 0x0000555555d739b3 in decode_receive_frame_internal (avctx=3D0x7fff2800= 2680, frame=3D0x7fff28007440) at libavcodec/decode.c:635 #12 0x0000555555d73d78 in avcodec_send_packet (avctx=3D0x7fff28002680, avpk= t=3D0x7fff28007208) at libavcodec/decode.c:732 #13 0x0000555555a6ef78 in try_decode_frame (s=3D0x7fff28000c80, st=3D0x7fff= 28002240, pkt=3D0x7fff28007208, options=3D0x7fff280071c0) at libavformat/de= mux.c:2075 #14 0x0000555555a71d92 in avformat_find_stream_info (ic=3D0x7fff28000c80, o= ptions=3D0x7fff280071c0) at libavformat/demux.c:2771 #15 0x0000555555699823 in read_thread (arg=3D0x7fffd45ca040) at fftools/ffp= lay.c:2806 #16 0x00007ffff5deed6c in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.= so.0 #17 0x00007ffff5e640f9 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.= so.0 #18 0x00007ffff00c16db in start_thread (arg=3D0x7fff56ffd700) at pthread_cr= eate.c:463 #19 0x00007fffefdea61f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clo= ne.S:95 [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The day soldiers stop bringing you their problems is the day you have stopp= ed=20 leading them. They have either lost confidence that you can help or conclud= ed=20 you do not care. Either case is a failure of leadership. - Colin Powell --xd76R9tHJzDpbIo0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZPuLagAKCRBhHseHBAsP qwDTAJ4vm26Yppb8zLREg/mDF+aHpYA+EgCfcUQc0LXzgcSXQrBh6jD9TQMnCPk= =7qCu -----END PGP SIGNATURE----- --xd76R9tHJzDpbIo0-- --===============3179902696617510748== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============3179902696617510748==--