Re: [libav-devel] [PATCH] cbs: Add test dependencies
On Tue, Oct 17, 2017 at 12:17:34AM +0100, Mark Thompson wrote: > Fixes the MPEG-2 failure with --disable-error-resilience. > --- > Try again. We need to depend on the relevant muxer, parser and metadata bsf > as well. > > > tests/fate/cbs.mak | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) Looks even better than the previous patch to me ;) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] cbs: Add test dependencies
Fixes the MPEG-2 failure with --disable-error-resilience. --- Try again. We need to depend on the relevant muxer, parser and metadata bsf as well. tests/fate/cbs.mak | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/fate/cbs.mak b/tests/fate/cbs.mak index afd5c5dd8..cddd49e34 100644 --- a/tests/fate/cbs.mak +++ b/tests/fate/cbs.mak @@ -4,6 +4,8 @@ fate-cbs: fate-cbs-h264 fate-cbs-hevc fate-cbs-mpeg2 +CBS_DEPS = $(call ALLYES, $(1)_DEMUXER $(1)_PARSER $(2)_METADATA_BSF $(3)_DECODER $(3)_MUXER) + define FATE_CBS_TEST # (codec, test_name, sample_file, output_format) FATE_CBS_$(1) += fate-cbs-$(1)-$(2) @@ -30,8 +32,9 @@ FATE_CBS_H264_SAMPLES = \ $(foreach N,$(FATE_CBS_H264_SAMPLES),$(eval $(call FATE_CBS_TEST,h264,$(basename $(N)),h264-conformance/$(N),h264))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_h264) -fate-cbs-h264: $(FATE_CBS_h264) +FATE_CBS_H264-$(call CBS_DEPS, H264, H264, H264) = $(FATE_CBS_h264) +FATE_SAMPLES_AVCONV += $(FATE_CBS_H264-yes) +fate-cbs-h264: $(FATE_CBS_H264-yes) # H.265 read/write @@ -58,8 +61,9 @@ FATE_CBS_HEVC_SAMPLES = \ $(foreach N,$(FATE_CBS_HEVC_SAMPLES),$(eval $(call FATE_CBS_TEST,hevc,$(basename $(N)),hevc-conformance/$(N),hevc))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_hevc) -fate-cbs-hevc: $(FATE_CBS_hevc) +FATE_CBS_HEVC-$(call CBS_DEPS, HEVC, HEVC, HEVC) = $(FATE_CBS_hevc) +FATE_SAMPLES_AVCONV += $(FATE_CBS_HEVC-yes) +fate-cbs-hevc: $(FATE_CBS_HEVC-yes) # MPEG-2 read/write @@ -70,5 +74,6 @@ FATE_CBS_MPEG2_SAMPLES = \ $(foreach N,$(FATE_CBS_MPEG2_SAMPLES),$(eval $(call FATE_CBS_TEST,mpeg2,$(basename $(N)),mpeg2/$(N),mpeg2video))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_mpeg2) -fate-cbs-mpeg2: $(FATE_CBS_mpeg2) +FATE_CBS_MPEG2-$(call CBS_DEPS, MPEGVIDEO, MPEG2, MPEG2VIDEO) = $(FATE_CBS_mpeg2) +FATE_SAMPLES_AVCONV += $(FATE_CBS_MPEG2-yes) +fate-cbs-mpeg2: $(FATE_CBS_MPEG2-yes) -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] cbs: Add test dependencies
On Mon, Oct 16, 2017 at 11:07:16PM +0100, Mark Thompson wrote: > Fixes the MPEG-2 failure with --disable-error-resilience. > --- > tests/fate/cbs.mak | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) LGTM Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] cbs: Add test dependencies
Fixes the MPEG-2 failure with --disable-error-resilience. --- tests/fate/cbs.mak | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/fate/cbs.mak b/tests/fate/cbs.mak index afd5c5dd8..514851140 100644 --- a/tests/fate/cbs.mak +++ b/tests/fate/cbs.mak @@ -30,8 +30,9 @@ FATE_CBS_H264_SAMPLES = \ $(foreach N,$(FATE_CBS_H264_SAMPLES),$(eval $(call FATE_CBS_TEST,h264,$(basename $(N)),h264-conformance/$(N),h264))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_h264) -fate-cbs-h264: $(FATE_CBS_h264) +FATE_CBS_H264-$(call DEMDEC, H264, H264) = $(FATE_CBS_h264) +FATE_SAMPLES_AVCONV += $(FATE_CBS_H264-yes) +fate-cbs-h264: $(FATE_CBS_H264-yes) # H.265 read/write @@ -58,8 +59,9 @@ FATE_CBS_HEVC_SAMPLES = \ $(foreach N,$(FATE_CBS_HEVC_SAMPLES),$(eval $(call FATE_CBS_TEST,hevc,$(basename $(N)),hevc-conformance/$(N),hevc))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_hevc) -fate-cbs-hevc: $(FATE_CBS_hevc) +FATE_CBS_HEVC-$(call DEMDEC, HEVC, HEVC) = $(FATE_CBS_hevc) +FATE_SAMPLES_AVCONV += $(FATE_CBS_HEVC-yes) +fate-cbs-hevc: $(FATE_CBS_HEVC-yes) # MPEG-2 read/write @@ -70,5 +72,6 @@ FATE_CBS_MPEG2_SAMPLES = \ $(foreach N,$(FATE_CBS_MPEG2_SAMPLES),$(eval $(call FATE_CBS_TEST,mpeg2,$(basename $(N)),mpeg2/$(N),mpeg2video))) -FATE_SAMPLES_AVCONV += $(FATE_CBS_mpeg2) -fate-cbs-mpeg2: $(FATE_CBS_mpeg2) +FATE_CBS_MPEG2-$(call DEMDEC, MPEGVIDEO, MPEG2VIDEO) = $(FATE_CBS_mpeg2) +FATE_SAMPLES_AVCONV += $(FATE_CBS_MPEG2-yes) +fate-cbs-mpeg2: $(FATE_CBS_MPEG2-yes) -- 2.11.0 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [GASPP PATCH 1/6] Allow extra space before comma in cbz/adr
On Mon, Oct 16, 2017 at 10:38:14PM +0300, Martin Storsjo wrote: > This should be squashed into "Add support for MS armasm64". > --- > gas-preprocessor.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) OK Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 5/6] Convert local labels in tbz instructions for armasm
Also convert the register from wX into xX, since armasm fails to assemble it when referring to the register as wX. --- gas-preprocessor.pl | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index b650c39..d9eaf1d 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -891,16 +891,23 @@ sub handle_serialized_line { ($arch eq "aarch64" and !is_aarch64_register($target))) { $call_targets{$target}++; } -} elsif ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(cbn?z|adr)\s+(\w+)\s*,\s*(\w+)/) { +} elsif ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(cbn?z|adr|tbz)\s+(\w+)\s*,(\s*#\d+\s*,)?\s*(\w+)/) { my $instr = $2; my $reg = $3; -my $target = $4; +my $bit = $4; +my $target = $5; if ($target =~ /^(\d+)([bf])$/) { # The target is a local label $line = handle_local_label($line, $1, $2); } else { $call_targets{$target}++; } +# Convert tbz with a wX register into an xX register. +if ($instr eq "tbz" and $reg =~ /w\d+/) { +my $xreg = $reg; +$xreg =~ s/w/x/; +$line =~ s/\b$reg\b/$xreg/; +} } elsif ($line =~ /^\s*.h?word.*\b\d+[bf]\b/) { while ($line =~ /\b(\d+)([bf])\b/g) { $line = handle_local_label($line, $1, $2); -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 2/6] Allow register names such as xzr instead of the pattern [xw]\d+ in ccmp/csel
Also update the csel pattern similarly. This is required for building x264. --- gas-preprocessor.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 4c91ee0..2add3dd 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1000,10 +1000,10 @@ sub handle_serialized_line { # Convert "ccmp w0, #0, #0, ne" into "ccmpne w0, #0, #0", # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0". -$line =~ s/(ccmp|csel)\s+([xw]\d+)\s*,\s*([xw#]\d+)\s*,\s*([xw#]\d+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/; +$line =~ s/(ccmp|csel)\s+([xw]\w+)\s*,\s*([xw#]\w+)\s*,\s*([xw#]\w+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/; # Convert "cset w0, lo" into "csetlo w0" -$line =~ s/(cset)\s+([xw]\d+)\s*,\s*($arm_cond_codes)/\1\3 \2/; +$line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/; # Strip out prfum; armasm64 fails to assemble any # variant/combination of prfum tested so far, but it can be -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 1/6] Allow extra space before comma in cbz/adr
This should be squashed into "Add support for MS armasm64". --- gas-preprocessor.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 6353a07..4c91ee0 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -891,7 +891,7 @@ sub handle_serialized_line { ($arch eq "aarch64" and !is_aarch64_register($target))) { $call_targets{$target}++; } -} elsif ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(cbn?z|adr)\s+(\w+),\s*(\w+)/) { +} elsif ($line =~ /(?:^|\n)\s*(\w+\s*:\s*)?(cbn?z|adr)\s+(\w+)\s*,\s*(\w+)/) { my $instr = $2; my $reg = $3; my $target = $4; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 6/6] Work around an armasm64 bug in the scale operand to fcvtzs/scvtf
The operand shouldn't be stored as is, but stored as 64-scale, in the opcode, but armasm64 misses to do this. This might be a big enough bug to report and try to get fixed, but that requires removing this workaround at that point. --- gas-preprocessor.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index d9eaf1d..182b684 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1032,6 +1032,16 @@ sub handle_serialized_line { $line =~ s/$instr$suffix/${instr}u$suffix/; } } + +# Instructions like fcvtzs and scvtf store the scale value +# inverted in the opcode (stored as 64 - scale), but armasm64 +# stores it as-is. Thus convert from "fcvtzs w0, s0, #8" +# into "fcvtzs w0, s0, #56". +if ($line =~ /(?:fcvtzs|scvtf)\s+(\w+)\s*,\s*(\w+)\s*,\s*#(\d+)/) { +my $scale = $3; +my $inverted_scale = 64 - $3; +$line =~ s/#$scale/#$inverted_scale/; +} } # armasm is unable to parse &0x - add spacing $line =~ s/&0x/& 0x/g; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 0/6] More gas-pp/armasm patches
These are necessary for building x264 with msvc/armasm64. Most of them can probably be squashed into the main patch before pushing. Martin Storsjo (6): Allow extra space before comma in cbz/adr Allow register names such as xzr instead of the pattern [xw]\d+ in ccmp/csel Handle cinc just like ccmp/csel Convert ldr/str/ldrb/strb etc into ldurb, when the offset is negative Convert local labels in tbz instructions for armasm Work around an armasm64 bug in the scale operand to fcvtzs/scvtf gas-preprocessor.pl | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 3/6] Handle cinc just like ccmp/csel
This can be squashed into "Add support for MS armasm64"; this was found while trying to build x264. --- gas-preprocessor.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 2add3dd..552ed0c 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1002,6 +1002,9 @@ sub handle_serialized_line { # and "csel w0, w0, w0, ne" into "cselne w0, w0, w0". $line =~ s/(ccmp|csel)\s+([xw]\w+)\s*,\s*([xw#]\w+)\s*,\s*([xw#]\w+)\s*,\s*($arm_cond_codes)/\1\5 \2, \3, \4/; +# Convert "cinc w0, w0, ne" into "cincne w0, w0". +$line =~ s/(cinc)\s+([xw]\w+)\s*,\s*([xw]\w+)\s*,\s*($arm_cond_codes)/\1\4 \2, \3/; + # Convert "cset w0, lo" into "csetlo w0" $line =~ s/(cset)\s+([xw]\w+)\s*,\s*($arm_cond_codes)/\1\3 \2/; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH 4/6] Convert ldr/str/ldrb/strb etc into ldurb, when the offset is negative
--- gas-preprocessor.pl | 13 + 1 file changed, 13 insertions(+) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index 552ed0c..b650c39 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -1012,6 +1012,19 @@ sub handle_serialized_line { # variant/combination of prfum tested so far, but it can be # left out without any $line =~ s/prfum.*\]//; + +# Convert "ldrb w0, [x0, #-1]" into "ldurb w0, [x0, #-1]". +# Don't do this for forms with writeback though. +if ($line =~ /(ld|st)(r[bh]?)\s+(\w+)\s*,\s*\[\s*(\w+)\s*,\s*#([^\]]+)\s*\][^!]/) { + my $instr = $1; + my $suffix = $2; + my $target = $3; + my $base = $4; + my $offset = eval_expr($5); + if ($offset < 0) { +$line =~ s/$instr$suffix/${instr}u$suffix/; + } +} } # armasm is unable to parse &0x - add spacing $line =~ s/&0x/& 0x/g; -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] mss1: Add missing macro parameters to ARITH_GET_* macros
On Wed, Oct 11, 2017 at 05:58:39AM +0200, Diego Biurrun wrote: > --- > libavcodec/mss1.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) OKed by Vittorio on IRC. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [GASPP PATCH] Support converting uxtl into ushll on a line that starts with a local label
Also make a note that this conversion is necessary for armasm64. For consistency, allow local labels in all similar full-line conversions as well. --- gas-preprocessor.pl | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index a8cf1e0..6353a07 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -793,24 +793,25 @@ sub handle_serialized_line { if ($arch eq "aarch64") { # fix missing aarch64 instructions in Xcode 5.1 (beta3) # mov with vector arguments is not supported, use alias orr instead -if ($line =~ /^\s*mov\s+(v\d[\.{}\[\]\w]+),\s*(v\d[\.{}\[\]\w]+)\b\s*$/) { -$line = "orr $1, $2, $2\n"; +if ($line =~ /^(\d+:)?\s*mov\s+(v\d[\.{}\[\]\w]+),\s*(v\d[\.{}\[\]\w]+)\b\s*$/) { +$line = "$1orr $2, $3, $3\n"; } # movi 16, 32 bit shifted variant, shift is optional -if ($line =~ /^\s*movi\s+(v[0-3]?\d\.(?:2|4|8)[hsHS])\s*,\s*(#\w+)\b\s*$/) { -$line = "movi $1, $2, lsl #0\n"; +if ($line =~ /^(\d+:)?\s*movi\s+(v[0-3]?\d\.(?:2|4|8)[hsHS])\s*,\s*(#\w+)\b\s*$/) { +$line = "$1movi $2, $3, lsl #0\n"; } # Xcode 5 misses the alias uxtl. Replace it with the more general ushll. # Clang 3.4 misses the alias sxtl too. Replace it with the more general sshll. -if ($line =~ /^\s*(s|u)xtl(2)?\s+(v[0-3]?\d\.[248][hsdHSD])\s*,\s*(v[0-3]?\d\.(?:2|4|8|16)[bhsBHS])\b\s*$/) { -$line = "$1shll$2 $3, $4, #0\n"; +# armasm64 also misses these instructions. +if ($line =~ /^(\d+:)?\s*(s|u)xtl(2)?\s+(v[0-3]?\d\.[248][hsdHSD])\s*,\s*(v[0-3]?\d\.(?:2|4|8|16)[bhsBHS])\b\s*$/) { +$line = "$1$2shll$3 $4, $5, #0\n"; } # clang 3.4 and armasm64 do not automatically use shifted immediates in add/sub if (($as_type eq "clang" or $as_type eq "armasm") and -$line =~ /^(\s*(?:add|sub)s?) ([^#l]+)#([\d\+\-\*\/ <>]+)\s*$/) { -my $imm = eval $3; +$line =~ /^(\d+:)?(\s*(?:add|sub)s?) ([^#l]+)#([\d\+\-\*\/ <>]+)\s*$/) { +my $imm = eval $4; if ($imm > 4095 and not ($imm & 4095)) { -$line = "$1 $2#" . ($imm >> 12) . ", lsl #12\n"; +$line = "$1 $2 $3#" . ($imm >> 12) . ", lsl #12\n"; } } if ($ENV{GASPP_FIX_XCODE5}) { -- 2.7.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel