jinbo
6c6bf18ce8
avcodec/hevc: Add qpel_uni_w_v|h4/6/8/12/16/24/32/48/64 asm opt
...
tests/checkasm/checkasm: C LSX LASX
put_hevc_qpel_uni_w_h4_8_c: 6.5 1.7 1.2
put_hevc_qpel_uni_w_h6_8_c: 14.5 4.5 3.7
put_hevc_qpel_uni_w_h8_8_c: 24.5 5.7 4.5
put_hevc_qpel_uni_w_h12_8_c: 54.7 17.5 12.0
put_hevc_qpel_uni_w_h16_8_c: 96.5 22.7 13.2
put_hevc_qpel_uni_w_h24_8_c: 216.0 51.2 33.2
put_hevc_qpel_uni_w_h32_8_c: 385.7 87.0 53.2
put_hevc_qpel_uni_w_h48_8_c: 860.5 192.0 113.2
put_hevc_qpel_uni_w_h64_8_c: 1531.0 334.2 200.0
put_hevc_qpel_uni_w_v4_8_c: 8.0 1.7
put_hevc_qpel_uni_w_v6_8_c: 17.2 4.5
put_hevc_qpel_uni_w_v8_8_c: 29.5 6.0 5.2
put_hevc_qpel_uni_w_v12_8_c: 65.2 16.0 11.7
put_hevc_qpel_uni_w_v16_8_c: 116.5 20.5 14.0
put_hevc_qpel_uni_w_v24_8_c: 259.2 48.5 37.2
put_hevc_qpel_uni_w_v32_8_c: 459.5 80.5 56.0
put_hevc_qpel_uni_w_v48_8_c: 1028.5 180.2 126.5
put_hevc_qpel_uni_w_v64_8_c: 1831.2 319.2 224.2
Speedup of decoding H265 4K 30FPS 30Mbps on
3A6000 with 8 threads is 4fps(48fps-->52fps).
Change-Id: I1178848541d90083869225ba98a02e6aa8bb8c5a
Reviewed-by: yinshiyou-hf@loongson.cn
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
jinbo
a28eea2a27
avcodec/hevc: Add pel_uni_w_pixels4/6/8/12/16/24/32/48/64 asm opt
...
tests/checkasm/checkasm: C LSX LASX
put_hevc_pel_uni_w_pixels4_8_c: 2.7 1.0
put_hevc_pel_uni_w_pixels6_8_c: 6.2 2.0 1.5
put_hevc_pel_uni_w_pixels8_8_c: 10.7 2.5 1.7
put_hevc_pel_uni_w_pixels12_8_c: 23.0 5.5 5.0
put_hevc_pel_uni_w_pixels16_8_c: 41.0 8.2 5.0
put_hevc_pel_uni_w_pixels24_8_c: 91.0 19.7 13.2
put_hevc_pel_uni_w_pixels32_8_c: 161.7 32.5 16.2
put_hevc_pel_uni_w_pixels48_8_c: 354.5 73.7 43.0
put_hevc_pel_uni_w_pixels64_8_c: 641.5 130.0 64.2
Speedup of decoding H265 4K 30FPS 30Mbps on 3A6000 with
8 threads is 1fps(47fps-->48fps).
Reviewed-by: yinshiyou-hf@loongson.cn
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
jinbo
cfbdda607d
avcodec/hevc: Add add_residual_4/8/16/32 asm opt
...
After this patch, the peformance of decoding H265 4K 30FPS 30Mbps
on 3A6000 with 8 threads improves 2fps (45fps-->47fsp).
Reviewed-by: yinshiyou-hf@loongson.cn
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
Zhao Zhili
13c1fea92f
avcodec/videotoolboxenc: fix setting avctx color_range doesn't work
...
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
1 year ago
Nuo Mi
8d0dda8260
vvcdec: reuse h26x/h2656_deblock_template.c
1 year ago
Nuo Mi
ae0a83477b
hevcdec: move deblock template to h26x/h2656_deblock_template.c
1 year ago
Nuo Mi
69e179e8bf
vvcdec: reuse h26x/h2656_sao_template.c
1 year ago
Nuo Mi
d2fe23b835
hevcdec: move sao template to h26x/h2656_sao_template.c
1 year ago
Clément Bœsch
af509f9957
avcodec/proresenc_anatoliy: do not write into chroma reserved bitfields
...
The layout for the frame flags is as follow:
chroma_format u(2)
reserved u(2)
interlace_mode u(2)
reserved u(2)
chroma_format has 2 allowed values:
0: reserved
1: reserved
2: 4:2:2
3: 4:4:4
interlace_mode has 3 allowed values:
0: progressive
1: tff
2: bff
3: reserved
0x80 is what we expect for "422 not interlaced", and the extra 0x2 from
0x82 is actually writing into the reserved bits.
1 year ago
Clément Bœsch
21f7a814ea
avcodec/proresenc_anatoliy: do not write into alpha reserved bitfields
...
This byte represents 4 reserved bits followed by 4 alpha_channel_type bits.
alpha_channel_type currently has 3 differents defined values: 0 (no
alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are
reserved. The 4 initial reserved bits are expected to be 0.
1 year ago
Clément Bœsch
6d35911667
avcodec/proresenc_kostya: do not write into alpha reserved bitfields
...
This byte represents 4 reserved bits followed by 4 alpha_channel_type bits.
alpha_channel_type currently has 3 differents defined values: 0 (no
alpha), 1 (8b alpha), and 2 (16b alpha), all the other values are
reserved. This part is correctly written (alpha_bits>>3 does the correct
thing), but the 4 initial bits are reserved.
1 year ago
Clément Bœsch
aa7ccd0ce9
avcodec/proresenc_kostya: use a compatible bitstream version
...
Quoting SMPTE RDD 36:2015:
A decoder shall abort if it encounters a bitstream with an unsupported
bitstream_version value. If 0, the value of the chroma_format syntax
element shall be 2 (4:2:2 sampling) and the value of the
alpha_channel_type element shall be 0 (no encoded alpha); if 1, any
permissible value may be used for those syntax elements.
So if we're not in 4:2:2 or if there is alpha, we are not allowed to use
version 0.
1 year ago
Clément Bœsch
85cb1b9b20
avcodec/proresenc_anatoliy: use a compatible bitstream version
...
Quoting SMPTE RDD 36:2015:
A decoder shall abort if it encounters a bitstream with an unsupported
bitstream_version value. If 0, the value of the chroma_format syntax
element shall be 2 (4:2:2 sampling) and the value of the
alpha_channel_type element shall be 0 (no encoded alpha); if 1, any
permissible value may be used for those syntax elements.
So if we're not in 4:2:2 or if there is alpha, we are not allowed to use
version 0.
1 year ago
Clément Bœsch
1081bae94d
avcodec/proresenc_kostya: make a few cosmetics in encode_acs()
...
Unify cosmetics with encode_acs() from proresenc_anatoliy.
1 year ago
Clément Bœsch
cc2206d142
avcodec/proresenc_anatoliy: make a few cosmetics in encode_acs()
...
This makes the function pretty much identical to the function of the
same name in proresenc_kostya.
1 year ago
Clément Bœsch
8fb2e96d7e
avcodec/proresenc_anatoliy: execute AC run/level FFMIN() at assignment
...
This matches the logic from the function of the same name in proresenc_kostya.
1 year ago
Clément Bœsch
096a69ad43
avcodec/proresenc_anatoliy: rework inner loop in encode_acs()
...
This matches the logic from the function of the same name in proresenc_kostya.
1 year ago
Clément Bœsch
25f28b9308
avcodec/proresenc_anatoliy: avoid using ff_ prefix in function arguments
1 year ago
Clément Bœsch
29fd3f75fe
avcodec/proresenc_anatoliy: rework encode_ac_coeffs() prototype
...
This makes the prototype closer to the function of the same name in
proresenc_kostya.
1 year ago
Clément Bœsch
3543100a05
avcodec/proresenc_anatoliy: replace get_level() with FFABS()
...
This matches the code from proresenc_kostya.
1 year ago
Clément Bœsch
ed8692446c
avcodec/proresenc_anatoliy: cosmetics to make encode_dcs() identical to the one in Kostya encoder
1 year ago
Clément Bœsch
e87bc5641c
avcodec/proresenc_anatoliy: remove TO_GOLOMB2()
...
A few cosmetics aside, this makes the function identical to the one with
the same name in proresenc_kostya.
1 year ago
Clément Bœsch
a026f98f29
avcodec/proresenc_anatoliy: only pass down the first scale to encode_dcs()
...
This matches encode_dcs() prototype from proresenc_kostya.
1 year ago
Clément Bœsch
1aa7d504ec
avcodec/proresenc_anatoliy: shuffle declarations around in encode_dcs()
...
This makes the function closer to the same function in proresenc_kostya.
1 year ago
Clément Bœsch
87ba89281c
avcodec/proresenc_anatoliy: rename TO_GOLOMB() to MAKE_CODE()
...
This matches the name in proresenc_kostya.
1 year ago
Clément Bœsch
7af42088d7
avcodec/proresenc_kostya: add Anatoliy copyright
...
Both encoders share a lot of code from both authors.
1 year ago
Clément Bœsch
d269f84199
avcodec/proresenc_anatoliy: remove IS_NEGATIVE() macro
...
This makes the function closer to encode_acs() in proresenc_kostya.
1 year ago
Clément Bœsch
9c7f6d89fd
avcodec/proresenc_anatoliy: rename new_dc to dc
...
This makes the function closer to encode_dcs() in proresenc_kostya.
1 year ago
Clément Bœsch
9258f4eaf9
avcodec/proresenc_anatoliy: compute sign only once
...
This makes the function closer to encode_dcs() in proresenc_kostya.
1 year ago
Clément Bœsch
17392ca84f
avcodec/proresenc_anatoliy: import GET_SIGN() macro from Kostya encoder and use it
1 year ago
Clément Bœsch
273f591a3d
avcodec/proresenc_anatoliy: directly work with blocks in encode_dcs()
...
This makes the function closer to encode_dcs() in proresenc_kostya.
1 year ago
Clément Bœsch
dadc5ac24a
avcodec/proresenc_anatoliy: reduce DC encoding function prototype differences with Kostya encoder
1 year ago
Clément Bœsch
8e42d3aba0
avcodec/proresenc_anatoliy: execute codebook FFMIN() at assignment
...
This makes the function closer to encode_dcs() in proresenc_kostya.
1 year ago
Clément Bœsch
43baba4647
avcodec/proresenc_anatoliy: rename new_code/code to code/codebook
...
This makes the function closer to encode_dcs() in proresenc_kostya.
1 year ago
Clément Bœsch
c44cd371ca
avcodec/proresenc_anatoliy: inline QSCALE()
...
Also replaces 16384 with 0x4000.
This makes the function slightly closer to same function in proresenc_kostya.
1 year ago
Clément Bœsch
1574475033
avcodec/proresenc_anatoliy: rework encode_codeword() prototype
...
This matches the function of the same name in proresenc_kostya.
1 year ago
Clément Bœsch
1832bd7838
avcodec/proresenc_anatoliy: shuffle encode_codeword() code to match Kostya encoder
...
Code is functionally identical, it's just rename of variables, cosmetics
and branch logic shuffling.
1 year ago
Clément Bœsch
3885d2493d
avcodec/proresenc_anatoliy: use FRAME_ID defined in proresdata.h
1 year ago
Clément Bœsch
d6e0fb7c92
avcodec/proresenc_kostya: simplify quantization matrix bytestream writing
1 year ago
Clément Bœsch
cbee015867
avcodec/proresenc_kostya: fix chroma quantisation matrix in frame header
...
Most of the time the quantisation matrices are the same, it only matters
with the proxy profile.
1 year ago
Clément Bœsch
631fa19ee0
avcodec/proresenc_kostya: save a few operations in DC encoding
...
This matches the logic from proresenc_anatoliy.
1 year ago
Clément Bœsch
f06f2cf16a
avcodec/proresenc_anatoliy: move DC codebook LUT to shared proresdata
...
This is going to be shared with proresenc_kostya in the upcoming commit.
1 year ago
Clément Bœsch
9f547e2f15
avcodec/proresenc_anatoliy: remove duplicated define
...
This is already defined in proresdata.h
1 year ago
Clément Bœsch
c35733006a
avcodec/proresenc_kostya: remove one LUT indirection for run/level to codebook mapping
...
This is following the same logic as proresenc_anatoliy.
1 year ago
Clément Bœsch
3ba52f18e4
avcodec/proresenc_anatoliy: move run/lev to codebook LUT to shared proresdata
...
This is going to be shared with proresenc_kostya in the upcoming commit.
1 year ago
Clément Bœsch
e940baa65b
avcodec/proresenc_kostya: remove redundant codebook assignments
...
This is already assigned at declaration.
1 year ago
Clément Bœsch
e453efcfbc
avcodec/proresenc_kostya: remove unused plane factor variables
1 year ago
Clément Bœsch
2ac88c1362
avcodec/proresenc_kostya: remove an unnecessary parenthesis level in MAKE_CODE() macro
1 year ago
Marton Balint
363b3ec98a
all: use av_channel_layout_describe_bprint instead of av_channel_layout_describe in a few places
...
Where an AVBPrint buffer is used later anyway.
Signed-off-by: Marton Balint <cus@passwd.hu>
1 year ago
James Almer
b95ccfcada
avcodec/vvc_thread: don't use an anonymous union
...
Should fix compilation with old GCC.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago