[FFmpeg-devel] [PATCH]levc/hevc_cabac Optimise ff_hevc_hls_residual_coding (especially ARM)
John Cox
jc at kynesim.co.uk
Tue Jan 19 17:25:42 CET 2016
On Tue, 19 Jan 2016 15:59:39 +0000 (UTC), you wrote:
>John Cox <jc <at> kynesim.co.uk> writes:
>
>> >> +#define UNCHECKED_BITSTREAM_READER 1
>> >
>> >I don't think that's right, and is a security issue.
>>
>> I added that line as (nearly) every other decoder in
>> liavcodec has it -
>
>Sure?
OK - not all:
h263dec.c
h264.c
h264_cabac.c
h264_cavlc.c
huffyuvdec.c
ituh263dec.c
mpegl2dec.c
mpeg12.c
mpeg4videodec.c
mpeg4video_parser.c
But that probably covers 90% of the video streams decoded with ffmpeg
>> in particular h264_cabac.c has it.
>
>Extensive testing was done before it was added.
Testing that it doesn't seg-fault no matter what the input or some other
sort of testing?
>Could you confirm how much of the speedup comes
>only from this change?
Not an awful lot - a few % of the total improvement, but I was looking
for everything I can get. I'll happily take it out of this patch if it
is controversial.
>While we definitely all welcome a noticeable speedup
>of hevc decoding (and while my opinion on your patch
>has limited relevance) I believe that the patch
>absolutely has to be split: First step would be to
>have a split between changes in the general code and
>changes to arm assembly, I believe the first patch
>then may be split further.
Happy to split out the arm asm. Splitting the rest of it will be harder
if you want it to continue working at all intermediate points.
>I am a little surprised that you wrote some asm
>functions that are slower than what the compiler
>produces: Did you analyze this?
Yeah - they aren't much, if at all, slower but unless they are actively
faster it seems silly to use difficult to maintain asm where the C will
do. In the end it came down to the asm constraining the order in which
stuff happens in the surrounding code and that wasn't always good.
Regards
JC
>Carl Eugen
>
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list