From 29395d9cf57bf0e8ff9a1cc4b477abb2de2e48e0 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Thu, 23 May 2024 08:50:59 +1000 Subject: [PATCH 01/57] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=B0=D1=80=D1=82=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D1=8B=20=D0=BF=D1=80=D0=B8=20=D0=B0=D0=BF=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=82=D0=BD=D0=BE=D0=BC=20=D0=B4=D0=B5=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B5=D0=BA=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D1=85=20VP9=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=D0=BE=D0=B2=20(=D0=BA=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=B8=D0=B7=20LAV).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/custom_code/ffmpeg.txt | 1 + src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/custom_code/ffmpeg.txt b/docs/custom_code/ffmpeg.txt index 77383076aa..c605e59232 100644 --- a/docs/custom_code/ffmpeg.txt +++ b/docs/custom_code/ffmpeg.txt @@ -19,6 +19,7 @@ * libavcodec/dxva2.c * libavcodec/dxva2_hevc.c * libavcodec/dxva2_internal.h +* libavcodec/dxva2_vp9.c * libavcodec/h264_refs.c * libavcodec/h264_slice.c * libavcodec/h264dec.c diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c b/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c index f32933786e..2126966353 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c @@ -120,8 +120,12 @@ int ff_dxva2_vp9_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACont /* segmentation data */ pp->stVP9Segments.wSegmentInfoFlags = (h->h.segmentation.enabled << 0) | - (h->h.segmentation.update_map << 1) | - (h->h.segmentation.temporal << 2) | +// ==> Start patch MPC + ((h->h.segmentation.enabled && h->h.segmentation.update_map) << 1) | + ((h->h.segmentation.enabled && h->h.segmentation.temporal) << 2) | + //(h->h.segmentation.update_map << 1) | + //(h->h.segmentation.temporal << 2) | +// ==> End patch MPC (h->h.segmentation.absolute_vals << 3) | (0 << 4); /* ReservedSegmentFlags4Bits */ From d867c6c628033c1d7a471e3dbedff32a249b5ddd Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 25 May 2024 19:17:56 +0300 Subject: [PATCH 02/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20VVdeC=20v2.3.0-5-gffe3010.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- src/ExtLib/vvdec/vvdec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 3dff864849..57a7eb8033 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -7,7 +7,7 @@ MPCVideoDec Обновлены библиотеки: ffmpeg git-n7.1-dev-716-g0d9591841b; - vvdec git-v2.3.0. + vvdec git-v2.3.0-5-gffe3010. 1.7.1 - 2024-05-07 diff --git a/docs/Changelog.txt b/docs/Changelog.txt index bce71391ca..a1b66d3413 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -7,7 +7,7 @@ VVC decoding is done using vvdec (https://github.com/fraunhoferhhi/vvdec). Updated libraries: ffmpeg git-n7.1-dev-716-g0d9591841b; - vvdec git-v2.3.0. + vvdec git-v2.3.0-5-gffe3010. 1.7.1 - 2024-05-07 diff --git a/src/ExtLib/vvdec/vvdec b/src/ExtLib/vvdec/vvdec index edd47ab839..ffe30100f1 160000 --- a/src/ExtLib/vvdec/vvdec +++ b/src/ExtLib/vvdec/vvdec @@ -1 +1 @@ -Subproject commit edd47ab839a73e47d672b1f1ad071725eb955f93 +Subproject commit ffe30100f191e8e3d70a924f039d39158bcadb1c From eb01972c925e2e0b835ae9e39e578cba62989431 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 26 May 2024 07:10:25 +0300 Subject: [PATCH 03/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20ffmpeg=20git-n7.1-dev-922-ge9197db4f?= =?UTF-8?q?7.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- src/ExtLib/ffmpeg/MAINTAINERS | 1 + src/ExtLib/ffmpeg/ffmpeg.mak | 4 +- .../ffmpeg/libavcodec/aac/aacdec_float.c | 5 + src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.c | 7 +- src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.h | 10 - src/ExtLib/ffmpeg/libavcodec/aac_parser.c | 16 +- src/ExtLib/ffmpeg/libavcodec/ac3_parser.c | 14 +- .../ffmpeg/libavcodec/ac3_parser_internal.h | 13 +- src/ExtLib/ffmpeg/libavcodec/ac3dec.c | 18 +- src/ExtLib/ffmpeg/libavcodec/ac3enc.c | 187 +++--- src/ExtLib/ffmpeg/libavcodec/ac3enc.h | 6 +- .../ffmpeg/libavcodec/ac3enc_template.c | 11 +- src/ExtLib/ffmpeg/libavcodec/adts_header.c | 17 +- src/ExtLib/ffmpeg/libavcodec/adts_header.h | 30 +- src/ExtLib/ffmpeg/libavcodec/adts_parser.c | 23 +- src/ExtLib/ffmpeg/libavcodec/aic.c | 2 - src/ExtLib/ffmpeg/libavcodec/avcodec.h | 1 + .../ffmpeg/libavcodec/bsf/aac_adtstoasc.c | 6 +- .../libavcodec/cbs_h266_syntax_template.c | 28 +- src/ExtLib/ffmpeg/libavcodec/cllc.c | 3 - src/ExtLib/ffmpeg/libavcodec/codec_desc.c | 9 +- src/ExtLib/ffmpeg/libavcodec/decode.c | 32 +- src/ExtLib/ffmpeg/libavcodec/dnxhddec.c | 2 - src/ExtLib/ffmpeg/libavcodec/dvdec.c | 2 - src/ExtLib/ffmpeg/libavcodec/dxtory.c | 2 - src/ExtLib/ffmpeg/libavcodec/eac3dec.c | 6 +- src/ExtLib/ffmpeg/libavcodec/fdctdsp.c | 4 +- src/ExtLib/ffmpeg/libavcodec/fdctdsp.h | 2 + src/ExtLib/ffmpeg/libavcodec/flacdec.c | 17 +- src/ExtLib/ffmpeg/libavcodec/flacdsp.c | 31 + src/ExtLib/ffmpeg/libavcodec/flacdsp.h | 5 + src/ExtLib/ffmpeg/libavcodec/fraps.c | 3 - src/ExtLib/ffmpeg/libavcodec/h263dsp.c | 4 +- src/ExtLib/ffmpeg/libavcodec/h263dsp.h | 1 + src/ExtLib/ffmpeg/libavcodec/h2645_sei.c | 6 +- src/ExtLib/ffmpeg/libavcodec/h264_slice.c | 2 +- src/ExtLib/ffmpeg/libavcodec/h264dsp.c | 2 + src/ExtLib/ffmpeg/libavcodec/h264dsp.h | 2 + src/ExtLib/ffmpeg/libavcodec/hapdec.c | 2 - src/ExtLib/ffmpeg/libavcodec/hq_hqa.c | 3 - src/ExtLib/ffmpeg/libavcodec/hqx.c | 3 - src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c | 5 - src/ExtLib/ffmpeg/libavcodec/lagarith.c | 3 - src/ExtLib/ffmpeg/libavcodec/magicyuv.c | 3 - src/ExtLib/ffmpeg/libavcodec/mlpdec.c | 1 + src/ExtLib/ffmpeg/libavcodec/mpeg12dec.c | 4 +- src/ExtLib/ffmpeg/libavcodec/mpeg4videodec.c | 2 + src/ExtLib/ffmpeg/libavcodec/options_table.h | 1 + src/ExtLib/ffmpeg/libavcodec/proresdec.c | 2 - src/ExtLib/ffmpeg/libavcodec/pthread_frame.c | 17 +- src/ExtLib/ffmpeg/libavcodec/r210dec.c | 2 - src/ExtLib/ffmpeg/libavcodec/rawdec.c | 3 - src/ExtLib/ffmpeg/libavcodec/speedhqdec.c | 9 +- src/ExtLib/ffmpeg/libavcodec/utvideodec.c | 2 - src/ExtLib/ffmpeg/libavcodec/v210dec.c | 3 - src/ExtLib/ffmpeg/libavcodec/v410dec.c | 3 - src/ExtLib/ffmpeg/libavcodec/vc1_parser.c | 5 +- src/ExtLib/ffmpeg/libavcodec/version.h | 2 +- src/ExtLib/ffmpeg/libavcodec/vp3.c | 3 +- src/ExtLib/ffmpeg/libavcodec/vp8.c | 3 +- src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c | 24 +- src/ExtLib/ffmpeg/libavcodec/vvc/ctu.h | 14 +- src/ExtLib/ffmpeg/libavcodec/vvc/data.c | 83 ++- src/ExtLib/ffmpeg/libavcodec/vvc/data.h | 10 +- src/ExtLib/ffmpeg/libavcodec/vvc/dec.c | 17 +- src/ExtLib/ffmpeg/libavcodec/vvc/dec.h | 29 +- src/ExtLib/ffmpeg/libavcodec/vvc/dsp.h | 13 + src/ExtLib/ffmpeg/libavcodec/vvc/filter.c | 22 +- src/ExtLib/ffmpeg/libavcodec/vvc/inter.c | 622 +++++++++--------- .../ffmpeg/libavcodec/vvc/inter_template.c | 168 +++++ src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c | 39 +- src/ExtLib/ffmpeg/libavcodec/vvc/refs.c | 55 +- src/ExtLib/ffmpeg/libavcodec/vvc/thread.c | 10 +- src/ExtLib/ffmpeg/libavcodec/x86/flacdsp.asm | 72 +- .../ffmpeg/libavcodec/x86/flacdsp_init.c | 8 + .../ffmpeg/libavcodec/x86/vvc/vvcdsp_init.c | 99 ++- src/ExtLib/ffmpeg/libavfilter/af_atempo.c | 102 +-- src/ExtLib/ffmpeg/libavfilter/avfilter.c | 4 +- src/ExtLib/ffmpeg/libavfilter/version.h | 2 +- src/ExtLib/ffmpeg/libavutil/channel_layout.c | 17 +- src/ExtLib/ffmpeg/libavutil/channel_layout.h | 10 + src/ExtLib/ffmpeg/libavutil/cpu.c | 1 + src/ExtLib/ffmpeg/libavutil/cpu.h | 1 + src/ExtLib/ffmpeg/libavutil/version.h | 2 +- 86 files changed, 1299 insertions(+), 744 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 57a7eb8033..582299008d 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -6,7 +6,7 @@ MPCVideoDec Декодирование VVC сделано с помощью vvdec (https://github.com/fraunhoferhhi/vvdec). Обновлены библиотеки: - ffmpeg git-n7.1-dev-716-g0d9591841b; + ffmpeg git-n7.1-dev-922-ge9197db4f7; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index a1b66d3413..561d9dfbd3 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -6,7 +6,7 @@ MPCVideoDec VVC decoding is done using vvdec (https://github.com/fraunhoferhhi/vvdec). Updated libraries: - ffmpeg git-n7.1-dev-716-g0d9591841b; + ffmpeg git-n7.1-dev-922-ge9197db4f7; vvdec git-v2.3.0-5-gffe3010. diff --git a/src/ExtLib/ffmpeg/MAINTAINERS b/src/ExtLib/ffmpeg/MAINTAINERS index dd633f37e8..41a98744ad 100644 --- a/src/ExtLib/ffmpeg/MAINTAINERS +++ b/src/ExtLib/ffmpeg/MAINTAINERS @@ -488,6 +488,7 @@ Resamplers: Operating systems / CPU architectures ===================================== +*BSD Brad Smith Alpha Falk Hueffner MIPS Manojkumar Bhosale, Shiyou Yin LoongArch Shiyou Yin diff --git a/src/ExtLib/ffmpeg/ffmpeg.mak b/src/ExtLib/ffmpeg/ffmpeg.mak index 834da25e54..09e0663de3 100644 --- a/src/ExtLib/ffmpeg/ffmpeg.mak +++ b/src/ExtLib/ffmpeg/ffmpeg.mak @@ -901,7 +901,9 @@ SRCS_YASM_LC = \ \ libavcodec/x86/h26x/h2656_inter.asm \ \ - libavcodec/x86/vvc/vvc_mc.asm + libavcodec/x86/vvc/vvc_alf.asm \ + libavcodec/x86/vvc/vvc_mc.asm \ + libavcodec/x86/vvc/vvc_sad.asm SRCS_YASM_LF = diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c index 885d824fa7..03ec264c50 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c @@ -79,6 +79,11 @@ static const float cce_scale[] = { #include "aacdec_tab.h" #include "libavutil/intfloat.h" +#include "config.h" +#if ARCH_ARM +#include "libavcodec/arm/aac.h" +#endif + #ifndef VMUL2 static inline float *VMUL2(float *dst, const float *v, unsigned idx, const float *scale) diff --git a/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.c b/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.c index 9305b4c50f..f45631d09f 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.c @@ -144,10 +144,9 @@ int ff_aac_ac3_parse(AVCodecParserContext *s1, #endif } else { #if CONFIG_AAC_PARSER - AACADTSHeaderInfo hdr, *phrd = &hdr; - int ret = avpriv_adts_header_parse(&phrd, buf, buf_size); - - if (ret < 0) + AACADTSHeaderInfo hdr; + if (buf_size < AV_AAC_ADTS_HEADER_SIZE || + ff_adts_header_parse_buf(buf, &hdr) < 0) return i; bit_rate = hdr.bit_rate; diff --git a/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.h b/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.h index bc16181a19..e3259d1841 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.h +++ b/src/ExtLib/ffmpeg/libavcodec/aac_ac3_parser.h @@ -28,16 +28,6 @@ #include "avcodec.h" #include "parser.h" -typedef enum { - AAC_AC3_PARSE_ERROR_SYNC = -0x1030c0a, - AAC_AC3_PARSE_ERROR_BSID = -0x2030c0a, - AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a, - AAC_AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a, - AAC_AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a, - AAC_AC3_PARSE_ERROR_CRC = -0x6030c0a, - AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -0x7030c0a, -} AACAC3ParseError; - typedef struct AACAC3ParseContext { ParseContext pc; int header_size; diff --git a/src/ExtLib/ffmpeg/libavcodec/aac_parser.c b/src/ExtLib/ffmpeg/libavcodec/aac_parser.c index f295dfccdd..186fcd887a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac_parser.c @@ -24,24 +24,18 @@ #include "aac_ac3_parser.h" #include "adts_header.h" #include "adts_parser.h" -#include "get_bits.h" -#include "mpeg4audio.h" +#include "libavutil/intreadwrite.h" static int aac_sync(uint64_t state, int *need_next_header, int *new_frame_start) { - GetBitContext bits; + uint8_t tmp[8 + AV_INPUT_BUFFER_PADDING_SIZE]; AACADTSHeaderInfo hdr; int size; - union { - uint64_t u64; - uint8_t u8[8 + AV_INPUT_BUFFER_PADDING_SIZE]; - } tmp; - tmp.u64 = av_be2ne64(state); - init_get_bits(&bits, tmp.u8 + 8 - AV_AAC_ADTS_HEADER_SIZE, - AV_AAC_ADTS_HEADER_SIZE * 8); + AV_WB64(tmp, state); - if ((size = ff_adts_header_parse(&bits, &hdr)) < 0) + size = ff_adts_header_parse_buf(tmp + 8 - AV_AAC_ADTS_HEADER_SIZE, &hdr); + if (size < 0) return 0; *need_next_header = 0; *new_frame_start = 1; diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3_parser.c b/src/ExtLib/ffmpeg/libavcodec/ac3_parser.c index 4e0ba73481..69989690dd 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/ac3_parser.c @@ -81,12 +81,12 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) hdr->sync_word = get_bits(gbc, 16); if(hdr->sync_word != 0x0B77) - return AAC_AC3_PARSE_ERROR_SYNC; + return AC3_PARSE_ERROR_SYNC; /* read ahead to bsid to distinguish between AC-3 and E-AC-3 */ hdr->bitstream_id = show_bits_long(gbc, 29) & 0x1F; if(hdr->bitstream_id > 16) - return AAC_AC3_PARSE_ERROR_BSID; + return AC3_PARSE_ERROR_BSID; hdr->num_blocks = 6; hdr->ac3_bit_rate_code = -1; @@ -103,11 +103,11 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) hdr->crc1 = get_bits(gbc, 16); hdr->sr_code = get_bits(gbc, 2); if(hdr->sr_code == 3) - return AAC_AC3_PARSE_ERROR_SAMPLE_RATE; + return AC3_PARSE_ERROR_SAMPLE_RATE; frame_size_code = get_bits(gbc, 6); if(frame_size_code > 37) - return AAC_AC3_PARSE_ERROR_FRAME_SIZE; + return AC3_PARSE_ERROR_FRAME_SIZE; hdr->ac3_bit_rate_code = (frame_size_code >> 1); @@ -138,19 +138,19 @@ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr) hdr->crc1 = 0; hdr->frame_type = get_bits(gbc, 2); if(hdr->frame_type == EAC3_FRAME_TYPE_RESERVED) - return AAC_AC3_PARSE_ERROR_FRAME_TYPE; + return AC3_PARSE_ERROR_FRAME_TYPE; hdr->substreamid = get_bits(gbc, 3); hdr->frame_size = (get_bits(gbc, 11) + 1) << 1; if(hdr->frame_size < AC3_HEADER_SIZE) - return AAC_AC3_PARSE_ERROR_FRAME_SIZE; + return AC3_PARSE_ERROR_FRAME_SIZE; hdr->sr_code = get_bits(gbc, 2); if (hdr->sr_code == 3) { int sr_code2 = get_bits(gbc, 2); if(sr_code2 == 3) - return AAC_AC3_PARSE_ERROR_SAMPLE_RATE; + return AC3_PARSE_ERROR_SAMPLE_RATE; hdr->sample_rate = ff_ac3_sample_rate_tab[sr_code2] / 2; hdr->sr_shift = 1; } else { diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3_parser_internal.h b/src/ExtLib/ffmpeg/libavcodec/ac3_parser_internal.h index 2ac0e67ec2..46814bfb1f 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3_parser_internal.h +++ b/src/ExtLib/ffmpeg/libavcodec/ac3_parser_internal.h @@ -64,15 +64,22 @@ typedef struct AC3HeaderInfo { /** @} */ } AC3HeaderInfo; +typedef enum { + AC3_PARSE_ERROR_SYNC = -0x1030c0a, + AC3_PARSE_ERROR_BSID = -0x2030c0a, + AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a, + AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a, + AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a, + AC3_PARSE_ERROR_CRC = -0x6030c0a, +} AC3ParseError; + /** * Parse AC-3 frame header. * Parse the header up to the lfeon element, which is the first 52 or 54 bits * depending on the audio coding mode. * @param[in] gbc BitContext containing the first 54 bits of the frame. * @param[out] hdr Pointer to struct where header info is written. - * @return Returns 0 on success, -1 if there is a sync word mismatch, - * -2 if the bsid (version) element is invalid, -3 if the fscod (sample rate) - * element is invalid, or -4 if the frmsizecod (bit rate) element is invalid. + * @return 0 on success and AC3_PARSE_ERROR_* values otherwise. */ int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr); diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3dec.c b/src/ExtLib/ffmpeg/libavcodec/ac3dec.c index 2d7e11c5b8..0a4d3375ee 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/ac3dec.c @@ -39,7 +39,6 @@ #include "libavutil/opt.h" #include "libavutil/thread.h" #include "bswapdsp.h" -#include "aac_ac3_parser.h" #include "ac3_parser_internal.h" #include "ac3dec.h" #include "ac3dec_data.h" @@ -1538,19 +1537,19 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (err) { switch (err) { - case AAC_AC3_PARSE_ERROR_SYNC: + case AC3_PARSE_ERROR_SYNC: av_log(avctx, AV_LOG_ERROR, "frame sync error\n"); return AVERROR_INVALIDDATA; - case AAC_AC3_PARSE_ERROR_BSID: + case AC3_PARSE_ERROR_BSID: av_log(avctx, AV_LOG_ERROR, "invalid bitstream id\n"); break; - case AAC_AC3_PARSE_ERROR_SAMPLE_RATE: + case AC3_PARSE_ERROR_SAMPLE_RATE: av_log(avctx, AV_LOG_ERROR, "invalid sample rate\n"); break; - case AAC_AC3_PARSE_ERROR_FRAME_SIZE: + case AC3_PARSE_ERROR_FRAME_SIZE: av_log(avctx, AV_LOG_ERROR, "invalid frame size\n"); break; - case AAC_AC3_PARSE_ERROR_FRAME_TYPE: + case AC3_PARSE_ERROR_FRAME_TYPE: /* skip frame if CRC is ok. otherwise use error concealment. */ /* TODO: add support for substreams */ if (s->substreamid) { @@ -1563,8 +1562,7 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_ERROR, "invalid frame type\n"); } break; - case AAC_AC3_PARSE_ERROR_CRC: - case AAC_AC3_PARSE_ERROR_CHANNEL_CFG: + case AC3_PARSE_ERROR_CRC: break; default: // Normal AVERROR do not try to recover. *got_frame_ptr = 0; @@ -1574,7 +1572,7 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, /* check that reported frame size fits in input buffer */ if (s->frame_size > buf_size) { av_log(avctx, AV_LOG_ERROR, "incomplete frame\n"); - err = AAC_AC3_PARSE_ERROR_FRAME_SIZE; + err = AC3_PARSE_ERROR_FRAME_SIZE; } else if (avctx->err_recognition & (AV_EF_CRCCHECK|AV_EF_CAREFUL)) { /* check for crc mismatch */ if (av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, &buf[2], @@ -1582,7 +1580,7 @@ static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, av_log(avctx, AV_LOG_ERROR, "frame CRC mismatch\n"); if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; - err = AAC_AC3_PARSE_ERROR_CRC; + err = AC3_PARSE_ERROR_CRC; } } } diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3enc.c b/src/ExtLib/ffmpeg/libavcodec/ac3enc.c index 1a869ab865..3649289865 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3enc.c +++ b/src/ExtLib/ffmpeg/libavcodec/ac3enc.c @@ -1634,63 +1634,63 @@ static void ac3_quantize_mantissas(AC3EncodeContext *s) /* * Write the AC-3 frame header to the output bitstream. */ -static void ac3_output_frame_header(AC3EncodeContext *s) +static void ac3_output_frame_header(AC3EncodeContext *s, PutBitContext *pb) { AC3EncOptions *opt = &s->options; - put_bits(&s->pb, 16, 0x0b77); /* frame header */ - put_bits(&s->pb, 16, 0); /* crc1: will be filled later */ - put_bits(&s->pb, 2, s->bit_alloc.sr_code); - put_bits(&s->pb, 6, s->frame_size_code + (s->frame_size - s->frame_size_min) / 2); - put_bits(&s->pb, 5, s->bitstream_id); - put_bits(&s->pb, 3, s->bitstream_mode); - put_bits(&s->pb, 3, s->channel_mode); + put_bits(pb, 16, 0x0b77); /* frame header */ + put_bits(pb, 16, 0); /* crc1: will be filled later */ + put_bits(pb, 2, s->bit_alloc.sr_code); + put_bits(pb, 6, s->frame_size_code + (s->frame_size - s->frame_size_min) / 2); + put_bits(pb, 5, s->bitstream_id); + put_bits(pb, 3, s->bitstream_mode); + put_bits(pb, 3, s->channel_mode); if ((s->channel_mode & 0x01) && s->channel_mode != AC3_CHMODE_MONO) - put_bits(&s->pb, 2, s->center_mix_level); + put_bits(pb, 2, s->center_mix_level); if (s->channel_mode & 0x04) - put_bits(&s->pb, 2, s->surround_mix_level); + put_bits(pb, 2, s->surround_mix_level); if (s->channel_mode == AC3_CHMODE_STEREO) - put_bits(&s->pb, 2, opt->dolby_surround_mode); - put_bits(&s->pb, 1, s->lfe_on); /* LFE */ - put_bits(&s->pb, 5, -opt->dialogue_level); - put_bits(&s->pb, 1, 0); /* no compression control word */ - put_bits(&s->pb, 1, 0); /* no lang code */ - put_bits(&s->pb, 1, opt->audio_production_info); + put_bits(pb, 2, opt->dolby_surround_mode); + put_bits(pb, 1, s->lfe_on); /* LFE */ + put_bits(pb, 5, -opt->dialogue_level); + put_bits(pb, 1, 0); /* no compression control word */ + put_bits(pb, 1, 0); /* no lang code */ + put_bits(pb, 1, opt->audio_production_info); if (opt->audio_production_info) { - put_bits(&s->pb, 5, opt->mixing_level - 80); - put_bits(&s->pb, 2, opt->room_type); + put_bits(pb, 5, opt->mixing_level - 80); + put_bits(pb, 2, opt->room_type); } - put_bits(&s->pb, 1, opt->copyright); - put_bits(&s->pb, 1, opt->original); + put_bits(pb, 1, opt->copyright); + put_bits(pb, 1, opt->original); if (s->bitstream_id == 6) { /* alternate bit stream syntax */ - put_bits(&s->pb, 1, opt->extended_bsi_1); + put_bits(pb, 1, opt->extended_bsi_1); if (opt->extended_bsi_1) { - put_bits(&s->pb, 2, opt->preferred_stereo_downmix); - put_bits(&s->pb, 3, s->ltrt_center_mix_level); - put_bits(&s->pb, 3, s->ltrt_surround_mix_level); - put_bits(&s->pb, 3, s->loro_center_mix_level); - put_bits(&s->pb, 3, s->loro_surround_mix_level); + put_bits(pb, 2, opt->preferred_stereo_downmix); + put_bits(pb, 3, s->ltrt_center_mix_level); + put_bits(pb, 3, s->ltrt_surround_mix_level); + put_bits(pb, 3, s->loro_center_mix_level); + put_bits(pb, 3, s->loro_surround_mix_level); } - put_bits(&s->pb, 1, opt->extended_bsi_2); + put_bits(pb, 1, opt->extended_bsi_2); if (opt->extended_bsi_2) { - put_bits(&s->pb, 2, opt->dolby_surround_ex_mode); - put_bits(&s->pb, 2, opt->dolby_headphone_mode); - put_bits(&s->pb, 1, opt->ad_converter_type); - put_bits(&s->pb, 9, 0); /* xbsi2 and encinfo : reserved */ + put_bits(pb, 2, opt->dolby_surround_ex_mode); + put_bits(pb, 2, opt->dolby_headphone_mode); + put_bits(pb, 1, opt->ad_converter_type); + put_bits(pb, 9, 0); /* xbsi2 and encinfo : reserved */ } } else { - put_bits(&s->pb, 1, 0); /* no time code 1 */ - put_bits(&s->pb, 1, 0); /* no time code 2 */ + put_bits(pb, 1, 0); /* no time code 1 */ + put_bits(pb, 1, 0); /* no time code 2 */ } - put_bits(&s->pb, 1, 0); /* no additional bit stream info */ + put_bits(pb, 1, 0); /* no additional bit stream info */ } /* * Write one audio block to the output bitstream. */ -static void output_audio_block(AC3EncodeContext *s, int blk) +static void output_audio_block(AC3EncodeContext *s, PutBitContext *pb, int blk) { int ch, i, baie, bnd, got_cpl, av_uninit(ch0); AC3Block *block = &s->blocks[blk]; @@ -1698,48 +1698,48 @@ static void output_audio_block(AC3EncodeContext *s, int blk) /* block switching */ if (!s->eac3) { for (ch = 0; ch < s->fbw_channels; ch++) - put_bits(&s->pb, 1, 0); + put_bits(pb, 1, 0); } /* dither flags */ if (!s->eac3) { for (ch = 0; ch < s->fbw_channels; ch++) - put_bits(&s->pb, 1, 1); + put_bits(pb, 1, 1); } /* dynamic range codes */ - put_bits(&s->pb, 1, 0); + put_bits(pb, 1, 0); /* spectral extension */ if (s->eac3) - put_bits(&s->pb, 1, 0); + put_bits(pb, 1, 0); /* channel coupling */ if (!s->eac3) - put_bits(&s->pb, 1, block->new_cpl_strategy); + put_bits(pb, 1, block->new_cpl_strategy); if (block->new_cpl_strategy) { if (!s->eac3) - put_bits(&s->pb, 1, block->cpl_in_use); + put_bits(pb, 1, block->cpl_in_use); if (block->cpl_in_use) { int start_sub, end_sub; if (s->eac3) - put_bits(&s->pb, 1, 0); /* enhanced coupling */ + put_bits(pb, 1, 0); /* enhanced coupling */ if (!s->eac3 || s->channel_mode != AC3_CHMODE_STEREO) { for (ch = 1; ch <= s->fbw_channels; ch++) - put_bits(&s->pb, 1, block->channel_in_cpl[ch]); + put_bits(pb, 1, block->channel_in_cpl[ch]); } if (s->channel_mode == AC3_CHMODE_STEREO) - put_bits(&s->pb, 1, 0); /* phase flags in use */ + put_bits(pb, 1, 0); /* phase flags in use */ start_sub = (s->start_freq[CPL_CH] - 37) / 12; end_sub = (s->cpl_end_freq - 37) / 12; - put_bits(&s->pb, 4, start_sub); - put_bits(&s->pb, 4, end_sub - 3); + put_bits(pb, 4, start_sub); + put_bits(pb, 4, end_sub - 3); /* coupling band structure */ if (s->eac3) { - put_bits(&s->pb, 1, 0); /* use default */ + put_bits(pb, 1, 0); /* use default */ } else { for (bnd = start_sub+1; bnd < end_sub; bnd++) - put_bits(&s->pb, 1, ff_eac3_default_cpl_band_struct[bnd]); + put_bits(pb, 1, ff_eac3_default_cpl_band_struct[bnd]); } } } @@ -1749,12 +1749,12 @@ static void output_audio_block(AC3EncodeContext *s, int blk) for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { if (!s->eac3 || block->new_cpl_coords[ch] != 2) - put_bits(&s->pb, 1, block->new_cpl_coords[ch]); + put_bits(pb, 1, block->new_cpl_coords[ch]); if (block->new_cpl_coords[ch]) { - put_bits(&s->pb, 2, block->cpl_master_exp[ch]); + put_bits(pb, 2, block->cpl_master_exp[ch]); for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { - put_bits(&s->pb, 4, block->cpl_coord_exp [ch][bnd]); - put_bits(&s->pb, 4, block->cpl_coord_mant[ch][bnd]); + put_bits(pb, 4, block->cpl_coord_exp [ch][bnd]); + put_bits(pb, 4, block->cpl_coord_mant[ch][bnd]); } } } @@ -1764,26 +1764,26 @@ static void output_audio_block(AC3EncodeContext *s, int blk) /* stereo rematrixing */ if (s->channel_mode == AC3_CHMODE_STEREO) { if (!s->eac3 || blk > 0) - put_bits(&s->pb, 1, block->new_rematrixing_strategy); + put_bits(pb, 1, block->new_rematrixing_strategy); if (block->new_rematrixing_strategy) { /* rematrixing flags */ for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) - put_bits(&s->pb, 1, block->rematrixing_flags[bnd]); + put_bits(pb, 1, block->rematrixing_flags[bnd]); } } /* exponent strategy */ if (!s->eac3) { for (ch = !block->cpl_in_use; ch <= s->fbw_channels; ch++) - put_bits(&s->pb, 2, s->exp_strategy[ch][blk]); + put_bits(pb, 2, s->exp_strategy[ch][blk]); if (s->lfe_on) - put_bits(&s->pb, 1, s->exp_strategy[s->lfe_channel][blk]); + put_bits(pb, 1, s->exp_strategy[s->lfe_channel][blk]); } /* bandwidth */ for (ch = 1; ch <= s->fbw_channels; ch++) { if (s->exp_strategy[ch][blk] != EXP_REUSE && !block->channel_in_cpl[ch]) - put_bits(&s->pb, 6, s->bandwidth_code); + put_bits(pb, 6, s->bandwidth_code); } /* exponents */ @@ -1795,58 +1795,58 @@ static void output_audio_block(AC3EncodeContext *s, int blk) continue; /* DC exponent */ - put_bits(&s->pb, 4, block->grouped_exp[ch][0] >> cpl); + put_bits(pb, 4, block->grouped_exp[ch][0] >> cpl); /* exponent groups */ nb_groups = exponent_group_tab[cpl][s->exp_strategy[ch][blk]-1][block->end_freq[ch]-s->start_freq[ch]]; for (i = 1; i <= nb_groups; i++) - put_bits(&s->pb, 7, block->grouped_exp[ch][i]); + put_bits(pb, 7, block->grouped_exp[ch][i]); /* gain range info */ if (ch != s->lfe_channel && !cpl) - put_bits(&s->pb, 2, 0); + put_bits(pb, 2, 0); } /* bit allocation info */ if (!s->eac3) { baie = (blk == 0); - put_bits(&s->pb, 1, baie); + put_bits(pb, 1, baie); if (baie) { - put_bits(&s->pb, 2, s->slow_decay_code); - put_bits(&s->pb, 2, s->fast_decay_code); - put_bits(&s->pb, 2, s->slow_gain_code); - put_bits(&s->pb, 2, s->db_per_bit_code); - put_bits(&s->pb, 3, s->floor_code); + put_bits(pb, 2, s->slow_decay_code); + put_bits(pb, 2, s->fast_decay_code); + put_bits(pb, 2, s->slow_gain_code); + put_bits(pb, 2, s->db_per_bit_code); + put_bits(pb, 3, s->floor_code); } } /* snr offset */ if (!s->eac3) { - put_bits(&s->pb, 1, block->new_snr_offsets); + put_bits(pb, 1, block->new_snr_offsets); if (block->new_snr_offsets) { - put_bits(&s->pb, 6, s->coarse_snr_offset); + put_bits(pb, 6, s->coarse_snr_offset); for (ch = !block->cpl_in_use; ch <= s->channels; ch++) { - put_bits(&s->pb, 4, s->fine_snr_offset[ch]); - put_bits(&s->pb, 3, s->fast_gain_code[ch]); + put_bits(pb, 4, s->fine_snr_offset[ch]); + put_bits(pb, 3, s->fast_gain_code[ch]); } } } else { - put_bits(&s->pb, 1, 0); /* no converter snr offset */ + put_bits(pb, 1, 0); /* no converter snr offset */ } /* coupling leak */ if (block->cpl_in_use) { if (!s->eac3 || block->new_cpl_leak != 2) - put_bits(&s->pb, 1, block->new_cpl_leak); + put_bits(pb, 1, block->new_cpl_leak); if (block->new_cpl_leak) { - put_bits(&s->pb, 3, s->bit_alloc.cpl_fast_leak); - put_bits(&s->pb, 3, s->bit_alloc.cpl_slow_leak); + put_bits(pb, 3, s->bit_alloc.cpl_fast_leak); + put_bits(pb, 3, s->bit_alloc.cpl_slow_leak); } } if (!s->eac3) { - put_bits(&s->pb, 1, 0); /* no delta bit allocation */ - put_bits(&s->pb, 1, 0); /* no data to skip */ + put_bits(pb, 1, 0); /* no delta bit allocation */ + put_bits(pb, 1, 0); /* no data to skip */ } /* mantissas */ @@ -1864,13 +1864,13 @@ static void output_audio_block(AC3EncodeContext *s, int blk) b = s->ref_bap[ch][blk][i]; switch (b) { case 0: break; - case 1: if (q != 128) put_bits (&s->pb, 5, q); break; - case 2: if (q != 128) put_bits (&s->pb, 7, q); break; - case 3: put_sbits(&s->pb, 3, q); break; - case 4: if (q != 128) put_bits (&s->pb, 7, q); break; - case 14: put_sbits(&s->pb, 14, q); break; - case 15: put_sbits(&s->pb, 16, q); break; - default: put_sbits(&s->pb, b-1, q); break; + case 1: if (q != 128) put_bits (pb, 5, q); break; + case 2: if (q != 128) put_bits (pb, 7, q); break; + case 3: put_sbits(pb, 3, q); break; + case 4: if (q != 128) put_bits (pb, 7, q); break; + case 14: put_sbits(pb, 14, q); break; + case 15: put_sbits(pb, 16, q); break; + default: put_sbits(pb, b-1, q); break; } } if (ch == CPL_CH) @@ -1917,7 +1917,7 @@ static unsigned int pow_poly(unsigned int a, unsigned int n, unsigned int poly) /* * Fill the end of the frame with 0's and compute the two CRCs. */ -static void output_frame_end(AC3EncodeContext *s) +static void output_frame_end(AC3EncodeContext *s, PutBitContext *pb) { const AVCRC *crc_ctx = av_crc_get_table(AV_CRC_16_ANSI); int frame_size_58, pad_bytes, crc1, crc2, crc_inv; @@ -1926,13 +1926,13 @@ static void output_frame_end(AC3EncodeContext *s) frame_size_58 = ((s->frame_size >> 2) + (s->frame_size >> 4)) << 1; /* pad the remainder of the frame with zeros */ - av_assert2(s->frame_size * 8 - put_bits_count(&s->pb) >= 18); - flush_put_bits(&s->pb); - frame = s->pb.buf; - pad_bytes = s->frame_size - (put_bits_ptr(&s->pb) - frame) - 2; + av_assert2(s->frame_size * 8 - put_bits_count(pb) >= 18); + flush_put_bits(pb); + frame = pb->buf; + pad_bytes = s->frame_size - (put_bits_ptr(pb) - frame) - 2; av_assert2(pad_bytes >= 0); if (pad_bytes > 0) - memset(put_bits_ptr(&s->pb), 0, pad_bytes); + memset(put_bits_ptr(pb), 0, pad_bytes); if (s->eac3) { /* compute crc2 */ @@ -1969,16 +1969,17 @@ static void output_frame_end(AC3EncodeContext *s) */ static void ac3_output_frame(AC3EncodeContext *s, unsigned char *frame) { + PutBitContext pb; int blk; - init_put_bits(&s->pb, frame, s->frame_size); + init_put_bits(&pb, frame, s->frame_size); - s->output_frame_header(s); + s->output_frame_header(s, &pb); for (blk = 0; blk < s->num_blocks; blk++) - output_audio_block(s, blk); + output_audio_block(s, &pb, blk); - output_frame_end(s); + output_frame_end(s, &pb); } int ff_ac3_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3enc.h b/src/ExtLib/ffmpeg/libavcodec/ac3enc.h index 30812617cc..5e98ad188b 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3enc.h +++ b/src/ExtLib/ffmpeg/libavcodec/ac3enc.h @@ -41,7 +41,6 @@ #include "codec_internal.h" #include "mathops.h" #include "me_cmp.h" -#include "put_bits.h" #include "audiodsp.h" #ifndef AC3ENC_FLOAT @@ -151,6 +150,8 @@ typedef struct AC3Block { int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant) } AC3Block; +struct PutBitContext; + /** * AC-3 encoder private context. */ @@ -158,7 +159,6 @@ typedef struct AC3EncodeContext { AVClass *av_class; ///< AVClass used for AVOption AC3EncOptions options; ///< encoding options AVCodecContext *avctx; ///< parent AVCodecContext - PutBitContext pb; ///< bitstream writer context AudioDSPContext adsp; #if AC3ENC_FLOAT AVFloatDSPContext *fdsp; @@ -256,7 +256,7 @@ typedef struct AC3EncodeContext { void (*encode_frame)(struct AC3EncodeContext *s, uint8_t * const *samples); /* AC-3 vs. E-AC-3 function pointers */ - void (*output_frame_header)(struct AC3EncodeContext *s); + void (*output_frame_header)(struct AC3EncodeContext *s, struct PutBitContext *pb); union { DECLARE_ALIGNED(32, float, mdct_window_float)[AC3_BLOCK_SIZE]; diff --git a/src/ExtLib/ffmpeg/libavcodec/ac3enc_template.c b/src/ExtLib/ffmpeg/libavcodec/ac3enc_template.c index 45b4273412..2ec6065e51 100644 --- a/src/ExtLib/ffmpeg/libavcodec/ac3enc_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/ac3enc_template.c @@ -31,6 +31,7 @@ #include #include "libavutil/attributes.h" +#include "libavutil/avassert.h" #include "libavutil/mem_internal.h" #include "audiodsp.h" @@ -50,14 +51,15 @@ */ static void apply_mdct(AC3EncodeContext *s, uint8_t * const *samples) { - int blk, ch; + av_assert1(s->num_blocks > 0); - for (ch = 0; ch < s->channels; ch++) { + for (int ch = 0; ch < s->channels; ch++) { const SampleType *input_samples0 = (const SampleType*)s->planar_samples[ch]; /* Reorder channels from native order to AC-3 order. */ const SampleType *input_samples1 = (const SampleType*)samples[s->channel_map[ch]]; + int blk = 0; - for (blk = 0; blk < s->num_blocks; blk++) { + do { AC3Block *block = &s->blocks[blk]; SampleType *windowed_samples = s->RENAME(windowed_samples); @@ -71,7 +73,8 @@ static void apply_mdct(AC3EncodeContext *s, uint8_t * const *samples) windowed_samples, sizeof(*windowed_samples)); input_samples0 = input_samples1; input_samples1 += AC3_BLOCK_SIZE; - } + } while (++blk < s->num_blocks); + /* Store last 256 samples of current frame */ memcpy(s->planar_samples[ch], input_samples0, AC3_BLOCK_SIZE * sizeof(*input_samples0)); diff --git a/src/ExtLib/ffmpeg/libavcodec/adts_header.c b/src/ExtLib/ffmpeg/libavcodec/adts_header.c index 00fa0a5a99..0d6be1aa0e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/adts_header.c +++ b/src/ExtLib/ffmpeg/libavcodec/adts_header.c @@ -21,11 +21,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "aac_ac3_parser.h" #include "adts_header.h" #include "adts_parser.h" #include "get_bits.h" #include "mpeg4audio.h" +#include "libavutil/avassert.h" int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr) { @@ -35,7 +35,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr) memset(hdr, 0, sizeof(*hdr)); if (get_bits(gbc, 12) != 0xfff) - return AAC_AC3_PARSE_ERROR_SYNC; + return AAC_PARSE_ERROR_SYNC; skip_bits1(gbc); /* id */ skip_bits(gbc, 2); /* layer */ @@ -43,7 +43,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr) aot = get_bits(gbc, 2); /* profile_objecttype */ sr = get_bits(gbc, 4); /* sample_frequency_index */ if (!ff_mpeg4audio_sample_rates[sr]) - return AAC_AC3_PARSE_ERROR_SAMPLE_RATE; + return AAC_PARSE_ERROR_SAMPLE_RATE; skip_bits1(gbc); /* private_bit */ ch = get_bits(gbc, 3); /* channel_configuration */ @@ -55,7 +55,7 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr) skip_bits1(gbc); /* copyright_identification_start */ size = get_bits(gbc, 13); /* aac_frame_length */ if (size < AV_AAC_ADTS_HEADER_SIZE) - return AAC_AC3_PARSE_ERROR_FRAME_SIZE; + return AAC_PARSE_ERROR_FRAME_SIZE; skip_bits(gbc, 11); /* adts_buffer_fullness */ rdb = get_bits(gbc, 2); /* number_of_raw_data_blocks_in_frame */ @@ -72,3 +72,12 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr) return size; } + +int ff_adts_header_parse_buf(const uint8_t buf[AV_AAC_ADTS_HEADER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE], + AACADTSHeaderInfo *hdr) +{ + GetBitContext gb; + av_unused int ret = init_get_bits8(&gb, buf, AV_AAC_ADTS_HEADER_SIZE); + av_assert1(ret >= 0); + return ff_adts_header_parse(&gb, hdr); +} diff --git a/src/ExtLib/ffmpeg/libavcodec/adts_header.h b/src/ExtLib/ffmpeg/libavcodec/adts_header.h index 354d07e1f8..49bb74ee22 100644 --- a/src/ExtLib/ffmpeg/libavcodec/adts_header.h +++ b/src/ExtLib/ffmpeg/libavcodec/adts_header.h @@ -23,7 +23,14 @@ #ifndef AVCODEC_ADTS_HEADER_H #define AVCODEC_ADTS_HEADER_H -#include "get_bits.h" +#include "adts_parser.h" +#include "defs.h" + +typedef enum { + AAC_PARSE_ERROR_SYNC = -0x1030c0a, + AAC_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a, + AAC_PARSE_ERROR_FRAME_SIZE = -0x4030c0a, +} AACParseError; typedef struct AACADTSHeaderInfo { uint32_t sample_rate; @@ -37,16 +44,24 @@ typedef struct AACADTSHeaderInfo { uint32_t frame_length; } AACADTSHeaderInfo; +struct GetBitContext; + /** * Parse the ADTS frame header to the end of the variable header, which is * the first 54 bits. * @param[in] gbc BitContext containing the first 54 bits of the frame. * @param[out] hdr Pointer to struct where header info is written. - * @return Returns 0 on success, -1 if there is a sync word mismatch, - * -2 if the version element is invalid, -3 if the sample rate - * element is invalid, or -4 if the bit rate element is invalid. + * @return the size in bytes of the header parsed on success and + * AAC_PARSE_ERROR_* values otherwise. + */ +int ff_adts_header_parse(struct GetBitContext *gbc, AACADTSHeaderInfo *hdr); + +/** + * Wrapper around ff_adts_header_parse() for users that don't already have + * a suitable GetBitContext. */ -int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr); +int ff_adts_header_parse_buf(const uint8_t buf[AV_AAC_ADTS_HEADER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE], + AACADTSHeaderInfo *hdr); /** * Parse the ADTS frame header contained in the buffer, which is @@ -56,9 +71,8 @@ int ff_adts_header_parse(GetBitContext *gbc, AACADTSHeaderInfo *hdr); * @param[out] phdr Pointer to pointer to struct AACADTSHeaderInfo for which * memory is allocated and header info is written into it. After using the header * information, the allocated memory must be freed by using av_free. - * @return Returns 0 on success, -1 if there is a sync word mismatch, - * -2 if the version element is invalid, -3 if the sample rate - * element is invalid, or -4 if the bit rate element is invalid. + * @return 0 on success, AAC_PARSE_ERROR_* values on invalid input and + * ordinary AVERROR codes otherwise. */ int avpriv_adts_header_parse(AACADTSHeaderInfo **phdr, const uint8_t *buf, size_t size); diff --git a/src/ExtLib/ffmpeg/libavcodec/adts_parser.c b/src/ExtLib/ffmpeg/libavcodec/adts_parser.c index 6c22c86ef2..66b988d6f6 100644 --- a/src/ExtLib/ffmpeg/libavcodec/adts_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/adts_parser.c @@ -20,7 +20,9 @@ #include #include +#include +#include "libavutil/error.h" #include "libavutil/mem.h" #include "adts_header.h" #include "adts_parser.h" @@ -28,12 +30,13 @@ int av_adts_header_parse(const uint8_t *buf, uint32_t *samples, uint8_t *frames) { #if CONFIG_ADTS_HEADER - GetBitContext gb; + uint8_t tmpbuf[AV_AAC_ADTS_HEADER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE]; AACADTSHeaderInfo hdr; - int err = init_get_bits8(&gb, buf, AV_AAC_ADTS_HEADER_SIZE); - if (err < 0) - return err; - err = ff_adts_header_parse(&gb, &hdr); + int err; + if (!buf) + return AVERROR(EINVAL); + memcpy(tmpbuf, buf, AV_AAC_ADTS_HEADER_SIZE); + err = ff_adts_header_parse_buf(tmpbuf, &hdr); if (err < 0) return err; *samples = hdr.samples; @@ -49,7 +52,6 @@ int avpriv_adts_header_parse(AACADTSHeaderInfo **phdr, const uint8_t *buf, size_ #if CONFIG_ADTS_HEADER int ret = 0; int allocated = 0; - GetBitContext gb; if (!phdr || !buf || size < AV_AAC_ADTS_HEADER_SIZE) return AVERROR_INVALIDDATA; @@ -61,14 +63,7 @@ int avpriv_adts_header_parse(AACADTSHeaderInfo **phdr, const uint8_t *buf, size_ if (!*phdr) return AVERROR(ENOMEM); - ret = init_get_bits8(&gb, buf, AV_AAC_ADTS_HEADER_SIZE); - if (ret < 0) { - if (allocated) - av_freep(phdr); - return ret; - } - - ret = ff_adts_header_parse(&gb, *phdr); + ret = ff_adts_header_parse_buf(buf, *phdr); if (ret < 0) { if (allocated) av_freep(phdr); diff --git a/src/ExtLib/ffmpeg/libavcodec/aic.c b/src/ExtLib/ffmpeg/libavcodec/aic.c index 440c399049..3ff170b414 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aic.c +++ b/src/ExtLib/ffmpeg/libavcodec/aic.c @@ -393,8 +393,6 @@ static int aic_decode_frame(AVCodecContext *avctx, AVFrame *frame, int slice_size; ctx->frame = frame; - ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->flags |= AV_FRAME_FLAG_KEY; off = FFALIGN(AIC_HDR_SIZE + ctx->num_x_slices * ctx->mb_height * 2, 4); diff --git a/src/ExtLib/ffmpeg/libavcodec/avcodec.h b/src/ExtLib/ffmpeg/libavcodec/avcodec.h index 968009a192..2da63c87ea 100644 --- a/src/ExtLib/ffmpeg/libavcodec/avcodec.h +++ b/src/ExtLib/ffmpeg/libavcodec/avcodec.h @@ -1538,6 +1538,7 @@ typedef struct AVCodecContext { #define FF_DCT_MMX 3 #define FF_DCT_ALTIVEC 5 #define FF_DCT_FAAN 6 +#define FF_DCT_NEON 7 /** * IDCT algorithm, see FF_IDCT_* below. diff --git a/src/ExtLib/ffmpeg/libavcodec/bsf/aac_adtstoasc.c b/src/ExtLib/ffmpeg/libavcodec/bsf/aac_adtstoasc.c index dd5e8b2a31..b821414f2a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/bsf/aac_adtstoasc.c +++ b/src/ExtLib/ffmpeg/libavcodec/bsf/aac_adtstoasc.c @@ -40,7 +40,6 @@ static int aac_adtstoasc_filter(AVBSFContext *bsfc, AVPacket *pkt) { AACBSFContext *ctx = bsfc->priv_data; - GetBitContext gb; PutBitContext pb; AACADTSHeaderInfo hdr; int ret; @@ -55,9 +54,7 @@ static int aac_adtstoasc_filter(AVBSFContext *bsfc, AVPacket *pkt) if (pkt->size < AV_AAC_ADTS_HEADER_SIZE) goto packet_too_small; - init_get_bits(&gb, pkt->data, AV_AAC_ADTS_HEADER_SIZE * 8); - - if (ff_adts_header_parse(&gb, &hdr) < 0) { + if (ff_adts_header_parse_buf(pkt->data, &hdr) < 0) { av_log(bsfc, AV_LOG_ERROR, "Error parsing ADTS frame header!\n"); ret = AVERROR_INVALIDDATA; goto fail; @@ -81,6 +78,7 @@ static int aac_adtstoasc_filter(AVBSFContext *bsfc, AVPacket *pkt) uint8_t *extradata; if (!hdr.chan_config) { + GetBitContext gb; init_get_bits(&gb, pkt->data, pkt->size * 8); if (get_bits(&gb, 3) != 5) { avpriv_report_missing_feature(bsfc, diff --git a/src/ExtLib/ffmpeg/libavcodec/cbs_h266_syntax_template.c b/src/ExtLib/ffmpeg/libavcodec/cbs_h266_syntax_template.c index 725cee5b03..38685704c5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/cbs_h266_syntax_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/cbs_h266_syntax_template.c @@ -790,6 +790,21 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw, infer(vps_each_layer_is_an_ols_flag, 1); infer(vps_num_ptls_minus1, 0); } + + for (i = 0; i <= current->vps_num_ptls_minus1; i++) { + if (i > 0) + flags(vps_pt_present_flag[i], 1, i); + else + infer(vps_pt_present_flag[i], 1); + + if (!current->vps_default_ptl_dpb_hrd_max_tid_flag) + us(3, vps_ptl_max_tid[i], 0, current->vps_max_sublayers_minus1, 1, i); + else + infer(vps_ptl_max_tid[i], current->vps_max_sublayers_minus1); + } + while (byte_alignment(rw) != 0) + fixed(1, vps_ptl_alignment_zero_bit, 0); + { //calc NumMultiLayerOlss int m; @@ -915,19 +930,6 @@ static int FUNC(vps) (CodedBitstreamContext *ctx, RWContext *rw, return AVERROR_INVALIDDATA; } - for (i = 0; i <= current->vps_num_ptls_minus1; i++) { - if (i > 0) - flags(vps_pt_present_flag[i], 1, i); - else - infer(vps_pt_present_flag[i], 1); - - if (!current->vps_default_ptl_dpb_hrd_max_tid_flag) - us(3, vps_ptl_max_tid[i], 0, current->vps_max_sublayers_minus1, 1, i); - else - infer(vps_ptl_max_tid[i], current->vps_max_sublayers_minus1); - } - while (byte_alignment(rw) != 0) - fixed(1, vps_ptl_alignment_zero_bit, 0); for (i = 0; i <= current->vps_num_ptls_minus1; i++) { CHECK(FUNC(profile_tier_level) (ctx, rw, current->vps_profile_tier_level + i, diff --git a/src/ExtLib/ffmpeg/libavcodec/cllc.c b/src/ExtLib/ffmpeg/libavcodec/cllc.c index 9b07f7c78e..168b8cb3d0 100644 --- a/src/ExtLib/ffmpeg/libavcodec/cllc.c +++ b/src/ExtLib/ffmpeg/libavcodec/cllc.c @@ -461,9 +461,6 @@ static int cllc_decode_frame(AVCodecContext *avctx, AVFrame *pic, return AVERROR_INVALIDDATA; } - pic->flags |= AV_FRAME_FLAG_KEY; - pic->pict_type = AV_PICTURE_TYPE_I; - *got_picture_ptr = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/codec_desc.c b/src/ExtLib/ffmpeg/libavcodec/codec_desc.c index 7dba61dc8b..a28ef68061 100644 --- a/src/ExtLib/ffmpeg/libavcodec/codec_desc.c +++ b/src/ExtLib/ffmpeg/libavcodec/codec_desc.c @@ -905,7 +905,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "tgq", .long_name = NULL_IF_CONFIG_SMALL("Electronic Arts TGQ video"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_TQI, @@ -1095,7 +1095,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "jv", .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"), - .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_DFA, @@ -1503,6 +1503,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "avrn", .long_name = NULL_IF_CONFIG_SMALL("Avid AVI Codec"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS, }, { .id = AV_CODEC_ID_CPIA, @@ -1820,7 +1821,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "photocd", .long_name = NULL_IF_CONFIG_SMALL("Kodak Photo CD"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_IPU, @@ -1869,7 +1870,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "vbn", .long_name = NULL_IF_CONFIG_SMALL("Vizrt Binary Image"), - .props = AV_CODEC_PROP_LOSSY, + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, { .id = AV_CODEC_ID_JPEGXL, diff --git a/src/ExtLib/ffmpeg/libavcodec/decode.c b/src/ExtLib/ffmpeg/libavcodec/decode.c index d031b1ca17..791940648d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/decode.c +++ b/src/ExtLib/ffmpeg/libavcodec/decode.c @@ -57,6 +57,20 @@ typedef struct DecodeContext { AVCodecInternal avci; + /** + * This is set to AV_FRAME_FLAG_KEY for decoders of intra-only formats + * (those whose codec descriptor has AV_CODEC_PROP_INTRA_ONLY set) + * to set the flag generically. + */ + int intra_only_flag; + + /** + * This is set to AV_PICTURE_TYPE_I for intra only video decoders + * and to AV_PICTURE_TYPE_NONE for other decoders. It is used to set + * the AVFrame's pict_type before the decoder receives it. + */ + enum AVPictureType initial_pict_type; + /* to prevent infinite loop on errors when draining */ int nb_draining_errors; @@ -382,6 +396,7 @@ static int discard_samples(AVCodecContext *avctx, AVFrame *frame, int64_t *disca static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, int64_t *discarded_samples) { AVCodecInternal *avci = avctx->internal; + DecodeContext *dc = decode_ctx(avci); AVPacket *const pkt = avci->in_pkt; const FFCodec *const codec = ffcodec(avctx->codec); int got_frame, consumed; @@ -409,6 +424,8 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame, if (HAVE_THREADS && avctx->active_thread_type & FF_THREAD_FRAME) { consumed = ff_thread_decode_frame(avctx, frame, &got_frame, pkt); } else { + frame->pict_type = dc->initial_pict_type; + frame->flags |= dc->intra_only_flag; consumed = codec->cb.decode(avctx, frame, &got_frame, pkt); if (!(codec->caps_internal & FF_CODEC_CAP_SETS_PKT_DTS)) @@ -431,7 +448,8 @@ FF_ENABLE_DEPRECATION_WARNINGS } else if (avctx->codec->type == AVMEDIA_TYPE_AUDIO) { ret = !got_frame ? AVERROR(EAGAIN) : discard_samples(avctx, frame, discarded_samples); - } + } else + av_assert0(0); if (ret == AVERROR(EAGAIN)) av_frame_unref(frame); @@ -597,6 +615,8 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) av_assert0(!frame->buf[0]); if (codec->cb_type == FF_CODEC_CB_TYPE_RECEIVE_FRAME) { + frame->pict_type = dc->initial_pict_type; + frame->flags |= dc->intra_only_flag; ret = codec->cb.receive_frame(avctx, frame); emms_c(); if (!ret) { @@ -626,8 +646,7 @@ static int decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame) frame->width = avctx->width; if (!frame->height) frame->height = avctx->height; - } else - frame->flags |= AV_FRAME_FLAG_KEY; + } ret = fill_frame_props(avctx, frame); if (ret < 0) { @@ -1793,6 +1812,13 @@ int ff_decode_preinit(AVCodecContext *avctx) DecodeContext *dc = decode_ctx(avci); int ret = 0; + dc->initial_pict_type = AV_PICTURE_TYPE_NONE; + if (avctx->codec_descriptor->props & AV_CODEC_PROP_INTRA_ONLY) { + dc->intra_only_flag = AV_FRAME_FLAG_KEY; + if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) + dc->initial_pict_type = AV_PICTURE_TYPE_I; + } + /* if the decoder init function was already called previously, * free the already allocated subtitle_header before overwriting it */ av_freep(&avctx->subtitle_header); diff --git a/src/ExtLib/ffmpeg/libavcodec/dnxhddec.c b/src/ExtLib/ffmpeg/libavcodec/dnxhddec.c index e549b38720..fe0809a5f5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dnxhddec.c +++ b/src/ExtLib/ffmpeg/libavcodec/dnxhddec.c @@ -655,8 +655,6 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, AVFrame *picture, if (first_field) { if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) return ret; - picture->pict_type = AV_PICTURE_TYPE_I; - picture->flags |= AV_FRAME_FLAG_KEY; } ctx->buf_size = buf_size - ctx->data_offset; diff --git a/src/ExtLib/ffmpeg/libavcodec/dvdec.c b/src/ExtLib/ffmpeg/libavcodec/dvdec.c index 9e8d40187d..8297b6d2f3 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dvdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/dvdec.c @@ -643,8 +643,6 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, AVFrame *frame, } s->frame = frame; - frame->flags |= AV_FRAME_FLAG_KEY; - frame->pict_type = AV_PICTURE_TYPE_I; avctx->pix_fmt = s->sys->pix_fmt; avctx->framerate = av_inv_q(s->sys->time_base); avctx->bit_rate = av_rescale_q(s->sys->frame_size, diff --git a/src/ExtLib/ffmpeg/libavcodec/dxtory.c b/src/ExtLib/ffmpeg/libavcodec/dxtory.c index f36420cdd9..a9b5d835db 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxtory.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxtory.c @@ -863,8 +863,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if (ret) return ret; - pic->pict_type = AV_PICTURE_TYPE_I; - pic->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/eac3dec.c b/src/ExtLib/ffmpeg/libavcodec/eac3dec.c index 5c71751a0c..2b3bffda6e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/eac3dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/eac3dec.c @@ -39,8 +39,8 @@ #include "avcodec.h" -#include "aac_ac3_parser.h" #include "ac3.h" +#include "ac3_parser_internal.h" #include "ac3dec.h" #include "ac3dec_data.h" #include "eac3_data.h" @@ -300,7 +300,7 @@ static int ff_eac3_parse_header(AC3DecodeContext *s) dependent streams which are used to add or replace channels. */ if (s->frame_type == EAC3_FRAME_TYPE_RESERVED) { av_log(s->avctx, AV_LOG_ERROR, "Reserved frame type\n"); - return AAC_AC3_PARSE_ERROR_FRAME_TYPE; + return AC3_PARSE_ERROR_FRAME_TYPE; } /* The substream id indicates which substream this frame belongs to. each @@ -312,7 +312,7 @@ static int ff_eac3_parse_header(AC3DecodeContext *s) s->eac3_subsbtreamid_found = 1; avpriv_request_sample(s->avctx, "Additional substreams"); } - return AAC_AC3_PARSE_ERROR_FRAME_TYPE; + return AC3_PARSE_ERROR_FRAME_TYPE; } if (s->bit_alloc_params.sr_code == EAC3_SR_CODE_REDUCED) { diff --git a/src/ExtLib/ffmpeg/libavcodec/fdctdsp.c b/src/ExtLib/ffmpeg/libavcodec/fdctdsp.c index f8ba17426c..d20558ce88 100644 --- a/src/ExtLib/ffmpeg/libavcodec/fdctdsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/fdctdsp.c @@ -42,7 +42,9 @@ av_cold void ff_fdctdsp_init(FDCTDSPContext *c, AVCodecContext *avctx) c->fdct248 = ff_fdct248_islow_8; } -#if ARCH_PPC +#if ARCH_AARCH64 + ff_fdctdsp_init_aarch64(c, avctx, high_bit_depth); +#elif ARCH_PPC ff_fdctdsp_init_ppc(c, avctx, high_bit_depth); #elif ARCH_X86 ff_fdctdsp_init_x86(c, avctx, high_bit_depth); diff --git a/src/ExtLib/ffmpeg/libavcodec/fdctdsp.h b/src/ExtLib/ffmpeg/libavcodec/fdctdsp.h index 7378eab870..cad99ed7ca 100644 --- a/src/ExtLib/ffmpeg/libavcodec/fdctdsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/fdctdsp.h @@ -32,6 +32,8 @@ typedef struct FDCTDSPContext { FF_VISIBILITY_PUSH_HIDDEN void ff_fdctdsp_init(FDCTDSPContext *c, struct AVCodecContext *avctx); +void ff_fdctdsp_init_aarch64(FDCTDSPContext *c, struct AVCodecContext *avctx, + unsigned high_bit_depth); void ff_fdctdsp_init_ppc(FDCTDSPContext *c, struct AVCodecContext *avctx, unsigned high_bit_depth); void ff_fdctdsp_init_x86(FDCTDSPContext *c, struct AVCodecContext *avctx, diff --git a/src/ExtLib/ffmpeg/libavcodec/flacdec.c b/src/ExtLib/ffmpeg/libavcodec/flacdec.c index 91bbdc657d..ad921a1bd1 100644 --- a/src/ExtLib/ffmpeg/libavcodec/flacdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/flacdec.c @@ -481,7 +481,7 @@ static int decode_subframe_lpc(FLACContext *s, int32_t *decoded, int pred_order, static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded, int32_t *residual, int pred_order) { - int i, j, ret; + int i, ret; int coeff_prec, qlevel; int coeffs[32]; @@ -509,12 +509,7 @@ static int decode_subframe_lpc_33bps(FLACContext *s, int64_t *decoded, if ((ret = decode_residuals(s, residual, pred_order)) < 0) return ret; - for (i = pred_order; i < s->blocksize; i++, decoded++) { - int64_t sum = 0; - for (j = 0; j < pred_order; j++) - sum += (int64_t)coeffs[j] * (uint64_t)decoded[j]; - decoded[j] = residual[i] + (sum >> qlevel); - } + s->dsp.lpc33(decoded, residual, coeffs, pred_order, qlevel, s->blocksize); return 0; } @@ -602,13 +597,9 @@ static inline int decode_subframe(FLACContext *s, int channel) if (wasted) { if (wasted+bps == 33) { - int i; - for (i = 0; i < s->blocksize; i++) - s->decoded_33bps[i] = (uint64_t)decoded[i] << wasted; + s->dsp.wasted33(s->decoded_33bps, decoded, wasted, s->blocksize); } else if (wasted < 32) { - int i; - for (i = 0; i < s->blocksize; i++) - decoded[i] = (unsigned)decoded[i] << wasted; + s->dsp.wasted32(decoded, wasted, s->blocksize); } } diff --git a/src/ExtLib/ffmpeg/libavcodec/flacdsp.c b/src/ExtLib/ffmpeg/libavcodec/flacdsp.c index 71b4ac44aa..f5362bf66f 100644 --- a/src/ExtLib/ffmpeg/libavcodec/flacdsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/flacdsp.c @@ -84,10 +84,41 @@ static void flac_lpc_32_c(int32_t *decoded, const int coeffs[32], } +static void flac_lpc_33_c(int64_t *decoded, const int32_t *residual, + const int coeffs[32], int pred_order, + int qlevel, int len) +{ + int i, j; + + for (i = pred_order; i < len; i++, decoded++) { + int64_t sum = 0; + for (j = 0; j < pred_order; j++) + sum += (int64_t)coeffs[j] * (uint64_t)decoded[j]; + decoded[j] = residual[i] + (sum >> qlevel); + } +} + +static void flac_wasted_32_c(int32_t *decoded, int wasted, int len) +{ + for (int i = 0; i < len; i++) + decoded[i] = (unsigned)decoded[i] << wasted; +} + +static void flac_wasted_33_c(int64_t *decoded, const int32_t *residual, + int wasted, int len) +{ + for (int i = 0; i < len; i++) + decoded[i] = (uint64_t)residual[i] << wasted; +} + av_cold void ff_flacdsp_init(FLACDSPContext *c, enum AVSampleFormat fmt, int channels) { c->lpc16 = flac_lpc_16_c; c->lpc32 = flac_lpc_32_c; + c->lpc33 = flac_lpc_33_c; + + c->wasted32 = flac_wasted_32_c; + c->wasted33 = flac_wasted_33_c; switch (fmt) { case AV_SAMPLE_FMT_S32: diff --git a/src/ExtLib/ffmpeg/libavcodec/flacdsp.h b/src/ExtLib/ffmpeg/libavcodec/flacdsp.h index 15149c026e..3b7b35a112 100644 --- a/src/ExtLib/ffmpeg/libavcodec/flacdsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/flacdsp.h @@ -30,6 +30,11 @@ typedef struct FLACDSPContext { int qlevel, int len); void (*lpc32)(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); + void (*lpc33)(int64_t *samples, const int32_t *residual, const int coeffs[32], + int pred_order, int qlevel, int len); + void (*wasted32)(int32_t *decoded, int wasted, int len); + void (*wasted33)(int64_t *decoded, const int32_t *residual, + int wasted, int len); void (*lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order, const int32_t coefs[32], int shift); void (*lpc32_encode)(int32_t *res, const int32_t *smp, int len, int order, diff --git a/src/ExtLib/ffmpeg/libavcodec/fraps.c b/src/ExtLib/ffmpeg/libavcodec/fraps.c index 4e45efeba8..d7b713c7c4 100644 --- a/src/ExtLib/ffmpeg/libavcodec/fraps.c +++ b/src/ExtLib/ffmpeg/libavcodec/fraps.c @@ -215,9 +215,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *f, } } - f->pict_type = AV_PICTURE_TYPE_I; - f->flags |= AV_FRAME_FLAG_KEY; - avctx->pix_fmt = version & 1 ? is_pal ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; avctx->color_range = version & 1 ? AVCOL_RANGE_UNSPECIFIED : AVCOL_RANGE_JPEG; diff --git a/src/ExtLib/ffmpeg/libavcodec/h263dsp.c b/src/ExtLib/ffmpeg/libavcodec/h263dsp.c index f7621ce85f..02f21a1403 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h263dsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/h263dsp.c @@ -119,7 +119,9 @@ av_cold void ff_h263dsp_init(H263DSPContext *ctx) ctx->h263_h_loop_filter = h263_h_loop_filter_c; ctx->h263_v_loop_filter = h263_v_loop_filter_c; -#if ARCH_X86 +#if ARCH_RISCV + ff_h263dsp_init_riscv(ctx); +#elif ARCH_X86 ff_h263dsp_init_x86(ctx); #elif ARCH_MIPS ff_h263dsp_init_mips(ctx); diff --git a/src/ExtLib/ffmpeg/libavcodec/h263dsp.h b/src/ExtLib/ffmpeg/libavcodec/h263dsp.h index 2d2f5d8540..17f19157bb 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h263dsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/h263dsp.h @@ -29,6 +29,7 @@ typedef struct H263DSPContext { } H263DSPContext; void ff_h263dsp_init(H263DSPContext *ctx); +void ff_h263dsp_init_riscv(H263DSPContext *ctx); void ff_h263dsp_init_x86(H263DSPContext *ctx); void ff_h263dsp_init_mips(H263DSPContext *ctx); diff --git a/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c b/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c index 96a22e7cf6..1deb76c765 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c +++ b/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c @@ -757,8 +757,7 @@ int ff_h2645_sei_to_frame(AVFrame *frame, H2645SEI *sei, if (!sd) av_buffer_unref(&a53->buf_ref); a53->buf_ref = NULL; - if (avctx) - avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; + avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS; } ret = h2645_sei_to_side_data(avctx, sei, &frame->side_data, &frame->nb_side_data); @@ -844,8 +843,7 @@ FF_ENABLE_DEPRECATION_WARNINGS else fgc->present = fgc->persistence_flag; - if (avctx) - avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; + avctx->properties |= FF_CODEC_PROPERTY_FILM_GRAIN; } #if CONFIG_HEVC_SEI diff --git a/src/ExtLib/ffmpeg/libavcodec/h264_slice.c b/src/ExtLib/ffmpeg/libavcodec/h264_slice.c index 596559d27d..30dca40968 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h264_slice.c +++ b/src/ExtLib/ffmpeg/libavcodec/h264_slice.c @@ -1420,7 +1420,7 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, sps = h->ps.sps; - if (sps && sps->bitstream_restriction_flag && + if (sps->bitstream_restriction_flag && h->avctx->has_b_frames < sps->num_reorder_frames) { h->avctx->has_b_frames = sps->num_reorder_frames; } diff --git a/src/ExtLib/ffmpeg/libavcodec/h264dsp.c b/src/ExtLib/ffmpeg/libavcodec/h264dsp.c index e1052e487e..6e99c4c233 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h264dsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/h264dsp.c @@ -158,6 +158,8 @@ av_cold void ff_h264dsp_init(H264DSPContext *c, const int bit_depth, ff_h264dsp_init_arm(c, bit_depth, chroma_format_idc); #elif ARCH_PPC ff_h264dsp_init_ppc(c, bit_depth, chroma_format_idc); +#elif ARCH_RISCV + ff_h264dsp_init_riscv(c, bit_depth, chroma_format_idc); #elif ARCH_X86 ff_h264dsp_init_x86(c, bit_depth, chroma_format_idc); #elif ARCH_MIPS diff --git a/src/ExtLib/ffmpeg/libavcodec/h264dsp.h b/src/ExtLib/ffmpeg/libavcodec/h264dsp.h index d5f3aa66af..da7bd44714 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h264dsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/h264dsp.h @@ -125,6 +125,8 @@ void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); +void ff_h264dsp_init_riscv(H264DSPContext *c, const int bit_depth, + const int chroma_format_idc); void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, const int chroma_format_idc); void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth, diff --git a/src/ExtLib/ffmpeg/libavcodec/hapdec.c b/src/ExtLib/ffmpeg/libavcodec/hapdec.c index 22b7c281d1..918eff7876 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hapdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/hapdec.c @@ -330,8 +330,6 @@ static int hap_decode(AVCodecContext *avctx, AVFrame *frame, } /* Frame is ready to be output */ - frame->pict_type = AV_PICTURE_TYPE_I; - frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/hq_hqa.c b/src/ExtLib/ffmpeg/libavcodec/hq_hqa.c index 096fb65dc7..738ed9868d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hq_hqa.c +++ b/src/ExtLib/ffmpeg/libavcodec/hq_hqa.c @@ -366,9 +366,6 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, AVFrame *pic, return ret; } - pic->flags |= AV_FRAME_FLAG_KEY; - pic->pict_type = AV_PICTURE_TYPE_I; - *got_frame = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/hqx.c b/src/ExtLib/ffmpeg/libavcodec/hqx.c index 51099aa684..ee6c5a6622 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hqx.c +++ b/src/ExtLib/ffmpeg/libavcodec/hqx.c @@ -504,9 +504,6 @@ static int hqx_decode_frame(AVCodecContext *avctx, AVFrame *frame, avctx->execute2(avctx, decode_slice_thread, NULL, NULL, 16); - ctx->pic->flags |= AV_FRAME_FLAG_KEY; - ctx->pic->pict_type = AV_PICTURE_TYPE_I; - *got_picture_ptr = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c b/src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c index 28bf6be2fe..d15502a527 100644 --- a/src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c @@ -835,9 +835,6 @@ static int get_tlm(Jpeg2000DecoderContext *s, int n) case 2: bytestream2_get_be16(&s->g); break; - case 3: - bytestream2_get_be32(&s->g); - break; } if (SP == 0) { bytestream2_get_be16(&s->g); @@ -2506,8 +2503,6 @@ static int jpeg2000_decode_frame(AVCodecContext *avctx, AVFrame *picture, /* get picture buffer */ if ((ret = ff_thread_get_buffer(avctx, picture, 0)) < 0) goto end; - picture->pict_type = AV_PICTURE_TYPE_I; - picture->flags |= AV_FRAME_FLAG_KEY; if (ret = jpeg2000_read_bitstream_packets(s)) goto end; diff --git a/src/ExtLib/ffmpeg/libavcodec/lagarith.c b/src/ExtLib/ffmpeg/libavcodec/lagarith.c index 75b557e518..0969448eda 100644 --- a/src/ExtLib/ffmpeg/libavcodec/lagarith.c +++ b/src/ExtLib/ffmpeg/libavcodec/lagarith.c @@ -570,9 +570,6 @@ static int lag_decode_frame(AVCodecContext *avctx, AVFrame *p, int i, j, planes = 3; int ret = 0; - p->flags |= AV_FRAME_FLAG_KEY; - p->pict_type = AV_PICTURE_TYPE_I; - frametype = buf[0]; offset_gu = AV_RL32(buf + 1); diff --git a/src/ExtLib/ffmpeg/libavcodec/magicyuv.c b/src/ExtLib/ffmpeg/libavcodec/magicyuv.c index 06fad8f3f7..b85505c428 100644 --- a/src/ExtLib/ffmpeg/libavcodec/magicyuv.c +++ b/src/ExtLib/ffmpeg/libavcodec/magicyuv.c @@ -652,9 +652,6 @@ static int magy_decode_frame(AVCodecContext *avctx, AVFrame *p, if (ret < 0) return ret; - p->pict_type = AV_PICTURE_TYPE_I; - p->flags |= AV_FRAME_FLAG_KEY; - if ((ret = ff_thread_get_buffer(avctx, p, 0)) < 0) return ret; diff --git a/src/ExtLib/ffmpeg/libavcodec/mlpdec.c b/src/ExtLib/ffmpeg/libavcodec/mlpdec.c index 305c5d2b36..e85dac36a7 100644 --- a/src/ExtLib/ffmpeg/libavcodec/mlpdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/mlpdec.c @@ -1212,6 +1212,7 @@ static int read_access_unit(AVCodecContext *avctx, AVFrame *frame, goto error; m->is_major_sync_unit = 1; header_size += m->major_sync_header_size; + frame->flags |= AV_FRAME_FLAG_KEY; } if (!m->params_valid) { diff --git a/src/ExtLib/ffmpeg/libavcodec/mpeg12dec.c b/src/ExtLib/ffmpeg/libavcodec/mpeg12dec.c index 9ebc6f73aa..e869f6b0eb 100644 --- a/src/ExtLib/ffmpeg/libavcodec/mpeg12dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/mpeg12dec.c @@ -2766,7 +2766,7 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, int ret; // Check for minimal intra MB size (considering mb header, luma & chroma dc VLC, ac EOB VLC) - if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2 + 3*4 + 2*2 + 2*6)) + if (avpkt->size*8LL < (avctx->width+15)/16 * ((avctx->height+15)/16) * (2LL + 3*4 + 2*2 + 2*6)) return AVERROR_INVALIDDATA; ret = ff_get_buffer(avctx, frame, 0); @@ -2854,8 +2854,6 @@ static int ipu_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (get_bits_left(gb) != 32) return AVERROR_INVALIDDATA; - frame->pict_type = AV_PICTURE_TYPE_I; - frame->flags |= AV_FRAME_FLAG_KEY; *got_frame = 1; return avpkt->size; diff --git a/src/ExtLib/ffmpeg/libavcodec/mpeg4videodec.c b/src/ExtLib/ffmpeg/libavcodec/mpeg4videodec.c index 6a7a37e817..df1e22207d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/mpeg4videodec.c +++ b/src/ExtLib/ffmpeg/libavcodec/mpeg4videodec.c @@ -597,6 +597,8 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g ctx->sprite_shift[0] = alpha + beta + rho - min_ab; ctx->sprite_shift[1] = alpha + beta + rho - min_ab + 2; break; + default: + av_assert0(0); } /* try to simplify the situation */ if (sprite_delta[0][0] == a << ctx->sprite_shift[0] && diff --git a/src/ExtLib/ffmpeg/libavcodec/options_table.h b/src/ExtLib/ffmpeg/libavcodec/options_table.h index 7a70fa7b6c..33f1bce887 100644 --- a/src/ExtLib/ffmpeg/libavcodec/options_table.h +++ b/src/ExtLib/ffmpeg/libavcodec/options_table.h @@ -158,6 +158,7 @@ static const AVOption avcodec_options[] = { {"mmx", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_MMX }, INT_MIN, INT_MAX, V|E, .unit = "dct"}, {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_ALTIVEC }, INT_MIN, INT_MAX, V|E, .unit = "dct"}, {"faan", "floating point AAN DCT", 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_FAAN }, INT_MIN, INT_MAX, V|E, .unit = "dct"}, +{"neon", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_DCT_NEON }, INT_MIN, INT_MAX, V|E, .unit = "dct"}, {"lumi_mask", "compresses bright areas stronger than medium ones", OFFSET(lumi_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, {"tcplx_mask", "temporal complexity masking", OFFSET(temporal_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, {"scplx_mask", "spatial complexity masking", OFFSET(spatial_cplx_masking), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, -FLT_MAX, FLT_MAX, V|E}, diff --git a/src/ExtLib/ffmpeg/libavcodec/proresdec.c b/src/ExtLib/ffmpeg/libavcodec/proresdec.c index 73fbd3458e..ec1d0bd0be 100644 --- a/src/ExtLib/ffmpeg/libavcodec/proresdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/proresdec.c @@ -787,8 +787,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, } ctx->frame = frame; - ctx->frame->pict_type = AV_PICTURE_TYPE_I; - ctx->frame->flags |= AV_FRAME_FLAG_KEY; ctx->first_field = 1; buf += 8; diff --git a/src/ExtLib/ffmpeg/libavcodec/pthread_frame.c b/src/ExtLib/ffmpeg/libavcodec/pthread_frame.c index 67f09c1f48..982e4a64c5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/pthread_frame.c +++ b/src/ExtLib/ffmpeg/libavcodec/pthread_frame.c @@ -22,13 +22,11 @@ * @see doc/multithreading.txt */ -#include "config.h" - #include -#include #include "avcodec.h" #include "avcodec_internal.h" +#include "codec_desc.h" #include "codec_internal.h" #include "decode.h" #include "hwaccel_internal.h" @@ -108,6 +106,10 @@ typedef struct PerThreadContext { int hwaccel_threadsafe; atomic_int debug_threads; ///< Set if the FF_DEBUG_THREADS option is set. + + /// The following two fields have the same semantics as the DecodeContext field + int intra_only_flag; + enum AVPictureType initial_pict_type; } PerThreadContext; /** @@ -220,6 +222,8 @@ static attribute_align_arg void *frame_worker_thread(void *arg) av_frame_unref(p->frame); p->got_frame = 0; + p->frame->pict_type = p->initial_pict_type; + p->frame->flags |= p->intra_only_flag; p->result = codec->cb.decode(avctx, p->frame, &p->got_frame, p->avpkt); if ((p->result < 0 || !p->got_frame) && p->frame->buf[0]) @@ -763,6 +767,13 @@ static av_cold int init_thread(PerThreadContext *p, int *threads_to_free, AVCodecContext *copy; int err; + p->initial_pict_type = AV_PICTURE_TYPE_NONE; + if (avctx->codec_descriptor->props & AV_CODEC_PROP_INTRA_ONLY) { + p->intra_only_flag = AV_FRAME_FLAG_KEY; + if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) + p->initial_pict_type = AV_PICTURE_TYPE_I; + } + atomic_init(&p->state, STATE_INPUT_READY); copy = av_memdup(avctx, sizeof(*avctx)); diff --git a/src/ExtLib/ffmpeg/libavcodec/r210dec.c b/src/ExtLib/ffmpeg/libavcodec/r210dec.c index fe6a025988..7405da68e8 100644 --- a/src/ExtLib/ffmpeg/libavcodec/r210dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/r210dec.c @@ -56,8 +56,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->pict_type = AV_PICTURE_TYPE_I; - pic->flags |= AV_FRAME_FLAG_KEY; g_line = pic->data[0]; b_line = pic->data[1]; r_line = pic->data[2]; diff --git a/src/ExtLib/ffmpeg/libavcodec/rawdec.c b/src/ExtLib/ffmpeg/libavcodec/rawdec.c index 8de90e0477..b02edac371 100644 --- a/src/ExtLib/ffmpeg/libavcodec/rawdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/rawdec.c @@ -225,9 +225,6 @@ static int raw_decode(AVCodecContext *avctx, AVFrame *frame, need_copy = !avpkt->buf || context->is_1_2_4_8_bpp || context->is_yuv2 || context->is_lt_16bpp; - frame->pict_type = AV_PICTURE_TYPE_I; - frame->flags |= AV_FRAME_FLAG_KEY; - res = ff_decode_frame_props(avctx, frame); if (res < 0) return res; diff --git a/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c b/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c index d3605b0649..829a91261e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c @@ -40,6 +40,7 @@ #include "mpeg12data.h" #include "mpeg12vlc.h" #include "speedhq.h" +#include "thread.h" #define MAX_INDEX (64 - 1) @@ -423,6 +424,9 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, return AVERROR_INVALIDDATA; } + if (avctx->skip_frame >= AVDISCARD_ALL) + return avpkt->size; + compute_quant_matrix(s->quant_matrix, 100 - quality); second_field_offset = AV_RL24(buf + 1); @@ -433,10 +437,9 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, avctx->coded_width = FFALIGN(avctx->width, 16); avctx->coded_height = FFALIGN(avctx->height, 16); - if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) { + if ((ret = ff_thread_get_buffer(avctx, frame, 0)) < 0) { return ret; } - frame->flags |= AV_FRAME_FLAG_KEY; if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { /* @@ -649,5 +652,5 @@ const FFCodec ff_speedhq_decoder = { .priv_data_size = sizeof(SHQContext), .init = speedhq_decode_init, FF_CODEC_DECODE_CB(speedhq_decode_frame), - .p.capabilities = AV_CODEC_CAP_DR1, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, }; diff --git a/src/ExtLib/ffmpeg/libavcodec/utvideodec.c b/src/ExtLib/ffmpeg/libavcodec/utvideodec.c index 5377926fa6..4c0fa2ca67 100644 --- a/src/ExtLib/ffmpeg/libavcodec/utvideodec.c +++ b/src/ExtLib/ffmpeg/libavcodec/utvideodec.c @@ -890,8 +890,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame, break; } - frame->flags |= AV_FRAME_FLAG_KEY; - frame->pict_type = AV_PICTURE_TYPE_I; if (c->interlaced) frame->flags |= AV_FRAME_FLAG_INTERLACED; diff --git a/src/ExtLib/ffmpeg/libavcodec/v210dec.c b/src/ExtLib/ffmpeg/libavcodec/v210dec.c index 5cead150d3..8b370e5659 100644 --- a/src/ExtLib/ffmpeg/libavcodec/v210dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/v210dec.c @@ -187,9 +187,6 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->pict_type = AV_PICTURE_TYPE_I; - pic->flags |= AV_FRAME_FLAG_KEY; - if (stride) { td.stride = stride; td.buf = psrc; diff --git a/src/ExtLib/ffmpeg/libavcodec/v410dec.c b/src/ExtLib/ffmpeg/libavcodec/v410dec.c index 35e4a8ae03..04be830ad2 100644 --- a/src/ExtLib/ffmpeg/libavcodec/v410dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/v410dec.c @@ -102,9 +102,6 @@ static int v410_decode_frame(AVCodecContext *avctx, AVFrame *pic, if ((ret = ff_thread_get_buffer(avctx, pic, 0)) < 0) return ret; - pic->flags |= AV_FRAME_FLAG_KEY; - pic->pict_type = AV_PICTURE_TYPE_I; - td.buf = src; td.frame = pic; avctx->execute2(avctx, v410_decode_slice, &td, NULL, thread_count); diff --git a/src/ExtLib/ffmpeg/libavcodec/vc1_parser.c b/src/ExtLib/ffmpeg/libavcodec/vc1_parser.c index ec284dca00..a536a7bcf8 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vc1_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/vc1_parser.c @@ -26,6 +26,7 @@ */ #include "libavutil/attributes.h" +#include "libavutil/avassert.h" #include "parser.h" #include "vc1.h" #include "get_bits.h" @@ -66,7 +67,9 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, GetBitContext gb; int ret; vpc->v.s.avctx = avctx; - init_get_bits8(&gb, buf, buf_size); + ret = init_get_bits8(&gb, buf, buf_size); + av_assert1(ret >= 0); // buf_size is bounded by UNESCAPED_THRESHOLD + switch (vpc->prev_start_code) { case VC1_CODE_SEQHDR & 0xFF: ff_vc1_decode_sequence_header(avctx, &vpc->v, &gb); diff --git a/src/ExtLib/ffmpeg/libavcodec/version.h b/src/ExtLib/ffmpeg/libavcodec/version.h index f0958eee14..3d2de546b3 100644 --- a/src/ExtLib/ffmpeg/libavcodec/version.h +++ b/src/ExtLib/ffmpeg/libavcodec/version.h @@ -30,7 +30,7 @@ #include "version_major.h" #define LIBAVCODEC_VERSION_MINOR 5 -#define LIBAVCODEC_VERSION_MICRO 103 +#define LIBAVCODEC_VERSION_MICRO 104 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/src/ExtLib/ffmpeg/libavcodec/vp3.c b/src/ExtLib/ffmpeg/libavcodec/vp3.c index 0952760776..d03a1c9dbc 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vp3.c +++ b/src/ExtLib/ffmpeg/libavcodec/vp3.c @@ -2001,8 +2001,7 @@ static int vp4_mc_loop_filter(Vp3DecodeContext *s, int plane, int motion_x, int x_offset = (-(x + 2) & 7) + 2; y_offset = (-(y + 2) & 7) + 2; - if (x_offset > 8 + x_subpel && y_offset > 8 + y_subpel) - return 0; + av_assert1(!(x_offset > 8 + x_subpel && y_offset > 8 + y_subpel)); s->vdsp.emulated_edge_mc(loop, motion_source - stride - 1, loop_stride, stride, diff --git a/src/ExtLib/ffmpeg/libavcodec/vp8.c b/src/ExtLib/ffmpeg/libavcodec/vp8.c index 19f32b3400..8e91613068 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vp8.c +++ b/src/ExtLib/ffmpeg/libavcodec/vp8.c @@ -341,9 +341,8 @@ static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size) } s->coeff_partition_size[i] = buf_size; - ff_vpx_init_range_decoder(&s->coeff_partition[i], buf, buf_size); - return 0; + return ff_vpx_init_range_decoder(&s->coeff_partition[i], buf, buf_size); } static void vp7_get_quants(VP8Context *s) diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c b/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c index 53f92ca10f..809510b93d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c @@ -1263,8 +1263,8 @@ static void derive_mmvd(const VVCLocalContext *lc, MvField *mvf, const Mv *mmvd_ const RefPicList *rpl = sc->rpl; const int poc = lc->fc->ps.ph.poc; const int diff[] = { - poc - rpl[0].list[mvf->ref_idx[0]], - poc - rpl[1].list[mvf->ref_idx[1]] + poc - rpl[L0].refs[mvf->ref_idx[L0]].poc, + poc - rpl[L1].refs[mvf->ref_idx[L1]].poc }; const int sign = FFSIGN(diff[0]) != FFSIGN(diff[1]); @@ -1275,7 +1275,7 @@ static void derive_mmvd(const VVCLocalContext *lc, MvField *mvf, const Mv *mmvd_ const int i = FFABS(diff[0]) < FFABS(diff[1]); const int o = !i; mmvd[i] = *mmvd_offset; - if (!rpl[0].isLongTerm[mvf->ref_idx[0]] && !rpl[1].isLongTerm[mvf->ref_idx[1]]) { + if (!rpl[L0].refs[mvf->ref_idx[L0]].is_lt && !rpl[L1].refs[mvf->ref_idx[L1]].is_lt) { ff_vvc_mv_scale(&mmvd[o], mmvd_offset, diff[i], diff[o]); } else { @@ -1689,25 +1689,25 @@ static void derive_dmvr_bdof_flag(const VVCLocalContext *lc, PredictionUnit *pu) const VVCPH *ph = &fc->ps.ph; const VVCSH *sh = &lc->sc->sh; const int poc = ph->poc; - const RefPicList *rpl0 = lc->sc->rpl + L0; - const RefPicList *rpl1 = lc->sc->rpl + L1; - const int8_t *ref_idx = pu->mi.ref_idx; const MotionInfo *mi = &pu->mi; + const int8_t *ref_idx = mi->ref_idx; + const VVCRefPic *rp0 = &lc->sc->rpl[L0].refs[ref_idx[L0]]; + const VVCRefPic *rp1 = &lc->sc->rpl[L1].refs[ref_idx[L1]]; const CodingUnit *cu = lc->cu; const PredWeightTable *w = pps->r->pps_wp_info_in_ph_flag ? &fc->ps.ph.pwt : &sh->pwt; pu->bdof_flag = 0; if (mi->pred_flag == PF_BI && - (poc - rpl0->list[ref_idx[L0]] == rpl1->list[ref_idx[L1]] - poc) && - !rpl0->isLongTerm[ref_idx[L0]] && !rpl1->isLongTerm[ref_idx[L1]] && + (poc - rp0->poc == rp1->poc - poc) && + !rp0->is_lt && !rp1->is_lt && !cu->ciip_flag && !mi->bcw_idx && - !w->weight_flag[L0][LUMA][mi->ref_idx[L0]] && !w->weight_flag[L1][LUMA][mi->ref_idx[L1]] && - !w->weight_flag[L0][CHROMA][mi->ref_idx[L0]] && !w->weight_flag[L1][CHROMA][mi->ref_idx[L1]] && + !w->weight_flag[L0][LUMA][ref_idx[L0]] && !w->weight_flag[L1][LUMA][ref_idx[L1]] && + !w->weight_flag[L0][CHROMA][ref_idx[L0]] && !w->weight_flag[L1][CHROMA][ref_idx[L1]] && cu->cb_width >= 8 && cu->cb_height >= 8 && - (cu->cb_width * cu->cb_height >= 128)) { - // fixme: for RprConstraintsActiveFlag + (cu->cb_width * cu->cb_height >= 128) && + !rp0->is_scaled && !rp1->is_scaled) { if (!ph->r->ph_bdof_disabled_flag && mi->motion_model_idc == MOTION_TRANSLATION && !pu->merge_subblock_flag && diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.h b/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.h index 4e38ecf54a..a987328d81 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.h +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/ctu.h @@ -46,7 +46,8 @@ #define MAX_QP 63 #define MAX_PB_SIZE 128 -#define EDGE_EMU_BUFFER_STRIDE (MAX_PB_SIZE + 32) +#define MAX_SCALING_RATIO 8 +#define EDGE_EMU_BUFFER_STRIDE ((MAX_PB_SIZE + 32) * MAX_SCALING_RATIO) #define CHROMA_EXTRA_BEFORE 1 #define CHROMA_EXTRA_AFTER 2 @@ -58,6 +59,8 @@ #define BILINEAR_EXTRA_AFTER 1 #define BILINEAR_EXTRA 1 +#define SCALED_INT(pos) ((pos) >> 10) + #define MAX_CONTROL_POINTS 3 #define AFFINE_MIN_BLOCK_SIZE 4 @@ -373,15 +376,12 @@ typedef struct VVCLocalContext { int end_of_tiles_x; int end_of_tiles_y; - /* +7 is for subpixel interpolation, *2 for high bit depths */ - DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; - /* The extended size between the new edge emu buffer is abused by SAO */ - DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer2)[(MAX_PB_SIZE + 7) * EDGE_EMU_BUFFER_STRIDE * 2]; + /* *2 for high bit depths */ + DECLARE_ALIGNED(32, uint8_t, edge_emu_buffer)[EDGE_EMU_BUFFER_STRIDE * EDGE_EMU_BUFFER_STRIDE * 2]; DECLARE_ALIGNED(32, int16_t, tmp)[MAX_PB_SIZE * MAX_PB_SIZE]; DECLARE_ALIGNED(32, int16_t, tmp1)[MAX_PB_SIZE * MAX_PB_SIZE]; DECLARE_ALIGNED(32, int16_t, tmp2)[MAX_PB_SIZE * MAX_PB_SIZE]; - DECLARE_ALIGNED(32, uint8_t, ciip_tmp1)[MAX_PB_SIZE * MAX_PB_SIZE * 2]; - DECLARE_ALIGNED(32, uint8_t, ciip_tmp2)[MAX_PB_SIZE * MAX_PB_SIZE * 2]; + DECLARE_ALIGNED(32, uint8_t, ciip_tmp)[MAX_PB_SIZE * MAX_PB_SIZE * 2]; DECLARE_ALIGNED(32, uint8_t, sao_buffer)[(MAX_CTU_SIZE + 2 * SAO_PADDING_SIZE) * EDGE_EMU_BUFFER_STRIDE * 2]; DECLARE_ALIGNED(32, uint8_t, alf_buffer_luma)[(MAX_CTU_SIZE + 2 * ALF_PADDING_SIZE) * EDGE_EMU_BUFFER_STRIDE * 2]; DECLARE_ALIGNED(32, uint8_t, alf_buffer_chroma)[(MAX_CTU_SIZE + 2 * ALF_PADDING_SIZE) * EDGE_EMU_BUFFER_STRIDE * 2]; diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/data.c b/src/ExtLib/ffmpeg/libavcodec/vvc/data.c index ace585b663..a91e20754e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/data.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/data.c @@ -1732,7 +1732,7 @@ const uint8_t ff_vvc_alf_aps_class_to_filt_map[25] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, }; -const int8_t ff_vvc_inter_luma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_LUMA_FACTS][VVC_INTER_LUMA_TAPS] = { +const int8_t ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPES][VVC_INTER_LUMA_FACTS][VVC_INTER_LUMA_TAPS] = { { //1x, hpelIfIdx == 0, Table 27 { 0, 0, 0, 64, 0, 0, 0, 0 }, @@ -1773,6 +1773,46 @@ const int8_t ff_vvc_inter_luma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_LUMA_FA { 0, 1, -2, 4, 63, -3, 1, 0 }, }, + { + //1.5x, Table 28 + { -1, -5, 17, 42, 17, -5, -1, 0 }, + { 0, -5, 15, 41, 19, -5, -1, 0 }, + { 0, -5, 13, 40, 21, -4, -1, 0 }, + { 0, -5, 11, 39, 24, -4, -2, 1 }, + { 0, -5, 9, 38, 26, -3, -2, 1 }, + { 0, -5, 7, 38, 28, -2, -3, 1 }, + { 1, -5, 5, 36, 30, -1, -3, 1 }, + { 1, -4, 3, 35, 32, 0, -4, 1 }, + { 1, -4, 2, 33, 33, 2, -4, 1 }, + { 1, -4, 0, 32, 35, 3, -4, 1 }, + { 1, -3, -1, 30, 36, 5, -5, 1 }, + { 1, -3, -2, 28, 38, 7, -5, 0 }, + { 1, -2, -3, 26, 38, 9, -5, 0 }, + { 1, -2, -4, 24, 39, 11, -5, 0 }, + { 0, -1, -4, 21, 40, 13, -5, 0 }, + { 0, -1, -5, 19, 41, 15, -5, 0 }, + }, + + { + //2x, Table 29 + { -4, 2, 20, 28, 20, 2, -4, 0 }, + { -4, 0, 19, 29, 21, 5, -4, -2 }, + { -4, -1, 18, 29, 22, 6, -4, -2 }, + { -4, -1, 16, 29, 23, 7, -4, -2 }, + { -4, -1, 16, 28, 24, 7, -4, -2 }, + { -4, -1, 14, 28, 25, 8, -4, -2 }, + { -3, -3, 14, 27, 26, 9, -3, -3 }, + { -3, -1, 12, 28, 25, 10, -4, -3 }, + { -3, -3, 11, 27, 27, 11, -3, -3 }, + { -3, -4, 10, 25, 28, 12, -1, -3 }, + { -3, -3, 9, 26, 27, 14, -3, -3 }, + { -2, -4, 8, 25, 28, 14, -1, -4 }, + { -2, -4, 7, 24, 28, 16, -1, -4 }, + { -2, -4, 7, 23, 29, 16, -1, -4 }, + { -2, -4, 6, 22, 29, 18, -1, -4 }, + { -2, -4, 5, 21, 29, 19, 0, -4 }, + }, + { //1x, affine, Table 30 { 0, 0, 0, 64, 0, 0, 0, 0 }, @@ -1793,9 +1833,48 @@ const int8_t ff_vvc_inter_luma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_LUMA_FA { 0, 1, -2, 4, 63, -3, 1, 0 }, }, + { + //1.5x, affine, Table 31 + { 0, -6, 17, 42, 17, -5, -1, 0 }, + { 0, -5, 15, 41, 19, -5, -1, 0 }, + { 0, -5, 13, 40, 21, -4, -1, 0 }, + { 0, -5, 11, 39, 24, -4, -1, 0 }, + { 0, -5, 9, 38, 26, -3, -1, 0 }, + { 0, -5, 7, 38, 28, -2, -2, 0 }, + { 0, -4, 5, 36, 30, -1, -2, 0 }, + { 0, -3, 3, 35, 32, 0, -3, 0 }, + { 0, -3, 2, 33, 33, 2, -3, 0 }, + { 0, -3, 0, 32, 35, 3, -3, 0 }, + { 0, -2, -1, 30, 36, 5, -4, 0 }, + { 0, -2, -2, 28, 38, 7, -5, 0 }, + { 0, -1, -3, 26, 38, 9, -5, 0 }, + { 0, -1, -4, 24, 39, 11, -5, 0 }, + { 0, -1, -4, 21, 40, 13, -5, 0 }, + { 0, -1, -5, 19, 41, 15, -5, 0 }, + }, + + { + //2x, affine, Table 32 + { 0, -2, 20, 28, 20, 2, -4, 0 }, + { 0, -4, 19, 29, 21, 5, -6, 0 }, + { 0, -5, 18, 29, 22, 6, -6, 0 }, + { 0, -5, 16, 29, 23, 7, -6, 0 }, + { 0, -5, 16, 28, 24, 7, -6, 0 }, + { 0, -5, 14, 28, 25, 8, -6, 0 }, + { 0, -6, 14, 27, 26, 9, -6, 0 }, + { 0, -4, 12, 28, 25, 10, -7, 0 }, + { 0, -6, 11, 27, 27, 11, -6, 0 }, + { 0, -7, 10, 25, 28, 12, -4, 0 }, + { 0, -6, 9, 26, 27, 14, -6, 0 }, + { 0, -6, 8, 25, 28, 14, -5, 0 }, + { 0, -6, 7, 24, 28, 16, -5, 0 }, + { 0, -6, 7, 23, 29, 16, -5, 0 }, + { 0, -6, 6, 22, 29, 18, -5, 0 }, + { 0, -6, 5, 21, 29, 19, -4, 0 }, + } }; -const int8_t ff_vvc_inter_chroma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_CHROMA_FACTS][VVC_INTER_CHROMA_TAPS] = { +const int8_t ff_vvc_inter_chroma_filters[VVC_INTER_CHROMA_FILTER_TYPES][VVC_INTER_CHROMA_FACTS][VVC_INTER_CHROMA_TAPS] = { { //1x, Table 33 { 0, 64, 0, 0 }, diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/data.h b/src/ExtLib/ffmpeg/libavcodec/vvc/data.h index e493b9e0e6..a0512e626b 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/data.h +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/data.h @@ -43,15 +43,19 @@ extern const int8_t ff_vvc_lfnst_8x8[4][2][16][48]; extern const uint8_t ff_vvc_lfnst_tr_set_index[95]; extern uint8_t ff_vvc_default_scale_m[64 * 64]; -#define VVC_INTER_FILTER_TYPES 3 +#define VVC_INTER_LUMA_FILTER_TYPE_AFFINE 4 + +#define VVC_INTER_LUMA_FILTER_TYPES 7 +#define VVC_INTER_CHROMA_FILTER_TYPES 3 + #define VVC_INTER_LUMA_FACTS 16 #define VVC_INTER_LUMA_TAPS 8 #define VVC_INTER_CHROMA_FACTS 32 #define VVC_INTER_CHROMA_TAPS 4 #define VVC_INTER_LUMA_DMVR_FACTS 16 #define VVC_INTER_LUMA_DMVR_TAPS 2 -extern const int8_t ff_vvc_inter_luma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_LUMA_FACTS][VVC_INTER_LUMA_TAPS]; -extern const int8_t ff_vvc_inter_chroma_filters[VVC_INTER_FILTER_TYPES][VVC_INTER_CHROMA_FACTS][VVC_INTER_CHROMA_TAPS]; +extern const int8_t ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPES][VVC_INTER_LUMA_FACTS][VVC_INTER_LUMA_TAPS]; +extern const int8_t ff_vvc_inter_chroma_filters[VVC_INTER_CHROMA_FILTER_TYPES][VVC_INTER_CHROMA_FACTS][VVC_INTER_CHROMA_TAPS]; extern const int8_t ff_vvc_inter_luma_dmvr_filters[VVC_INTER_LUMA_DMVR_FACTS][VVC_INTER_LUMA_DMVR_TAPS]; #define VVC_INTRA_LUMA_TYPES 2 diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c index 07e294669c..7884c118ae 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c @@ -403,8 +403,8 @@ static int8_t smvd_find(const VVCFrameContext *fc, const SliceContext *sc, int l int8_t idx = -1; int old_diff = -1; for (int i = 0; i < rsh->num_ref_idx_active[lx]; i++) { - if (!rpl->isLongTerm[i]) { - int diff = poc - rpl->list[i]; + if (!rpl->refs[i].is_lt) { + int diff = poc - rpl->refs[i].poc; if (find(idx, diff, old_diff)) { idx = i; old_diff = diff; @@ -514,6 +514,7 @@ static int slice_init_entry_points(SliceContext *sc, int nb_eps = sh->r->num_entry_points + 1; int ctu_addr = 0; GetBitContext gb; + int ret; if (sc->nb_eps != nb_eps) { eps_free(sc); @@ -523,7 +524,9 @@ static int slice_init_entry_points(SliceContext *sc, sc->nb_eps = nb_eps; } - init_get_bits8(&gb, slice->data, slice->data_size); + ret = init_get_bits8(&gb, slice->data, slice->data_size); + if (ret < 0) + return ret; for (int i = 0; i < sc->nb_eps; i++) { EntryPoint *ep = sc->eps + i; @@ -560,6 +563,9 @@ static int ref_frame(VVCFrame *dst, const VVCFrame *src) if (ret < 0) return ret; + ff_refstruct_replace(&dst->sps, src->sps); + ff_refstruct_replace(&dst->pps, src->pps); + ff_refstruct_replace(&dst->progress, src->progress); ff_refstruct_replace(&dst->tab_dmvr_mvf, src->tab_dmvr_mvf); @@ -570,6 +576,11 @@ static int ref_frame(VVCFrame *dst, const VVCFrame *src) dst->poc = src->poc; dst->ctb_count = src->ctb_count; + + dst->scaling_win = src->scaling_win; + dst->ref_width = src->ref_width; + dst->ref_height = src->ref_height; + dst->flags = src->flags; dst->sequence = src->sequence; diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.h b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.h index 4dacefc06a..1e0b76f283 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.h +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.h @@ -42,10 +42,18 @@ #define L0 0 #define L1 1 +typedef struct VVCRefPic { + struct VVCFrame *ref; + int poc; + int is_lt; // is long term reference + + // for RPR + int is_scaled; ///< RprConstraintsActiveFlag + int scale[2]; ///< RefPicScale[] +} VVCRefPic; + typedef struct RefPicList { - struct VVCFrame *ref[VVC_MAX_REF_ENTRIES]; - int list[VVC_MAX_REF_ENTRIES]; - int isLongTerm[VVC_MAX_REF_ENTRIES]; + VVCRefPic refs[VVC_MAX_REF_ENTRIES]; int nb_refs; } RefPicList; @@ -53,9 +61,18 @@ typedef struct RefPicListTab { RefPicList refPicList[2]; } RefPicListTab; +typedef struct VVCWindow { + int16_t left_offset; + int16_t right_offset; + int16_t top_offset; + int16_t bottom_offset; +} VVCWindow; + typedef struct VVCFrame { struct AVFrame *frame; + const VVCSPS *sps; ///< RefStruct reference + const VVCPPS *pps; ///< RefStruct reference struct MvField *tab_dmvr_mvf; ///< RefStruct reference RefPicListTab **rpl_tab; ///< RefStruct reference RefPicListTab *rpl; ///< RefStruct reference @@ -65,6 +82,12 @@ typedef struct VVCFrame { int poc; + //for RPR + VVCWindow scaling_win; ///< pps_scaling_win_left_offset * SubWithC, pps_scaling_win_right_offset * SubWithC, + ///< pps_scaling_win_top_offset * SubHeigtC, pps_scaling_win_bottom_offset * SubHiehgtC + int ref_width; ///< CurrPicScalWinWidthL + int ref_height; ///< CurrPicScalWinHeightL + struct VVCFrame *collocated_ref; struct FrameProgress *progress; ///< RefStruct reference diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/dsp.h b/src/ExtLib/ffmpeg/libavcodec/vvc/dsp.h index 9810ac314c..1f14096c41 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/dsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/dsp.h @@ -57,6 +57,19 @@ typedef struct VVCInterDSPContext { uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, int width); + void (*put_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + int16_t *dst, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, const int8_t *hf, const int8_t *vf, int width); + + void (*put_uni_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, const int8_t *hf, const int8_t *vf, int width); + + void (*put_uni_w_scaled[2 /* luma, chroma */][7 /* log2(width) - 1 */])( + uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int src_height, + int x, int y, int dx, int dy, int height, int denom, int wx, int ox, const int8_t *hf, const int8_t *vf, + int width); + void (*avg)(uint8_t *dst, ptrdiff_t dst_stride, const int16_t *src0, const int16_t *src1, int width, int height); diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/filter.c b/src/ExtLib/ffmpeg/libavcodec/vvc/filter.c index 8f44255ce4..7844d34eac 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/filter.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/filter.c @@ -321,9 +321,9 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con if (curr->pred_flag == PF_BI && neigh->pred_flag == PF_BI) { // same L0 and L1 - if (rpl[0].list[curr->ref_idx[0]] == neigh_rpl[0].list[neigh->ref_idx[0]] && - rpl[0].list[curr->ref_idx[0]] == rpl[1].list[curr->ref_idx[1]] && - neigh_rpl[0].list[neigh->ref_idx[0]] == neigh_rpl[1].list[neigh->ref_idx[1]]) { + if (rpl[L0].refs[curr->ref_idx[L0]].poc == neigh_rpl[L0].refs[neigh->ref_idx[L0]].poc && + rpl[L0].refs[curr->ref_idx[L0]].poc == rpl[L1].refs[curr->ref_idx[L1]].poc && + neigh_rpl[L0].refs[neigh->ref_idx[L0]].poc == neigh_rpl[L1].refs[neigh->ref_idx[L1]].poc) { if ((FFABS(neigh->mv[0].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 8 || FFABS(neigh->mv[1].x - curr->mv[1].x) >= 8 || FFABS(neigh->mv[1].y - curr->mv[1].y) >= 8) && (FFABS(neigh->mv[1].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[1].y - curr->mv[0].y) >= 8 || @@ -331,15 +331,15 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con return 1; else return 0; - } else if (neigh_rpl[0].list[neigh->ref_idx[0]] == rpl[0].list[curr->ref_idx[0]] && - neigh_rpl[1].list[neigh->ref_idx[1]] == rpl[1].list[curr->ref_idx[1]]) { + } else if (neigh_rpl[L0].refs[neigh->ref_idx[L0]].poc == rpl[L0].refs[curr->ref_idx[L0]].poc && + neigh_rpl[L1].refs[neigh->ref_idx[L1]].poc == rpl[L1].refs[curr->ref_idx[L1]].poc) { if (FFABS(neigh->mv[0].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 8 || FFABS(neigh->mv[1].x - curr->mv[1].x) >= 8 || FFABS(neigh->mv[1].y - curr->mv[1].y) >= 8) return 1; else return 0; - } else if (neigh_rpl[1].list[neigh->ref_idx[1]] == rpl[0].list[curr->ref_idx[0]] && - neigh_rpl[0].list[neigh->ref_idx[0]] == rpl[1].list[curr->ref_idx[1]]) { + } else if (neigh_rpl[L1].refs[neigh->ref_idx[L1]].poc == rpl[L0].refs[curr->ref_idx[L0]].poc && + neigh_rpl[L0].refs[neigh->ref_idx[L0]].poc == rpl[L1].refs[curr->ref_idx[L1]].poc) { if (FFABS(neigh->mv[1].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[1].y - curr->mv[0].y) >= 8 || FFABS(neigh->mv[0].x - curr->mv[1].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[1].y) >= 8) return 1; @@ -354,18 +354,18 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con if (curr->pred_flag & 1) { A = curr->mv[0]; - ref_A = rpl[0].list[curr->ref_idx[0]]; + ref_A = rpl[L0].refs[curr->ref_idx[L0]].poc; } else { A = curr->mv[1]; - ref_A = rpl[1].list[curr->ref_idx[1]]; + ref_A = rpl[L1].refs[curr->ref_idx[L1]].poc; } if (neigh->pred_flag & 1) { B = neigh->mv[0]; - ref_B = neigh_rpl[0].list[neigh->ref_idx[0]]; + ref_B = neigh_rpl[L0].refs[neigh->ref_idx[L0]].poc; } else { B = neigh->mv[1]; - ref_B = neigh_rpl[1].list[neigh->ref_idx[1]]; + ref_B = neigh_rpl[L1].refs[neigh->ref_idx[L1]].poc; } if (ref_A == ref_B) { diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c b/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c index 4a8d1d866a..e1011b4fa1 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c @@ -31,33 +31,33 @@ static const int bcw_w_lut[] = {4, 5, 3, 10, -2}; static void subpic_offset(int *x_off, int *y_off, - const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_luma) + const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_chroma) { - *x_off -= pps->subpic_x[subpic_idx] >> sps->hshift[!is_luma]; - *y_off -= pps->subpic_y[subpic_idx] >> sps->vshift[!is_luma]; + *x_off -= pps->subpic_x[subpic_idx] >> sps->hshift[is_chroma]; + *y_off -= pps->subpic_y[subpic_idx] >> sps->vshift[is_chroma]; } static void subpic_width_height(int *pic_width, int *pic_height, - const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_luma) + const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_chroma) { - *pic_width = pps->subpic_width[subpic_idx] >> sps->hshift[!is_luma]; - *pic_height = pps->subpic_height[subpic_idx] >> sps->vshift[!is_luma]; + *pic_width = pps->subpic_width[subpic_idx] >> sps->hshift[is_chroma]; + *pic_height = pps->subpic_height[subpic_idx] >> sps->vshift[is_chroma]; } -static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - int x_off, int y_off, const int block_w, const int block_h, const int is_luma) +static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, const VVCFrame *src_frame, + int x_off, int y_off, const int block_w, const int block_h, const int is_chroma) { const VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = fc->ps.sps; - const VVCPPS *pps = fc->ps.pps; + const VVCSPS *sps = src_frame->sps; + const VVCPPS *pps = src_frame->pps; const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; - const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; - const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; - const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; + const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; + const int extra_after = is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER; + const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; int pic_width, pic_height; - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_luma); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_luma); + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_chroma); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_chroma); if (x_off < extra_before || y_off < extra_before || x_off >= pic_width - block_w - extra_after || @@ -78,20 +78,20 @@ static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t } static void emulated_edge_dmvr(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - int x_sb, int y_sb, int x_off, int y_off, const int block_w, const int block_h, const int is_luma) + int x_sb, int y_sb, int x_off, int y_off, const int block_w, const int block_h, const int is_chroma) { const VVCFrameContext *fc = lc->fc; const VVCSPS *sps = fc->ps.sps; const VVCPPS *pps = fc->ps.pps; const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; - const int extra_before = is_luma ? LUMA_EXTRA_BEFORE : CHROMA_EXTRA_BEFORE; - const int extra_after = is_luma ? LUMA_EXTRA_AFTER : CHROMA_EXTRA_AFTER; - const int extra = is_luma ? LUMA_EXTRA : CHROMA_EXTRA; + const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; + const int extra_after = is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER; + const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; int pic_width, pic_height; - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_luma); - subpic_offset(&x_sb, &y_sb, sps, pps, subpic_idx, is_luma); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_luma); + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_chroma); + subpic_offset(&x_sb, &y_sb, sps, pps, subpic_idx, is_chroma); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_chroma); if (x_off < extra_before || y_off < extra_before || x_off >= pic_width - block_w - extra_after || @@ -124,8 +124,8 @@ static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, cons const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; int pic_width, pic_height; - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, 1); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, 1); + subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, 0); + subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, 0); if (x_off < BILINEAR_EXTRA_BEFORE || y_off < BILINEAR_EXTRA_BEFORE || x_off >= pic_width - block_w - BILINEAR_EXTRA_AFTER || @@ -142,20 +142,13 @@ static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, cons } } +#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \ + emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, block_w, block_h, is_chroma) -#define EMULATED_EDGE_LUMA(dst, src, src_stride, x_off, y_off) \ - emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 1) - -#define EMULATED_EDGE_CHROMA(dst, src, src_stride, x_off, y_off) \ - emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 0) - -#define EMULATED_EDGE_DMVR_LUMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ - emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 1) - -#define EMULATED_EDGE_DMVR_CHROMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ - emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 0) +#define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ + emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, is_chroma) -#define EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ +#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h) // part of 8.5.6.6 Weighted sample prediction process @@ -209,117 +202,109 @@ static int derive_weight(int *denom, int *w0, int *w1, int *o0, int *o1, return 1; } -static void luma_mc(VVCLocalContext *lc, int16_t *dst, const AVFrame *ref, const Mv *mv, - int x_off, int y_off, const int block_w, const int block_h) -{ - const VVCFrameContext *fc = lc->fc; - const uint8_t *src = ref->data[0]; - ptrdiff_t src_stride = ref->linesize[0]; - const int idx = av_log2(block_w) - 1; - const int mx = mv->x & 0xf; - const int my = mv->y & 0xf; - const int8_t *hf = ff_vvc_inter_luma_filters[0][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[0][my]; - - x_off += mv->x >> 4; - y_off += mv->y >> 4; - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - - EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); - - fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](dst, src, src_stride, block_h, hf, vf, block_w); -} +#define INTER_FILTER(t, frac) (is_chroma ? ff_vvc_inter_chroma_filters[t][frac] : ff_vvc_inter_luma_filters[t][frac]) -static void chroma_mc(VVCLocalContext *lc, int16_t *dst, const AVFrame *ref, const Mv *mv, +static void mc(VVCLocalContext *lc, int16_t *dst, const VVCFrame *ref, const Mv *mv, int x_off, int y_off, const int block_w, const int block_h, const int c_idx) { const VVCFrameContext *fc = lc->fc; - const uint8_t *src = ref->data[c_idx]; - ptrdiff_t src_stride = ref->linesize[c_idx]; - int hs = fc->ps.sps->hshift[c_idx]; - int vs = fc->ps.sps->vshift[c_idx]; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = ref->frame->data[c_idx]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; + const int is_chroma = !!c_idx; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; const int idx = av_log2(block_w) - 1; - const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (1 - hs); - const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (1 - vs); - const int8_t *hf = ff_vvc_inter_chroma_filters[0][mx]; - const int8_t *vf = ff_vvc_inter_chroma_filters[0][my]; + const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int hpel_if_idx = (is_chroma || pu->merge_gpm_flag) ? 0 : pu->mi.hpel_if_idx; + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); x_off += mv->x >> (4 + hs); y_off += mv->y >> (4 + vs); src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - EMULATED_EDGE_CHROMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); - fc->vvcdsp.inter.put[CHROMA][idx][!!my][!!mx](dst, src, src_stride, block_h, hf, vf, block_w); + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); + fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](dst, src, src_stride, block_h, hf, vf, block_w); } -static void luma_mc_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const AVFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, - const int hf_idx, const int vf_idx) +static void mc_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, + const VVCFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, + const int c_idx) { const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = ref->frame->data[c_idx]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; const int lx = mvf->pred_flag - PF_L0; - const Mv *mv = mvf->mv + lx; - const uint8_t *src = ref->data[0]; - ptrdiff_t src_stride = ref->linesize[0]; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; const int idx = av_log2(block_w) - 1; - const int mx = mv->x & 0xf; - const int my = mv->y & 0xf; - const int8_t *hf = ff_vvc_inter_luma_filters[hf_idx][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[vf_idx][my]; + const Mv *mv = &mvf->mv[lx]; + const int is_chroma = !!c_idx; + const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); int denom, wx, ox; - x_off += mv->x >> 4; - y_off += mv->y >> 4; - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - - EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); + x_off += mv->x >> (4 + hs); + y_off += mv->y >> (4 + vs); + src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - if (derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA)) { - fc->vvcdsp.inter.put_uni_w[LUMA][idx][!!my][!!mx](dst, dst_stride, src, src_stride, + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); + if (derive_weight_uni(&denom, &wx, &ox, lc, mvf, c_idx)) { + fc->vvcdsp.inter.put_uni_w[is_chroma][idx][!!my][!!mx](dst, dst_stride, src, src_stride, block_h, denom, wx, ox, hf, vf, block_w); } else { - fc->vvcdsp.inter.put_uni[LUMA][idx][!!my][!!mx](dst, dst_stride, src, src_stride, + fc->vvcdsp.inter.put_uni[is_chroma][idx][!!my][!!mx](dst, dst_stride, src, src_stride, block_h, hf, vf, block_w); } } -static void luma_mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const AVFrame *ref0, const Mv *mv0, const int x_off, const int y_off, const int block_w, const int block_h, - const AVFrame *ref1, const Mv *mv1, const MvField *mvf, const int hf_idx, const int vf_idx, - const MvField *orig_mv, const int sb_bdof_flag) +static void mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, + const VVCFrame *ref0, const VVCFrame *ref1, const MvField *mvf, const MvField *orig_mv, + const int x_off, const int y_off, const int block_w, const int block_h, const int c_idx, + const int sb_bdof_flag) { const VVCFrameContext *fc = lc->fc; const PredictionUnit *pu = &lc->cu->pu; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; const int idx = av_log2(block_w) - 1; - const AVFrame *ref[] = { ref0, ref1 }; + const VVCFrame *refs[] = { ref0, ref1 }; int16_t *tmp[] = { lc->tmp + sb_bdof_flag * PROF_TEMP_OFFSET, lc->tmp1 + sb_bdof_flag * PROF_TEMP_OFFSET }; int denom, w0, w1, o0, o1; - const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, pu->dmvr_flag); + const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, c_idx, pu->dmvr_flag); + const int is_chroma = !!c_idx; + const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; for (int i = L0; i <= L1; i++) { const Mv *mv = mvf->mv + i; - const int mx = mv->x & 0xf; - const int my = mv->y & 0xf; - const int ox = x_off + (mv->x >> 4); - const int oy = y_off + (mv->y >> 4); - ptrdiff_t src_stride = ref[i]->linesize[0]; - const uint8_t *src = ref[i]->data[0] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); - const int8_t *hf = ff_vvc_inter_luma_filters[hf_idx][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[vf_idx][my]; + const int mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const int my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int ox = x_off + (mv->x >> (4 + hs)); + const int oy = y_off + (mv->y >> (4 + vs)); + const VVCFrame *ref = refs[i]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; + const uint8_t *src = ref->frame->data[c_idx] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); if (pu->dmvr_flag) { - const int x_sb = x_off + (orig_mv->mv[i].x >> 4); - const int y_sb = y_off + (orig_mv->mv[i].y >> 4); + const int x_sb = x_off + (orig_mv->mv[i].x >> (4 + hs)); + const int y_sb = y_off + (orig_mv->mv[i].y >> (4 + vs)); - EMULATED_EDGE_DMVR_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_sb, y_sb, ox, oy); + MC_EMULATED_EDGE_DMVR(lc->edge_emu_buffer, &src, &src_stride, x_sb, y_sb, ox, oy); } else { - EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, ox, oy); + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, ox, oy); } - fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w); + fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w); if (sb_bdof_flag) fc->vvcdsp.inter.bdof_fetch_samples(tmp[i], src, src_stride, mx, my, block_w, block_h); } - if (sb_bdof_flag) fc->vvcdsp.inter.apply_bdof(dst, dst_stride, tmp[L0], tmp[L1], block_w, block_h); else if (weight_flag) @@ -328,70 +313,134 @@ static void luma_mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_st fc->vvcdsp.inter.avg(dst, dst_stride, tmp[L0], tmp[L1], block_w, block_h); } -static void chroma_mc_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const uint8_t *src, ptrdiff_t src_stride, int x_off, int y_off, - const int block_w, const int block_h, const MvField *mvf, const int c_idx, - const int hf_idx, const int vf_idx) +static const int8_t* inter_filter_scaled(const int scale, const int is_chroma, const int is_affine) { - const VVCFrameContext *fc = lc->fc; - const int lx = mvf->pred_flag - PF_L0; - const int hs = fc->ps.sps->hshift[1]; - const int vs = fc->ps.sps->vshift[1]; - const int idx = av_log2(block_w) - 1; - const Mv *mv = &mvf->mv[lx]; - const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (1 - hs); - const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (1 - vs); - const int8_t *hf = ff_vvc_inter_chroma_filters[hf_idx][mx]; - const int8_t *vf = ff_vvc_inter_chroma_filters[vf_idx][my]; - int denom, wx, ox; +#define SCALE_THRESHOLD_1 20480 +#define SCALE_THRESHOLD_2 28672 - x_off += mv->x >> (4 + hs); - y_off += mv->y >> (4 + vs); - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); + const int i = (scale > SCALE_THRESHOLD_2) + (scale > SCALE_THRESHOLD_1); + + if (!is_chroma) { + if (!is_affine) + return &ff_vvc_inter_luma_filters[i + !!i][0][0]; //hpel 1 is not needed for scaled + return &ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE + i][0][0]; + } + + return &ff_vvc_inter_chroma_filters[i][0][0]; +} +#define INTER_FILTER_SCALED(scale) inter_filter_scaled(scale, is_chroma, is_affine) + +#define SCALED_CHROMA_ADDIN(scale, collocated_flag) (is_chroma ? (collocated_flag ? 0 : 8 * (scale - (1 << 14))) : 0) +#define SCALED_REF_SB(off, scaling_off, ref_mv, scale, add, shift) ((((off - (scaling_off << shift)) << (4 + shift)) + ref_mv) * scale + add) +#define SCALED_REF(ref_sb, offset, shift) (FFSIGN(ref_sb) * ((FFABS(ref_sb) + (128 << is_chroma)) >> (8 + is_chroma)) + (offset << (10 - shift)) + (32 >> is_chroma)) +#define SCALED_STEP(scale) ((scale + 8) >> 4) + +static void scaled_ref_pos_and_step(const VVCLocalContext *lc, const VVCRefPic *refp, const Mv *mv, const int x_off, const int y_off, const int c_idx, + int *x, int *y, int *dx, int *dy) +{ + const VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const int is_chroma = !!c_idx; + const int hs = sps->hshift[c_idx]; + const int vs = sps->vshift[c_idx]; + const int left_offset = fc->ref->scaling_win.left_offset; + const int top_offset = fc->ref->scaling_win.top_offset; + const int addx = SCALED_CHROMA_ADDIN(refp->scale[0], sps->r->sps_chroma_horizontal_collocated_flag); + const int addy = SCALED_CHROMA_ADDIN(refp->scale[1], sps->r->sps_chroma_vertical_collocated_flag); + const int refx_sb = SCALED_REF_SB(x_off, left_offset, mv->x, refp->scale[0], addx, hs); + const int refy_sb = SCALED_REF_SB(y_off, top_offset, mv->y, refp->scale[1], addy, vs); + + *x = SCALED_REF(refx_sb, left_offset, hs); + *y = SCALED_REF(refy_sb, top_offset, vs); + *dx = SCALED_STEP(refp->scale[0]); + *dy = SCALED_STEP(refp->scale[1]); +} + +static void emulated_edge_scaled(VVCLocalContext *lc, const uint8_t **src, ptrdiff_t *src_stride, int *src_height, + const VVCFrame *ref, const int x, const int y, const int dx, const int dy, + const int block_w, const int block_h, const int is_chroma) +{ + const VVCFrameContext *fc = lc->fc; + const int x0 = SCALED_INT(x); + const int y0 = SCALED_INT(y); + const int x_end = SCALED_INT(x + block_w * dx); + const int y_end = SCALED_INT(y + block_h * dy); + const int x_last = SCALED_INT(x + (block_w - 1) * dx); + const int y_last = SCALED_INT(y + (block_h - 1) * dy); + const int src_width = x_end - x0 + (x_end == x_last); + + *src_height = y_end - y0 + (y_end == y_last); + + *src += y0 * *src_stride + (x0 * (1 << fc->ps.sps->pixel_shift)); + + emulated_edge(lc, lc->edge_emu_buffer, src, src_stride, ref, x0, y0, src_width, *src_height, is_chroma); +} + +static void mc_scaled(VVCLocalContext *lc, int16_t *dst, const VVCRefPic *refp, const Mv *mv, + int x_off, int y_off, const int block_w, const int block_h, const int c_idx) +{ + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = refp->ref->frame->data[c_idx]; + ptrdiff_t src_stride = refp->ref->frame->linesize[c_idx]; + const int is_affine = pu->inter_affine_flag; + const int is_chroma = !!c_idx; + const int idx = av_log2(block_w) - 1; + const int8_t *hf = INTER_FILTER_SCALED(refp->scale[0]); + const int8_t *vf = INTER_FILTER_SCALED(refp->scale[1]); + int x, y, dx, dy, src_height; + + scaled_ref_pos_and_step(lc, refp, mv, x_off, y_off, c_idx, &x, &y, &dx, &dy); + emulated_edge_scaled(lc, &src, &src_stride, &src_height, refp->ref, x, y, dx, dy, block_w, block_h, is_chroma); + fc->vvcdsp.inter.put_scaled[is_chroma][idx](dst, src, src_stride, src_height, x, y, dx, dy, block_h, hf, vf, block_w); +} +static void mc_uni_scaled(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, const VVCRefPic *refp, + const MvField *mvf, const int x_off, const int y_off, const int block_w, const int block_h, const int c_idx) +{ + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = refp->ref->frame->data[c_idx]; + ptrdiff_t src_stride = refp->ref->frame->linesize[c_idx]; + const int lx = mvf->pred_flag - PF_L0; + const Mv *mv = &mvf->mv[lx]; + const int is_affine = pu->inter_affine_flag; + const int is_chroma = !!c_idx; + const int idx = av_log2(block_w) - 1; + const int8_t *hf = INTER_FILTER_SCALED(refp->scale[0]); + const int8_t *vf = INTER_FILTER_SCALED(refp->scale[1]); + int denom, wx, ox, x, y, dx, dy, src_height; + + scaled_ref_pos_and_step(lc, refp, mv, x_off, y_off, c_idx, &x, &y, &dx, &dy); + emulated_edge_scaled(lc, &src, &src_stride, &src_height, refp->ref, x, y, dx, dy, block_w, block_h, is_chroma); - EMULATED_EDGE_CHROMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); if (derive_weight_uni(&denom, &wx, &ox, lc, mvf, c_idx)) { - fc->vvcdsp.inter.put_uni_w[CHROMA][idx][!!my][!!mx](dst, dst_stride, src, src_stride, - block_h, denom, wx, ox, hf, vf, block_w); + fc->vvcdsp.inter.put_uni_w_scaled[is_chroma][idx](dst, dst_stride, src, src_stride, src_height, + x, y, dx, dy, block_h, denom, wx, ox, hf, vf, block_w); } else { - fc->vvcdsp.inter.put_uni[CHROMA][idx][!!my][!!mx](dst, dst_stride, src, src_stride, - block_h, hf, vf, block_w); + fc->vvcdsp.inter.put_uni_scaled[is_chroma][idx](dst, dst_stride, src, src_stride, src_height, + x, y, dx, dy, block_h, hf, vf, block_w); } } -static void chroma_mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const AVFrame *ref0, const AVFrame *ref1, const int x_off, const int y_off, - const int block_w, const int block_h, const MvField *mvf, const int c_idx, - const int hf_idx, const int vf_idx, const MvField *orig_mv, const int dmvr_flag, const int ciip_flag) +static void mc_bi_scaled(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, + const VVCRefPic *refp0, const VVCRefPic *refp1, const MvField *mvf, + const int x_off, const int y_off, const int block_w, const int block_h, const int c_idx) { - const VVCFrameContext *fc = lc->fc; - const int hs = fc->ps.sps->hshift[1]; - const int vs = fc->ps.sps->vshift[1]; - const int idx = av_log2(block_w) - 1; - const AVFrame *ref[] = { ref0, ref1 }; - int16_t *tmp[] = { lc->tmp, lc->tmp1 }; int denom, w0, w1, o0, o1; - const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, c_idx, dmvr_flag); + const VVCFrameContext *fc = lc->fc; + const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, c_idx, lc->cu->pu.dmvr_flag); + const VVCRefPic *refps[] = { refp0, refp1 }; + int16_t *tmp[] = { lc->tmp, lc->tmp1 }; for (int i = L0; i <= L1; i++) { - const Mv *mv = mvf->mv + i; - const int mx = av_mod_uintp2(mv->x, 4 + hs) << (1 - hs); - const int my = av_mod_uintp2(mv->y, 4 + vs) << (1 - vs); - const int ox = x_off + (mv->x >> (4 + hs)); - const int oy = y_off + (mv->y >> (4 + vs)); - ptrdiff_t src_stride = ref[i]->linesize[c_idx]; - const uint8_t *src = ref[i]->data[c_idx] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); - const int8_t *hf = ff_vvc_inter_chroma_filters[hf_idx][mx]; - const int8_t *vf = ff_vvc_inter_chroma_filters[vf_idx][my]; - if (dmvr_flag) { - const int x_sb = x_off + (orig_mv->mv[i].x >> (4 + hs)); - const int y_sb = y_off + (orig_mv->mv[i].y >> (4 + vs)); - EMULATED_EDGE_DMVR_CHROMA(lc->edge_emu_buffer, &src, &src_stride, x_sb, y_sb, ox, oy); - } else { - EMULATED_EDGE_CHROMA(lc->edge_emu_buffer, &src, &src_stride, ox, oy); - } - fc->vvcdsp.inter.put[CHROMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w); + const Mv *mv = mvf->mv + i; + const VVCRefPic *refp = refps[i]; + + if (refp->is_scaled) + mc_scaled(lc, tmp[i], refp, mv, x_off, y_off, block_w, block_h, c_idx); + else + mc(lc, tmp[i], refp->ref, mv, x_off, y_off, block_w, block_h, c_idx); } if (weight_flag) fc->vvcdsp.inter.w_avg(dst, dst_stride, tmp[L0], tmp[L1], block_w, block_h, denom, w0, w1, o0, o1); @@ -400,28 +449,29 @@ static void chroma_mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ } static void luma_prof_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const AVFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, + const VVCFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, const int cb_prof_flag, const int16_t *diff_mv_x, const int16_t *diff_mv_y) { const VVCFrameContext *fc = lc->fc; - const uint8_t *src = ref->data[0]; - ptrdiff_t src_stride = ref->linesize[0]; + const uint8_t *src = ref->frame->data[LUMA]; + ptrdiff_t src_stride = ref->frame->linesize[LUMA]; uint16_t *prof_tmp = lc->tmp + PROF_TEMP_OFFSET; const int idx = av_log2(block_w) - 1; const int lx = mvf->pred_flag - PF_L0; const Mv *mv = mvf->mv + lx; const int mx = mv->x & 0xf; const int my = mv->y & 0xf; - const int8_t *hf = ff_vvc_inter_luma_filters[2][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[2][my]; + const int8_t *hf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][mx]; + const int8_t *vf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][my]; int denom, wx, ox; const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA); + const int is_chroma = 0; x_off += mv->x >> 4; y_off += mv->y >> 4; src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); if (cb_prof_flag) { fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE); fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my); @@ -437,38 +487,51 @@ static void luma_prof_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst } } +static void luma_prof(VVCLocalContext *lc, int16_t *dst, const VVCFrame *ref, + const Mv *mv , const int x_off, const int y_off, const int block_w, const int block_h, const int lx) +{ + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const int mx = mv->x & 0xf; + const int my = mv->y & 0xf; + const int ox = x_off + (mv->x >> 4); + const int oy = y_off + (mv->y >> 4); + const int idx = av_log2(block_w) - 1; + const int is_chroma = 0; + uint16_t *prof_tmp = lc->tmp2 + PROF_TEMP_OFFSET; + ptrdiff_t src_stride = ref->frame->linesize[0]; + const uint8_t *src = ref->frame->data[0] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); + const int8_t *hf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][mx]; + const int8_t *vf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][my]; + + MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, ox, oy); + if (!pu->cb_prof_flag[lx]) { + fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](dst, src, src_stride, block_h, hf, vf, block_w); + } else { + fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE); + fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my); + fc->vvcdsp.inter.apply_prof(dst, prof_tmp, pu->diff_mv_x[lx], pu->diff_mv_y[lx]); + } +} + static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, - const AVFrame *ref0, const AVFrame *ref1, const MvField *mvf, const int x_off, const int y_off, + const VVCRefPic *ref0, const VVCRefPic *ref1, const MvField *mvf, const int x_off, const int y_off, const int block_w, const int block_h) { const VVCFrameContext *fc = lc->fc; - const PredictionUnit *pu = &lc->cu->pu; - const AVFrame *ref[] = { ref0, ref1 }; + const VVCRefPic *refps[] = { ref0, ref1 }; int16_t *tmp[] = { lc->tmp, lc->tmp1 }; - uint16_t *prof_tmp = lc->tmp2 + PROF_TEMP_OFFSET; - const int idx = av_log2(block_w) - 1; int denom, w0, w1, o0, o1; const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0); for (int i = L0; i <= L1; i++) { - const Mv *mv = mvf->mv + i; - const int mx = mv->x & 0xf; - const int my = mv->y & 0xf; - const int ox = x_off + (mv->x >> 4); - const int oy = y_off + (mv->y >> 4); - ptrdiff_t src_stride = ref[i]->linesize[0]; - const uint8_t *src = ref[i]->data[0] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); - const int8_t *hf = ff_vvc_inter_luma_filters[2][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[2][my]; - - EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, ox, oy); - if (!pu->cb_prof_flag[i]) { - fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w); - } else { - fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE); - fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my); - fc->vvcdsp.inter.apply_prof(tmp[i], prof_tmp, pu->diff_mv_x[i], pu->diff_mv_y[i]); - } + const VVCRefPic *refp = refps[i]; + const Mv *mv = mvf->mv + i; + + if (refp->is_scaled) + mc_scaled(lc, tmp[i], refp, mv, x_off, y_off, block_w, block_h, LUMA); + else + luma_prof(lc, tmp[i], refp->ref, mv, x_off, y_off, block_w, block_h, i); } if (weight_flag) @@ -477,15 +540,15 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ fc->vvcdsp.inter.avg(dst, dst_stride, tmp[L0], tmp[L1], block_w, block_h); } -static int pred_get_refs(const VVCLocalContext *lc, VVCFrame *ref[2], const MvField *mv) +static int pred_get_refs(const VVCLocalContext *lc, VVCRefPic *refp[2], const MvField *mv) { - const RefPicList *rpl = lc->sc->rpl; + RefPicList *rpl = lc->sc->rpl; for (int mask = PF_L0; mask <= PF_L1; mask++) { if (mv->pred_flag & mask) { const int lx = mask - PF_L0; - ref[lx] = rpl[lx].ref[mv->ref_idx[lx]]; - if (!ref[lx]) + refp[lx] = rpl[lx].refs + mv->ref_idx[lx]; + if (!refp[lx]->ref) return AVERROR_INVALIDDATA; } } @@ -540,13 +603,13 @@ static void pred_gpm_blk(VVCLocalContext *lc) for (int i = 0; i < 2; i++) { const MvField *mv = pu->gpm_mv + i; const int lx = mv->pred_flag - PF_L0; - VVCFrame *ref = lc->sc->rpl[lx].ref[mv->ref_idx[lx]]; - if (!ref) + VVCRefPic *refp = lc->sc->rpl[lx].refs + mv->ref_idx[lx]; + if (!refp->ref) return; - if (c_idx) - chroma_mc(lc, tmp[i], ref->frame, mv->mv + lx, x, y, width, height, c_idx); + if (refp->is_scaled) + mc_scaled(lc, tmp[i], refp, mv->mv + lx, x, y, width, height, c_idx); else - luma_mc(lc, tmp[i], ref->frame, mv->mv + lx, x, y, width, height); + mc(lc, tmp[i], refp->ref, mv->mv + lx, x, y, width, height, c_idx); } fc->vvcdsp.inter.put_gpm(dst, dst_stride, width, height, tmp[0], tmp[1], weights, step_x, step_y); } @@ -575,99 +638,57 @@ static int ciip_derive_intra_weight(const VVCLocalContext *lc, const int x0, con return w; } -static void pred_regular_luma(VVCLocalContext *lc, const int hf_idx, const int vf_idx, const MvField *mv, - const int x0, const int y0, const int sbw, const int sbh, const MvField *orig_mv, const int sb_bdof_flag) +static void pred_regular(VVCLocalContext *lc, const MvField *mvf, const MvField *orig_mvf, + const int x0, const int y0, const int sbw, const int sbh, const int sb_bdof_flag, const int c_start) { - const SliceContext *sc = lc->sc; - const VVCFrameContext *fc = lc->fc; - const int ciip_flag = lc->cu->ciip_flag; - uint8_t *dst = POS(0, x0, y0); - const ptrdiff_t dst_stride = fc->frame->linesize[0]; - uint8_t *inter = ciip_flag ? (uint8_t *)lc->ciip_tmp1 : dst; - const ptrdiff_t inter_stride = ciip_flag ? (MAX_PB_SIZE * sizeof(uint16_t)) : dst_stride; - VVCFrame *ref[2]; - - if (pred_get_refs(lc, ref, mv) < 0) - return; - - if (mv->pred_flag != PF_BI) { - const int lx = mv->pred_flag - PF_L0; - luma_mc_uni(lc, inter, inter_stride, ref[lx]->frame, - mv, x0, y0, sbw, sbh, hf_idx, vf_idx); - } else { - luma_mc_bi(lc, inter, inter_stride, ref[0]->frame, - &mv->mv[0], x0, y0, sbw, sbh, ref[1]->frame, &mv->mv[1], mv, - hf_idx, vf_idx, orig_mv, sb_bdof_flag); - } - - if (ciip_flag) { - const int intra_weight = ciip_derive_intra_weight(lc, x0, y0, sbw, sbh); - fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, 0); - if (sc->sh.r->sh_lmcs_used_flag) - fc->vvcdsp.lmcs.filter(inter, inter_stride, sbw, sbh, &fc->ps.lmcs.fwd_lut); - fc->vvcdsp.inter.put_ciip(dst, dst_stride, sbw, sbh, inter, inter_stride, intra_weight); - - } -} + const VVCFrameContext *fc = lc->fc; + const int c_end = fc->ps.sps->r->sps_chroma_format_idc ? CR : LUMA; + VVCRefPic *refp[2]; -static void pred_regular_chroma(VVCLocalContext *lc, const MvField *mv, - const int x0, const int y0, const int sbw, const int sbh, const MvField *orig_mv, const int dmvr_flag) -{ - const VVCFrameContext *fc = lc->fc; - const int hs = fc->ps.sps->hshift[1]; - const int vs = fc->ps.sps->vshift[1]; - const int x0_c = x0 >> hs; - const int y0_c = y0 >> vs; - const int w_c = sbw >> hs; - const int h_c = sbh >> vs; - const int do_ciip = lc->cu->ciip_flag && (w_c > 2); - - uint8_t* dst1 = POS(1, x0, y0); - uint8_t* dst2 = POS(2, x0, y0); - const ptrdiff_t dst1_stride = fc->frame->linesize[1]; - const ptrdiff_t dst2_stride = fc->frame->linesize[2]; - - uint8_t *inter1 = do_ciip ? (uint8_t *)lc->ciip_tmp1 : dst1; - const ptrdiff_t inter1_stride = do_ciip ? (MAX_PB_SIZE * sizeof(uint16_t)) : dst1_stride; - - uint8_t *inter2 = do_ciip ? (uint8_t *)lc->ciip_tmp2 : dst2; - const ptrdiff_t inter2_stride = do_ciip ? (MAX_PB_SIZE * sizeof(uint16_t)) : dst2_stride; - - //fix me - const int hf_idx = 0; - const int vf_idx = 0; - VVCFrame *ref[2]; - - if (pred_get_refs(lc, ref, mv) < 0) + if (pred_get_refs(lc, refp, mvf) < 0) return; - if (mv->pred_flag != PF_BI) { - const int lx = mv->pred_flag - PF_L0; - if (!ref[lx]) - return; - - chroma_mc_uni(lc, inter1, inter1_stride, ref[lx]->frame->data[1], ref[lx]->frame->linesize[1], - x0_c, y0_c, w_c, h_c, mv, CB, hf_idx, vf_idx); - chroma_mc_uni(lc, inter2, inter2_stride, ref[lx]->frame->data[2], ref[lx]->frame->linesize[2], - x0_c, y0_c, w_c, h_c, mv, CR, hf_idx, vf_idx); - } else { - if (!ref[0] || !ref[1]) - return; - - chroma_mc_bi(lc, inter1, inter1_stride, ref[0]->frame, ref[1]->frame, - x0_c, y0_c, w_c, h_c, mv, CB, hf_idx, vf_idx, orig_mv, dmvr_flag, lc->cu->ciip_flag); - - chroma_mc_bi(lc, inter2, inter2_stride, ref[0]->frame, ref[1]->frame, - x0_c, y0_c, w_c, h_c, mv, CR, hf_idx, vf_idx, orig_mv, dmvr_flag, lc->cu->ciip_flag); - - } - if (do_ciip) { - const int intra_weight = ciip_derive_intra_weight(lc, x0, y0, sbw, sbh); - fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, 1); - fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, 2); - fc->vvcdsp.inter.put_ciip(dst1, dst1_stride, w_c, h_c, inter1, inter1_stride, intra_weight); - fc->vvcdsp.inter.put_ciip(dst2, dst2_stride, w_c, h_c, inter2, inter2_stride, intra_weight); - + for (int c_idx = c_start; c_idx <= c_end; c_idx++) { + uint8_t *dst = POS(c_idx, x0, y0); + const ptrdiff_t dst_stride = fc->frame->linesize[c_idx]; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; + const int x = x0 >> hs; + const int y = y0 >> vs; + const int w = sbw >> hs; + const int h = sbh >> vs; + const int is_luma = !c_idx; + const int do_ciip = lc->cu->ciip_flag && (is_luma || (w > 2)); + uint8_t *inter = do_ciip ? (uint8_t *)lc->ciip_tmp : dst; + const ptrdiff_t inter_stride = do_ciip ? (MAX_PB_SIZE * sizeof(uint16_t)) : dst_stride; + const int do_bdof = is_luma && sb_bdof_flag; + + if (mvf->pred_flag != PF_BI) { + const int lx = mvf->pred_flag - PF_L0; + + if (refp[lx]->is_scaled) { + mc_uni_scaled(lc, inter, inter_stride, refp[lx], mvf, + x, y, w, h, c_idx); + } else { + mc_uni(lc, inter, inter_stride, refp[lx]->ref, mvf, + x, y, w, h, c_idx); + } + } else { + if (refp[L0]->is_scaled || refp[L1]->is_scaled) { + mc_bi_scaled(lc, inter, inter_stride, refp[L0], refp[L1], mvf, + x, y, w, h, c_idx); + } else { + mc_bi(lc, inter, inter_stride, refp[L0]->ref, refp[L1]->ref, mvf, orig_mvf, + x, y, w, h, c_idx, do_bdof); + } + } + if (do_ciip) { + const int intra_weight = ciip_derive_intra_weight(lc, x0, y0, sbw, sbh); + fc->vvcdsp.intra.intra_pred(lc, x0, y0, sbw, sbh, c_idx); + if (!c_idx && lc->sc->sh.r->sh_lmcs_used_flag) + fc->vvcdsp.lmcs.filter(inter, inter_stride, w, h, &fc->ps.lmcs.fwd_lut); + fc->vvcdsp.inter.put_ciip(dst, dst_stride, w, h, inter, inter_stride, intra_weight); + } } } @@ -738,7 +759,7 @@ static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv, const int oy = y_off + (mv->y >> 4) - sr_range; ptrdiff_t src_stride = ref[i]->linesize[LUMA]; const uint8_t *src = ref[i]->data[LUMA] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); - EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy); + MC_EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy); fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w); } @@ -804,17 +825,16 @@ static void derive_sb_mv(VVCLocalContext *lc, MvField *mv, MvField *orig_mv, int if (pu->bdof_flag) *sb_bdof_flag = 1; if (pu->dmvr_flag) { - VVCFrame* ref[2]; - if (pred_get_refs(lc, ref, mv) < 0) + VVCRefPic *refp[2]; + if (pred_get_refs(lc, refp, mv) < 0) return; - dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, ref[0]->frame, ref[1]->frame, x0, y0, sbw, sbh); + dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, refp[L0]->ref->frame, refp[L1]->ref->frame, x0, y0, sbw, sbh); set_dmvr_info(fc, x0, y0, sbw, sbh, mv); } } static void pred_regular_blk(VVCLocalContext *lc, const int skip_ciip) { - const VVCFrameContext *fc = lc->fc; const CodingUnit *cu = lc->cu; PredictionUnit *pu = &lc->cu->pu; const MotionInfo *mi = &pu->mi; @@ -836,9 +856,7 @@ static void pred_regular_blk(VVCLocalContext *lc, const int skip_ciip) ff_vvc_set_neighbour_available(lc, x0, y0, sbw, sbh); derive_sb_mv(lc, &mv, &orig_mv, &sb_bdof_flag, x0, y0, sbw, sbh); - pred_regular_luma(lc, mi->hpel_if_idx, mi->hpel_if_idx, &mv, x0, y0, sbw, sbh, &orig_mv, sb_bdof_flag); - if (fc->ps.sps->r->sps_chroma_format_idc) - pred_regular_chroma(lc, &mv, x0, y0, sbw, sbh, &orig_mv, pu->dmvr_flag); + pred_regular(lc, &mv, &orig_mv, x0, y0, sbw, sbh, sb_bdof_flag, LUMA); } } } @@ -873,6 +891,7 @@ static void pred_affine_blk(VVCLocalContext *lc) const int sbh = cu->cb_height / mi->num_sb_y; const int hs = fc->ps.sps->hshift[1]; const int vs = fc->ps.sps->vshift[1]; + const int dst_stride = fc->frame->linesize[LUMA]; for (int sby = 0; sby < mi->num_sb_y; sby++) { for (int sbx = 0; sbx < mi->num_sb_x; sbx++) { @@ -881,26 +900,29 @@ static void pred_affine_blk(VVCLocalContext *lc) uint8_t *dst0 = POS(0, x, y); const MvField *mv = ff_vvc_get_mvf(fc, x, y); - VVCFrame *ref[2]; + VVCRefPic *refp[2]; - if (pred_get_refs(lc, ref, mv) < 0) + if (pred_get_refs(lc, refp, mv) < 0) return; if (mi->pred_flag != PF_BI) { const int lx = mi->pred_flag - PF_L0; - luma_prof_uni(lc, dst0, fc->frame->linesize[0], ref[lx]->frame, - mv, x, y, sbw, sbh, pu->cb_prof_flag[lx], - pu->diff_mv_x[lx], pu->diff_mv_y[lx]); + if (refp[lx]->is_scaled) { + mc_uni_scaled(lc, dst0, dst_stride, refp[lx], mv, x, y, sbw, sbh, LUMA); + } else { + luma_prof_uni(lc, dst0, dst_stride, refp[lx]->ref, + mv, x, y, sbw, sbh, pu->cb_prof_flag[lx], + pu->diff_mv_x[lx], pu->diff_mv_y[lx]); + } } else { - luma_prof_bi(lc, dst0, fc->frame->linesize[0], ref[0]->frame, ref[1]->frame, - mv, x, y, sbw, sbh); + luma_prof_bi(lc, dst0, dst_stride, refp[L0], refp[L1], mv, x, y, sbw, sbh); } if (fc->ps.sps->r->sps_chroma_format_idc) { if (!av_mod_uintp2(sby, vs) && !av_mod_uintp2(sbx, hs)) { MvField mvc; - derive_affine_mvc(&mvc, fc, mv, x, y, sbw, sbh); - pred_regular_chroma(lc, &mvc, x, y, sbw<> shift1, shift2); + const int8_t *filter = hf + mx * taps; + const pixel *src = (pixel*)_src - extra_before * src_stride; + + for (int j = 0; j < src_height + extra; j++) { + tmp[j] = (is_chroma ? CHROMA_FILTER(src, 1) : LUMA_FILTER(src, 1)) >> (BIT_DEPTH - 8); + src += src_stride; + } + tmp += TMP_STRIDE; + } + + for (int i = 0; i < height; i++) { + const int ty = _y + dy * i; + const int x = SCALED_INT(ty) - y0; + const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int8_t *filter = vf + mx * taps; + + tmp = tmp_array + extra_before; + for (int j = 0; j < width; j++) { + const int val = (is_chroma ? CHROMA_FILTER(tmp, 1) : LUMA_FILTER(tmp, 1)) >> 6; + if (is_uni) + dst[j] = av_clip_pixel((val + offset) >> shift); + else + dst16[j] = val; + tmp += TMP_STRIDE; + } + if (is_uni) + dst += dst_stride; + else + dst16 += dst_stride; + } +} + +static void FUNC(put_luma_scaled)(int16_t *_dst, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)((uint8_t *)_dst, MAX_PB_SIZE * sizeof(pixel), _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 0, 0); +} + +static void FUNC(put_chroma_scaled)(int16_t *_dst, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)((uint8_t *)_dst, MAX_PB_SIZE * sizeof(pixel), _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 0, 1); +} + +static void FUNC(put_uni_luma_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 1, 0); +} + +static void FUNC(put_uni_chroma_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, height, hf, vf, width, 1, 1); +} + +static void av_always_inline FUNC(put_uni_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *const _src, ptrdiff_t _src_stride, const int src_height, + const int _x, const int _y, const int dx, const int dy, const int denom, const int wx, const int _ox, + const int height, const int8_t *hf, const int8_t *vf, const int width, const int is_chroma) +{ + int16_t tmp_array[TMP_STRIDE * MAX_PB_SIZE]; + int16_t *tmp = tmp_array; + pixel *dst = (pixel*)_dst; + const ptrdiff_t dst_stride = _dst_stride / sizeof(pixel); + const ptrdiff_t src_stride = _src_stride / sizeof(pixel); + const int shift = FFMAX(2, 14 - BIT_DEPTH); + const int offset = 1 << (shift - 1); + const int ox = _ox * (1 << (BIT_DEPTH - 8)); + const int taps = is_chroma ? VVC_INTER_CHROMA_TAPS : VVC_INTER_LUMA_TAPS; + const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; + const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; + const int shift1 = 6 - is_chroma; + const int shift2 = 4 + is_chroma; + const int x0 = SCALED_INT(_x); + const int y0 = SCALED_INT(_y); + + for (int i = 0; i < width; i++) { + const int tx = _x + dx * i; + const int x = SCALED_INT(tx) - x0; + const int mx = av_mod_uintp2(tx >> shift1, shift2); + const int8_t *filter = hf + mx * taps; + const pixel *src = (pixel*)_src - extra_before * src_stride; + + for (int j = 0; j < src_height + extra; j++) { + tmp[j] = (is_chroma ? CHROMA_FILTER(src, 1) : LUMA_FILTER(src, 1)) >> (BIT_DEPTH - 8); + src += src_stride; + } + tmp += TMP_STRIDE; + } + + for (int i = 0; i < height; i++) { + const int ty = _y + dy * i; + const int x = SCALED_INT(ty) - y0; + const int mx = av_mod_uintp2(ty >> shift1, shift2); + const int8_t *filter = vf + mx * taps; + + tmp = tmp_array + extra_before; + for (int j = 0; j < width; j++) { + const int val = (is_chroma ? CHROMA_FILTER(tmp, 1) : LUMA_FILTER(tmp, 1)) >> 6; + dst[j] = av_clip_pixel(((wx * val + offset) >> shift) + ox); + tmp += TMP_STRIDE; + } + dst += dst_stride; + } +} + +static void FUNC(put_uni_luma_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_uni_w_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, denom, wx, ox, height, hf, vf, width, 0); +} + +static void FUNC(put_uni_chroma_w_scaled)(uint8_t *_dst, const ptrdiff_t _dst_stride, + const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, + const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, + const int height, const int8_t *hf, const int8_t *vf, const int width) +{ + FUNC(put_uni_w_scaled)(_dst, _dst_stride, _src, _src_stride, src_height, x, y, dx, dy, denom, wx, ox, height, hf, vf, width, 1); +} + +#undef TMP_STRIDE + static void FUNC(avg)(uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src0, const int16_t *src1, const int width, const int height) { @@ -440,6 +599,15 @@ static void FUNC(ff_vvc_inter_dsp_init)(VVCInterDSPContext *const inter) FUNCS(LUMA, luma); FUNCS(CHROMA, chroma); + for (int i = 0; i < FF_ARRAY_ELEMS(inter->put_scaled[LUMA]); i++) { + inter->put_scaled[LUMA][i] = FUNC(put_luma_scaled); + inter->put_scaled[CHROMA][i] = FUNC(put_chroma_scaled); + inter->put_uni_scaled[LUMA][i] = FUNC(put_uni_luma_scaled); + inter->put_uni_scaled[CHROMA][i] = FUNC(put_uni_chroma_scaled); + inter->put_uni_w_scaled[LUMA][i] = FUNC(put_uni_luma_w_scaled); + inter->put_uni_w_scaled[CHROMA][i] = FUNC(put_uni_chroma_w_scaled); + } + inter->avg = FUNC(avg); inter->w_avg = FUNC(w_avg); diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c b/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c index fe7d923460..e78a9b4694 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c @@ -88,8 +88,8 @@ static int check_mvset(Mv *mvLXCol, Mv *mvCol, const RefPicList *refPicList, int X, int refIdxLx, const RefPicList *refPicList_col, int listCol, int refidxCol) { - int cur_lt = refPicList[X].isLongTerm[refIdxLx]; - int col_lt = refPicList_col[listCol].isLongTerm[refidxCol]; + int cur_lt = refPicList[X].refs[refIdxLx].is_lt; + int col_lt = refPicList_col[listCol].refs[refidxCol].is_lt; int col_poc_diff, cur_poc_diff; if (cur_lt != col_lt) { @@ -98,8 +98,8 @@ static int check_mvset(Mv *mvLXCol, Mv *mvCol, return 0; } - col_poc_diff = colPic - refPicList_col[listCol].list[refidxCol]; - cur_poc_diff = poc - refPicList[X].list[refIdxLx]; + col_poc_diff = colPic - refPicList_col[listCol].refs[refidxCol].poc; + cur_poc_diff = poc - refPicList[X].refs[refIdxLx].poc; mv_compression(mvCol); if (cur_lt || col_poc_diff == cur_poc_diff) { @@ -126,7 +126,7 @@ int ff_vvc_no_backward_pred_flag(const VVCLocalContext *lc) for (j = 0; j < 2; j++) { for (i = 0; i < lc->sc->sh.r->num_ref_idx_active[j]; i++) { - if (rpl[j].list[i] > lc->fc->ps.ph.poc) { + if (rpl[j].refs[i].poc > lc->fc->ps.ph.poc) { check_diffpicount++; break; } @@ -297,7 +297,8 @@ static int derive_cb_prof_flag_lx(const VVCLocalContext *lc, const PredictionUni if (IS_SAME_MV(cp_mv, cp_mv + 1) && IS_SAME_MV(cp_mv, cp_mv + 2)) return 0; } - //fixme: RprConstraintsActiveFlag + if (lc->sc->rpl[lx].refs[mi->ref_idx[lx]].is_scaled) + return 0; return 1; } @@ -1059,9 +1060,9 @@ static int sb_temporal_luma_motion_data(const VVCLocalContext *lc, const MvField colPic = ref->poc; if (a1) { - if ((a1->pred_flag & PF_L0) && colPic == rpl[0].list[a1->ref_idx[0]]) + if ((a1->pred_flag & PF_L0) && colPic == rpl[L0].refs[a1->ref_idx[L0]].poc) *temp_mv = a1->mv[0]; - else if ((a1->pred_flag & PF_L1) && colPic == rpl[1].list[a1->ref_idx[1]]) + else if ((a1->pred_flag & PF_L1) && colPic == rpl[L1].refs[a1->ref_idx[L1]].poc) *temp_mv = a1->mv[1]; ff_vvc_round_mv(temp_mv, 0, 4); } @@ -1418,16 +1419,16 @@ static int mvp_candidate(const VVCLocalContext *lc, const int x_cand, const int const MvField* tab_mvf = fc->tab.mvf; const MvField *mvf = &TAB_MVF(x_cand, y_cand); const PredFlag maskx = lx + 1; - const int poc = rpl[lx].list[ref_idx[lx]]; + const int poc = rpl[lx].refs[ref_idx[lx]].poc; int available = 0; - if ((mvf->pred_flag & maskx) && rpl[lx].list[mvf->ref_idx[lx]] == poc) { + if ((mvf->pred_flag & maskx) && rpl[lx].refs[mvf->ref_idx[lx]].poc == poc) { available = 1; *mv = mvf->mv[lx]; } else { const int ly = !lx; const PredFlag masky = ly + 1; - if ((mvf->pred_flag & masky) && rpl[ly].list[mvf->ref_idx[ly]] == poc) { + if ((mvf->pred_flag & masky) && rpl[ly].refs[mvf->ref_idx[ly]].poc == poc) { available = 1; *mv = mvf->mv[ly]; } @@ -1450,15 +1451,15 @@ static int affine_mvp_candidate(const VVCLocalContext *lc, const MvField *mvf = &TAB_MVF(x_nb, y_nb); RefPicList* rpl = lc->sc->rpl; const PredFlag maskx = lx + 1; - const int poc = rpl[lx].list[ref_idx[lx]]; + const int poc = rpl[lx].refs[ref_idx[lx]].poc; - if ((mvf->pred_flag & maskx) && rpl[lx].list[mvf->ref_idx[lx]] == poc) { + if ((mvf->pred_flag & maskx) && rpl[lx].refs[mvf->ref_idx[lx]].poc == poc) { available = 1; affine_cps_from_nb(lc, x_nb, y_nb, nbw, nbh, lx, cps, num_cp); } else { const int ly = !lx; const PredFlag masky = ly + 1; - if ((mvf->pred_flag & masky) && rpl[ly].list[mvf->ref_idx[ly]] == poc) { + if ((mvf->pred_flag & masky) && rpl[ly].refs[mvf->ref_idx[ly]].poc == poc) { available = 1; affine_cps_from_nb(lc, x_nb, y_nb, nbw, nbh, ly, cps, num_cp); } @@ -1550,7 +1551,7 @@ static int mvp_history_candidates(const VVCLocalContext *lc, { const EntryPoint* ep = lc->ep; const RefPicList* rpl = lc->sc->rpl; - const int poc = rpl[lx].list[ref_idx]; + const int poc = rpl[lx].refs[ref_idx].poc; if (ep->num_hmvp == 0) return 0; @@ -1559,7 +1560,7 @@ static int mvp_history_candidates(const VVCLocalContext *lc, for (int j = 0; j < 2; j++) { const int ly = (j ? !lx : lx); PredFlag mask = PF_L0 + ly; - if ((h->pred_flag & mask) && poc == rpl[ly].list[h->ref_idx[ly]]) { + if ((h->pred_flag & mask) && poc == rpl[ly].refs[h->ref_idx[ly]].poc) { if (mvp_lx_flag == num_cands) { *mv = h->mv[ly]; ff_vvc_round_mv(mv, amvr_shift, amvr_shift); @@ -1725,14 +1726,14 @@ static int affine_mvp_constructed_cp(NeighbourContext *ctx, if (check_available(n, ctx->lc, 0)) { const PredFlag maskx = lx + 1; const MvField* mvf = &TAB_MVF(n->x, n->y); - const int poc = rpl[lx].list[ref_idx]; - if ((mvf->pred_flag & maskx) && rpl[lx].list[mvf->ref_idx[lx]] == poc) { + const int poc = rpl[lx].refs[ref_idx].poc; + if ((mvf->pred_flag & maskx) && rpl[lx].refs[mvf->ref_idx[lx]].poc == poc) { available = 1; *cp = mvf->mv[lx]; } else { const int ly = !lx; const PredFlag masky = ly + 1; - if ((mvf->pred_flag & masky) && rpl[ly].list[mvf->ref_idx[ly]] == poc) { + if ((mvf->pred_flag & masky) && rpl[ly].refs[mvf->ref_idx[ly]].poc == poc) { available = 1; *cp = mvf->mv[ly]; } diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c b/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c index 6694bc4c51..fb42963034 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c @@ -52,6 +52,8 @@ void ff_vvc_unref_frame(VVCFrameContext *fc, VVCFrame *frame, int flags) frame->flags &= ~flags; if (!frame->flags) { av_frame_unref(frame->frame); + ff_refstruct_unref(&frame->sps); + ff_refstruct_unref(&frame->pps); ff_refstruct_unref(&frame->progress); ff_refstruct_unref(&frame->tab_dmvr_mvf); @@ -112,13 +114,18 @@ static FrameProgress *alloc_progress(void) static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc) { + const VVCSPS *sps = fc->ps.sps; const VVCPPS *pps = fc->ps.pps; for (int i = 0; i < FF_ARRAY_ELEMS(fc->DPB); i++) { int ret; VVCFrame *frame = &fc->DPB[i]; + VVCWindow *win = &frame->scaling_win; if (frame->frame->buf[0]) continue; + frame->sps = ff_refstruct_ref_c(fc->ps.sps); + frame->pps = ff_refstruct_ref_c(fc->ps.pps); + ret = ff_thread_get_buffer(s->avctx, frame->frame, AV_GET_BUFFER_FLAG_REF); if (ret < 0) return NULL; @@ -139,6 +146,13 @@ static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc) for (int j = 0; j < frame->ctb_count; j++) frame->rpl_tab[j] = frame->rpl; + win->left_offset = pps->r->pps_scaling_win_left_offset << sps->hshift[CHROMA]; + win->right_offset = pps->r->pps_scaling_win_right_offset << sps->hshift[CHROMA]; + win->top_offset = pps->r->pps_scaling_win_top_offset << sps->vshift[CHROMA]; + win->bottom_offset = pps->r->pps_scaling_win_bottom_offset << sps->vshift[CHROMA]; + frame->ref_width = pps->r->pps_pic_width_in_luma_samples - win->left_offset - win->right_offset; + frame->ref_height = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset; + frame->progress = alloc_progress(); if (!frame->progress) goto fail; @@ -348,11 +362,30 @@ static VVCFrame *generate_missing_ref(VVCContext *s, VVCFrameContext *fc, int po return frame; } +#define CHECK_MAX(d) (frame->ref_##d * frame->sps->r->sps_pic_##d##_max_in_luma_samples >= ref->ref_##d * (frame->pps->r->pps_pic_##d##_in_luma_samples - max)) +#define CHECK_SAMPLES(d) (frame->pps->r->pps_pic_##d##_in_luma_samples == ref->pps->r->pps_pic_##d##_in_luma_samples) +static int check_candidate_ref(const VVCFrame *frame, const VVCRefPic *refp) +{ + const VVCFrame *ref = refp->ref; + + if (refp->is_scaled) { + const int max = FFMAX(8, frame->sps->min_cb_size_y); + return frame->ref_width * 2 >= ref->ref_width && + frame->ref_height * 2 >= ref->ref_height && + frame->ref_width <= ref->ref_width * 8 && + frame->ref_height <= ref->ref_height * 8 && + CHECK_MAX(width) && CHECK_MAX(height); + } + return CHECK_SAMPLES(width) && CHECK_SAMPLES(height); +} + +#define RPR_SCALE(f) (((ref->f << 14) + (fc->ref->f >> 1)) / fc->ref->f) /* add a reference with the given poc to the list and mark it as used in DPB */ static int add_candidate_ref(VVCContext *s, VVCFrameContext *fc, RefPicList *list, int poc, int ref_flag, uint8_t use_msb) { - VVCFrame *ref = find_ref_idx(s, fc, poc, use_msb); + VVCFrame *ref = find_ref_idx(s, fc, poc, use_msb); + VVCRefPic *refp = &list->refs[list->nb_refs]; if (ref == fc->ref || list->nb_refs >= VVC_MAX_REF_ENTRIES) return AVERROR_INVALIDDATA; @@ -363,9 +396,21 @@ static int add_candidate_ref(VVCContext *s, VVCFrameContext *fc, RefPicList *lis return AVERROR(ENOMEM); } - list->list[list->nb_refs] = poc; - list->ref[list->nb_refs] = ref; - list->isLongTerm[list->nb_refs] = ref_flag & VVC_FRAME_FLAG_LONG_REF; + refp->poc = poc; + refp->ref = ref; + refp->is_lt = ref_flag & VVC_FRAME_FLAG_LONG_REF; + refp->is_scaled = ref->sps->r->sps_num_subpics_minus1 != fc->ref->sps->r->sps_num_subpics_minus1|| + memcmp(&ref->scaling_win, &fc->ref->scaling_win, sizeof(ref->scaling_win)) || + ref->pps->r->pps_pic_width_in_luma_samples != fc->ref->pps->r->pps_pic_width_in_luma_samples || + ref->pps->r->pps_pic_height_in_luma_samples != fc->ref->pps->r->pps_pic_height_in_luma_samples; + + if (!check_candidate_ref(fc->ref, refp)) + return AVERROR_INVALIDDATA; + + if (refp->is_scaled) { + refp->scale[0] = RPR_SCALE(ref_width); + refp->scale[1] = RPR_SCALE(ref_height); + } list->nb_refs++; mark_ref(ref, ref_flag); @@ -463,7 +508,7 @@ int ff_vvc_slice_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc) } if ((!rsh->sh_collocated_from_l0_flag) == lx && rsh->sh_collocated_ref_idx < rpl->nb_refs) - fc->ref->collocated_ref = rpl->ref[rsh->sh_collocated_ref_idx]; + fc->ref->collocated_ref = rpl->refs[rsh->sh_collocated_ref_idx].ref; } return 0; } diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/thread.c b/src/ExtLib/ffmpeg/libavcodec/vvc/thread.c index 3b27811db2..8777d380bf 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/thread.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/thread.c @@ -293,10 +293,14 @@ static void schedule_inter(VVCContext *s, VVCFrameContext *fc, const SliceContex CTU *ctu = fc->tab.ctus + rs; for (int lx = 0; lx < 2; lx++) { for (int i = 0; i < sh->r->num_ref_idx_active[lx]; i++) { - const int y = ctu->max_y[lx][i]; - VVCFrame *ref = sc->rpl[lx].ref[i]; - if (ref && y >= 0) + int y = ctu->max_y[lx][i]; + VVCRefPic *refp = sc->rpl[lx].refs + i; + VVCFrame *ref = refp->ref; + if (ref && y >= 0) { + if (refp->is_scaled) + y = y * refp->scale[1] >> 14; add_progress_listener(ref, &t->listener[lx][i], t, s, VVC_PROGRESS_PIXEL, y + LUMA_EXTRA_AFTER); + } } } } diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp.asm b/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp.asm index 4b2fd65435..9fc82ee9ae 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp.asm +++ b/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp.asm @@ -29,7 +29,7 @@ vector: db 0,1,4,5,8,9,12,13,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0, SECTION .text -%macro PMACSDQL 5 +%macro PMACSDQL 3 %if cpuflag(xop) pmacsdql %1, %2, %3, %1 %else @@ -38,9 +38,9 @@ SECTION .text %endif %endmacro -%macro LPC_32 1 +%macro LPC_32 3 INIT_XMM %1 -cglobal flac_lpc_32, 5,6,5, decoded, coeffs, pred_order, qlevel, len, j +cglobal flac_lpc_%2, 5,6,5, decoded, coeffs, pred_order, qlevel, len, j sub lend, pred_orderd jle .ret movsxdifnidn pred_orderq, pred_orderd @@ -59,22 +59,22 @@ ALIGN 16 test jq, jq jz .end_order .loop_order: - PMACSDQL m2, m0, m1, m2, m0 + PMACSDQL m2, m0, m1 movd m0, [decodedq+jq*4] - PMACSDQL m3, m1, m0, m3, m1 + PMACSDQL m3, m1, m0 movd m1, [coeffsq+jq*4] inc jq jl .loop_order .end_order: - PMACSDQL m2, m0, m1, m2, m0 - psrlq m2, m4 + PMACSDQL m2, m0, m1 + %3 m2, m4 movd m0, [decodedq] paddd m0, m2 movd [decodedq], m0 sub lend, 2 jl .ret - PMACSDQL m3, m1, m0, m3, m1 - psrlq m3, m4 + PMACSDQL m3, m1, m0 + %3 m3, m4 movd m1, [decodedq+4] paddd m1, m3 movd [decodedq+4], m1 @@ -83,10 +83,60 @@ ALIGN 16 RET %endmacro +LPC_32 sse4, 16, psrad +LPC_32 sse4, 32, psrlq %if HAVE_XOP_EXTERNAL -LPC_32 xop +LPC_32 xop, 32, psrlq %endif -LPC_32 sse4 + +INIT_XMM sse2 +cglobal flac_wasted_32, 3,3,5, decoded, wasted, len + shl lend, 2 + add decodedq, lenq + neg lenq + movd m4, wastedd +ALIGN 16 +.loop: + mova m0, [decodedq+lenq+mmsize*0] + mova m1, [decodedq+lenq+mmsize*1] + mova m2, [decodedq+lenq+mmsize*2] + mova m3, [decodedq+lenq+mmsize*3] + pslld m0, m4 + pslld m1, m4 + pslld m2, m4 + pslld m3, m4 + mova [decodedq+lenq+mmsize*0], m0 + mova [decodedq+lenq+mmsize*1], m1 + mova [decodedq+lenq+mmsize*2], m2 + mova [decodedq+lenq+mmsize*3], m3 + add lenq, mmsize * 4 + jl .loop + RET + +INIT_XMM sse4 +cglobal flac_wasted_33, 4,4,5, decoded, residuals, wasted, len + shl lend, 2 + lea decodedq, [decodedq+lenq*2] + add residualsq, lenq + neg lenq + movd m4, wastedd +ALIGN 16 +.loop: + pmovsxdq m0, [residualsq+lenq+mmsize*0] + pmovsxdq m1, [residualsq+lenq+mmsize/2] + pmovsxdq m2, [residualsq+lenq+mmsize*1] + pmovsxdq m3, [residualsq+lenq+mmsize*1+mmsize/2] + psllq m0, m4 + psllq m1, m4 + psllq m2, m4 + psllq m3, m4 + mova [decodedq+lenq*2+mmsize*0], m0 + mova [decodedq+lenq*2+mmsize*1], m1 + mova [decodedq+lenq*2+mmsize*2], m2 + mova [decodedq+lenq*2+mmsize*3], m3 + add lenq, mmsize * 2 + jl .loop + RET ;---------------------------------------------------------------------------------- ;void ff_flac_decorrelate_[lrm]s_16_sse2(uint8_t **out, int32_t **in, int channels, diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp_init.c b/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp_init.c index ce5787262e..23e1260615 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp_init.c +++ b/src/ExtLib/ffmpeg/libavcodec/x86/flacdsp_init.c @@ -23,11 +23,16 @@ #include "libavutil/x86/cpu.h" #include "config.h" +void ff_flac_lpc_16_sse4(int32_t *samples, const int coeffs[32], int order, + int qlevel, int len); void ff_flac_lpc_32_sse4(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); void ff_flac_lpc_32_xop(int32_t *samples, const int coeffs[32], int order, int qlevel, int len); +void ff_flac_wasted_32_sse2(int32_t *decoded, int wasted, int len); +void ff_flac_wasted_33_sse4(int64_t *decoded, const int32_t *residual, int wasted, int len); + #define DECORRELATE_FUNCS(fmt, opt) \ void ff_flac_decorrelate_ls_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ int len, int shift); \ @@ -61,6 +66,7 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int int cpu_flags = av_get_cpu_flags(); if (EXTERNAL_SSE2(cpu_flags)) { + c->wasted32 = ff_flac_wasted_32_sse2; if (fmt == AV_SAMPLE_FMT_S16) { c->decorrelate[1] = ff_flac_decorrelate_ls_16_sse2; c->decorrelate[2] = ff_flac_decorrelate_rs_16_sse2; @@ -93,7 +99,9 @@ av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int } } if (EXTERNAL_SSE4(cpu_flags)) { + c->lpc16 = ff_flac_lpc_16_sse4; c->lpc32 = ff_flac_lpc_32_sse4; + c->wasted33 = ff_flac_wasted_33_sse4; } if (EXTERNAL_AVX(cpu_flags)) { if (fmt == AV_SAMPLE_FMT_S16) { diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvcdsp_init.c b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvcdsp_init.c index 985d750472..4b4a2aa937 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvcdsp_init.c +++ b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvcdsp_init.c @@ -87,6 +87,33 @@ AVG_PROTOTYPES( 8, avx2) AVG_PROTOTYPES(10, avx2) AVG_PROTOTYPES(12, avx2) +#define ALF_BPC_PROTOTYPES(bpc, opt) \ +void BF(ff_vvc_alf_filter_luma, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, \ + const int16_t *filter, const int16_t *clip, ptrdiff_t stride, ptrdiff_t vb_pos, ptrdiff_t pixel_max); \ +void BF(ff_vvc_alf_filter_chroma, bpc, opt)(uint8_t *dst, ptrdiff_t dst_stride, \ + const uint8_t *src, ptrdiff_t src_stride, ptrdiff_t width, ptrdiff_t height, \ + const int16_t *filter, const int16_t *clip, ptrdiff_t stride, ptrdiff_t vb_pos, ptrdiff_t pixel_max); \ +void BF(ff_vvc_alf_classify_grad, bpc, opt)(int *gradient_sum, \ + const uint8_t *src, ptrdiff_t src_stride, intptr_t width, intptr_t height, intptr_t vb_pos); \ +void BF(ff_vvc_alf_classify, bpc, opt)(int *class_idx, int *transpose_idx, const int *gradient_sum, \ + intptr_t width, intptr_t height, intptr_t vb_pos, intptr_t bit_depth); \ + +#define ALF_PROTOTYPES(bpc, bd, opt) \ +void bf(ff_vvc_alf_filter_luma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \ + int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos); \ +void bf(ff_vvc_alf_filter_chroma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \ + int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos); \ +void bf(ff_vvc_alf_classify, bd, opt)(int *class_idx, int *transpose_idx, \ + const uint8_t *src, ptrdiff_t src_stride, int width, int height, int vb_pos, int *gradient_tmp); \ + +ALF_BPC_PROTOTYPES(8, avx2) +ALF_BPC_PROTOTYPES(16, avx2) + +ALF_PROTOTYPES(8, 8, avx2) +ALF_PROTOTYPES(16, 10, avx2) +ALF_PROTOTYPES(16, 12, avx2) + #if ARCH_X86_64 #if HAVE_SSE4_EXTERNAL #define FW_PUT(name, depth, opt) \ @@ -181,6 +208,32 @@ void bf(ff_vvc_w_avg, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, AVG_FUNCS(8, 8, avx2) AVG_FUNCS(16, 10, avx2) AVG_FUNCS(16, 12, avx2) + +#define ALF_FUNCS(bpc, bd, opt) \ +void bf(ff_vvc_alf_filter_luma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \ + int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos) \ +{ \ + const int param_stride = (width >> 2) * ALF_NUM_COEFF_LUMA; \ + BF(ff_vvc_alf_filter_luma, bpc, opt)(dst, dst_stride, src, src_stride, width, height, \ + filter, clip, param_stride, vb_pos, (1 << bd) - 1); \ +} \ +void bf(ff_vvc_alf_filter_chroma, bd, opt)(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, \ + int width, int height, const int16_t *filter, const int16_t *clip, const int vb_pos) \ +{ \ + BF(ff_vvc_alf_filter_chroma, bpc, opt)(dst, dst_stride, src, src_stride, width, height, \ + filter, clip, 0, vb_pos,(1 << bd) - 1); \ +} \ +void bf(ff_vvc_alf_classify, bd, opt)(int *class_idx, int *transpose_idx, \ + const uint8_t *src, ptrdiff_t src_stride, int width, int height, int vb_pos, int *gradient_tmp) \ +{ \ + BF(ff_vvc_alf_classify_grad, bpc, opt)(gradient_tmp, src, src_stride, width, height, vb_pos); \ + BF(ff_vvc_alf_classify, bpc, opt)(class_idx, transpose_idx, gradient_tmp, width, height, vb_pos, bd); \ +} \ + +ALF_FUNCS(8, 8, avx2) +ALF_FUNCS(16, 10, avx2) +ALF_FUNCS(16, 12, avx2) + #endif #define PEL_LINK(dst, C, W, idx1, idx2, name, D, opt) \ @@ -252,6 +305,15 @@ AVG_FUNCS(16, 12, avx2) c->inter.avg = bf(ff_vvc_avg, bd, opt); \ c->inter.w_avg = bf(ff_vvc_w_avg, bd, opt); \ } while (0) + +#define ALF_INIT(bd) do { \ + c->alf.filter[LUMA] = ff_vvc_alf_filter_luma_##bd##_avx2; \ + c->alf.filter[CHROMA] = ff_vvc_alf_filter_chroma_##bd##_avx2; \ + c->alf.classify = ff_vvc_alf_classify_##bd##_avx2; \ +} while (0) + +int ff_vvc_sad_avx2(const int16_t *src0, const int16_t *src1, int dx, int dy, int block_w, int block_h); +#define SAD_INIT() c->inter.sad = ff_vvc_sad_avx2 #endif void ff_vvc_dsp_init_x86(VVCDSPContext *const c, const int bd) @@ -259,45 +321,44 @@ void ff_vvc_dsp_init_x86(VVCDSPContext *const c, const int bd) #if ARCH_X86_64 const int cpu_flags = av_get_cpu_flags(); - if (bd == 8) { + switch (bd) { + case 8: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(8); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(8); + AVG_INIT(8, avx2); MC_LINKS_AVX2(8); + SAD_INIT(); } - } else if (bd == 10) { + break; + case 10: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(10); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(10); + AVG_INIT(10, avx2); MC_LINKS_AVX2(10); MC_LINKS_16BPC_AVX2(10); + SAD_INIT(); } - } else if (bd == 12) { + break; + case 12: if (EXTERNAL_SSE4(cpu_flags)) { MC_LINK_SSE4(12); } if (EXTERNAL_AVX2_FAST(cpu_flags)) { + ALF_INIT(12); + AVG_INIT(12, avx2); MC_LINKS_AVX2(12); MC_LINKS_16BPC_AVX2(12); + SAD_INIT(); } - } - - if (EXTERNAL_AVX2(cpu_flags)) { - switch (bd) { - case 8: - AVG_INIT(8, avx2); - break; - case 10: - AVG_INIT(10, avx2); - break; - case 12: - AVG_INIT(12, avx2); - break; - default: - break; - } + break; + default: + break; } #endif } diff --git a/src/ExtLib/ffmpeg/libavfilter/af_atempo.c b/src/ExtLib/ffmpeg/libavfilter/af_atempo.c index 0c36eb4dd7..3658348c45 100644 --- a/src/ExtLib/ffmpeg/libavfilter/af_atempo.c +++ b/src/ExtLib/ffmpeg/libavfilter/af_atempo.c @@ -244,18 +244,6 @@ static void yae_release_buffers(ATempoContext *atempo) av_tx_uninit(&atempo->complex_to_real); } -/* av_realloc is not aligned enough; fortunately, the data does not need to - * be preserved */ -#define RE_MALLOC_OR_FAIL(field, field_size, element_size) \ - do { \ - av_freep(&field); \ - field = av_calloc(field_size, element_size); \ - if (!field) { \ - yae_release_buffers(atempo); \ - return AVERROR(ENOMEM); \ - } \ - } while (0) - /** * Prepare filter for processing audio data of given format, * sample rate and number of channels. @@ -269,6 +257,7 @@ static int yae_reset(ATempoContext *atempo, uint32_t nlevels = 0; float scale = 1.f, iscale = 1.f; uint32_t pot; + int ret; int i; atempo->format = format; @@ -288,38 +277,51 @@ static int yae_reset(ATempoContext *atempo, nlevels++; } + /* av_realloc is not aligned enough, so simply discard all the old buffers + * (fortunately, their data does not need to be preserved) */ + yae_release_buffers(atempo); + // initialize audio fragment buffers: - RE_MALLOC_OR_FAIL(atempo->frag[0].data, atempo->window, atempo->stride); - RE_MALLOC_OR_FAIL(atempo->frag[1].data, atempo->window, atempo->stride); - RE_MALLOC_OR_FAIL(atempo->frag[0].xdat_in, (atempo->window + 1), sizeof(AVComplexFloat)); - RE_MALLOC_OR_FAIL(atempo->frag[1].xdat_in, (atempo->window + 1), sizeof(AVComplexFloat)); - RE_MALLOC_OR_FAIL(atempo->frag[0].xdat, (atempo->window + 1), sizeof(AVComplexFloat)); - RE_MALLOC_OR_FAIL(atempo->frag[1].xdat, (atempo->window + 1), sizeof(AVComplexFloat)); + if (!(atempo->frag[0].data = av_calloc(atempo->window, atempo->stride)) || + !(atempo->frag[1].data = av_calloc(atempo->window, atempo->stride)) || + !(atempo->frag[0].xdat_in = av_calloc(atempo->window + 1, sizeof(AVComplexFloat))) || + !(atempo->frag[1].xdat_in = av_calloc(atempo->window + 1, sizeof(AVComplexFloat))) || + !(atempo->frag[0].xdat = av_calloc(atempo->window + 1, sizeof(AVComplexFloat))) || + !(atempo->frag[1].xdat = av_calloc(atempo->window + 1, sizeof(AVComplexFloat)))) { + ret = AVERROR(ENOMEM); + goto fail; + } // initialize rDFT contexts: - av_tx_uninit(&atempo->real_to_complex); - av_tx_uninit(&atempo->complex_to_real); + ret = av_tx_init(&atempo->real_to_complex, &atempo->r2c_fn, + AV_TX_FLOAT_RDFT, 0, 1 << (nlevels + 1), &scale, 0); + if (ret < 0) + goto fail; - av_tx_init(&atempo->real_to_complex, &atempo->r2c_fn, AV_TX_FLOAT_RDFT, 0, 1 << (nlevels + 1), &scale, 0); - if (!atempo->real_to_complex) { - yae_release_buffers(atempo); - return AVERROR(ENOMEM); - } + ret = av_tx_init(&atempo->complex_to_real, &atempo->c2r_fn, + AV_TX_FLOAT_RDFT, 1, 1 << (nlevels + 1), &iscale, 0); + if (ret < 0) + goto fail; - av_tx_init(&atempo->complex_to_real, &atempo->c2r_fn, AV_TX_FLOAT_RDFT, 1, 1 << (nlevels + 1), &iscale, 0); - if (!atempo->complex_to_real) { - yae_release_buffers(atempo); - return AVERROR(ENOMEM); + if (!(atempo->correlation_in = av_calloc(atempo->window + 1, sizeof(AVComplexFloat))) || + !(atempo->correlation = av_calloc(atempo->window, sizeof(AVComplexFloat)))) { + ret = AVERROR(ENOMEM); + goto fail; } - RE_MALLOC_OR_FAIL(atempo->correlation_in, (atempo->window + 1), sizeof(AVComplexFloat)); - RE_MALLOC_OR_FAIL(atempo->correlation, atempo->window, sizeof(AVComplexFloat)); - atempo->ring = atempo->window * 3; - RE_MALLOC_OR_FAIL(atempo->buffer, atempo->ring, atempo->stride); + atempo->buffer = av_calloc(atempo->ring, atempo->stride); + if (!atempo->buffer) { + ret = AVERROR(ENOMEM); + goto fail; + } // initialize the Hann window function: - RE_MALLOC_OR_FAIL(atempo->hann, atempo->window, sizeof(float)); + atempo->hann = av_malloc_array(atempo->window, sizeof(float)); + if (!atempo->hann) { + ret = AVERROR(ENOMEM); + goto fail; + } for (i = 0; i < atempo->window; i++) { double t = (double)i / (double)(atempo->window - 1); @@ -327,8 +329,10 @@ static int yae_reset(ATempoContext *atempo, atempo->hann[i] = (float)h; } - yae_clear(atempo); return 0; +fail: + yae_release_buffers(atempo); + return ret; } static int yae_update(AVFilterContext *ctx) @@ -994,20 +998,20 @@ static av_cold void uninit(AVFilterContext *ctx) yae_release_buffers(atempo); } - // WSOLA necessitates an internal sliding window ring buffer - // for incoming audio stream. - // - // Planar sample formats are too cumbersome to store in a ring buffer, - // therefore planar sample formats are not supported. - // - static const enum AVSampleFormat sample_fmts[] = { - AV_SAMPLE_FMT_U8, - AV_SAMPLE_FMT_S16, - AV_SAMPLE_FMT_S32, - AV_SAMPLE_FMT_FLT, - AV_SAMPLE_FMT_DBL, - AV_SAMPLE_FMT_NONE - }; +// WSOLA necessitates an internal sliding window ring buffer +// for incoming audio stream. +// +// Planar sample formats are too cumbersome to store in a ring buffer, +// therefore planar sample formats are not supported. +// +static const enum AVSampleFormat sample_fmts[] = { + AV_SAMPLE_FMT_U8, + AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_S32, + AV_SAMPLE_FMT_FLT, + AV_SAMPLE_FMT_DBL, + AV_SAMPLE_FMT_NONE +}; static int config_props(AVFilterLink *inlink) { diff --git a/src/ExtLib/ffmpeg/libavfilter/avfilter.c b/src/ExtLib/ffmpeg/libavfilter/avfilter.c index 049e4f62ca..2dc8820184 100644 --- a/src/ExtLib/ffmpeg/libavfilter/avfilter.c +++ b/src/ExtLib/ffmpeg/libavfilter/avfilter.c @@ -941,7 +941,7 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) int avfilter_init_str(AVFilterContext *filter, const char *args) { AVDictionary *options = NULL; - AVDictionaryEntry *e; + const AVDictionaryEntry *e; int ret = 0; if (args && *args) { @@ -954,7 +954,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args) if (ret < 0) goto fail; - if ((e = av_dict_get(options, "", NULL, AV_DICT_IGNORE_SUFFIX))) { + if ((e = av_dict_iterate(options, NULL))) { av_log(filter, AV_LOG_ERROR, "No such option: %s.\n", e->key); ret = AVERROR_OPTION_NOT_FOUND; goto fail; diff --git a/src/ExtLib/ffmpeg/libavfilter/version.h b/src/ExtLib/ffmpeg/libavfilter/version.h index 408c700767..d8cd8a2cfb 100644 --- a/src/ExtLib/ffmpeg/libavfilter/version.h +++ b/src/ExtLib/ffmpeg/libavfilter/version.h @@ -32,7 +32,7 @@ #include "version_major.h" #define LIBAVFILTER_VERSION_MINOR 2 -#define LIBAVFILTER_VERSION_MICRO 101 +#define LIBAVFILTER_VERSION_MICRO 102 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/src/ExtLib/ffmpeg/libavutil/channel_layout.c b/src/ExtLib/ffmpeg/libavutil/channel_layout.c index a5b586ecda..77e2be9e28 100644 --- a/src/ExtLib/ffmpeg/libavutil/channel_layout.c +++ b/src/ExtLib/ffmpeg/libavutil/channel_layout.c @@ -473,15 +473,14 @@ static int has_channel_names(const AVChannelLayout *channel_layout) return 0; } -/** - * If the layout is n-th order standard-order ambisonic, with optional - * extra non-diegetic channels at the end, return the order. - * Return a negative error code otherwise. - */ -static int ambisonic_order(const AVChannelLayout *channel_layout) +int av_channel_layout_ambisonic_order(const AVChannelLayout *channel_layout) { int i, highest_ambi, order; + if (channel_layout->order != AV_CHANNEL_ORDER_AMBISONIC && + channel_layout->order != AV_CHANNEL_ORDER_CUSTOM) + return AVERROR(EINVAL); + highest_ambi = -1; if (channel_layout->order == AV_CHANNEL_ORDER_AMBISONIC) highest_ambi = channel_layout->nb_channels - av_popcount64(channel_layout->u.mask) - 1; @@ -536,7 +535,7 @@ static enum AVChannelOrder canonical_order(AVChannelLayout *channel_layout) if (masked_description(channel_layout, 0) > 0) return AV_CHANNEL_ORDER_NATIVE; - order = ambisonic_order(channel_layout); + order = av_channel_layout_ambisonic_order(channel_layout); if (order >= 0 && masked_description(channel_layout, (order + 1) * (order + 1)) >= 0) return AV_CHANNEL_ORDER_AMBISONIC; @@ -551,7 +550,7 @@ static enum AVChannelOrder canonical_order(AVChannelLayout *channel_layout) static int try_describe_ambisonic(AVBPrint *bp, const AVChannelLayout *channel_layout) { int nb_ambi_channels; - int order = ambisonic_order(channel_layout); + int order = av_channel_layout_ambisonic_order(channel_layout); if (order < 0) return order; @@ -945,7 +944,7 @@ int av_channel_layout_retype(AVChannelLayout *channel_layout, enum AVChannelOrde if (channel_layout->order == AV_CHANNEL_ORDER_CUSTOM) { int64_t mask; int nb_channels = channel_layout->nb_channels; - int order = ambisonic_order(channel_layout); + int order = av_channel_layout_ambisonic_order(channel_layout); if (order < 0) return AVERROR(ENOSYS); mask = masked_description(channel_layout, (order + 1) * (order + 1)); diff --git a/src/ExtLib/ffmpeg/libavutil/channel_layout.h b/src/ExtLib/ffmpeg/libavutil/channel_layout.h index 629723531e..d9929f3c03 100644 --- a/src/ExtLib/ffmpeg/libavutil/channel_layout.h +++ b/src/ExtLib/ffmpeg/libavutil/channel_layout.h @@ -679,6 +679,16 @@ int av_channel_layout_check(const AVChannelLayout *channel_layout); */ int av_channel_layout_compare(const AVChannelLayout *chl, const AVChannelLayout *chl1); +/** + * Return the order if the layout is n-th order standard-order ambisonic. + * The presence of optional extra non-diegetic channels at the end is not taken + * into account. + * + * @param channel_layout input channel layout + * @return the order of the layout, a negative error code otherwise. + */ +int av_channel_layout_ambisonic_order(const AVChannelLayout *channel_layout); + /** * The conversion must be lossless. */ diff --git a/src/ExtLib/ffmpeg/libavutil/cpu.c b/src/ExtLib/ffmpeg/libavutil/cpu.c index 85e66ff8e8..d6a6696726 100644 --- a/src/ExtLib/ffmpeg/libavutil/cpu.c +++ b/src/ExtLib/ffmpeg/libavutil/cpu.c @@ -193,6 +193,7 @@ int av_parse_cpu_caps(unsigned *flags, const char *s) { "zba", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_ADDR }, .unit = "flags" }, { "zbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_BASIC }, .unit = "flags" }, { "zvbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RV_ZVBB }, .unit = "flags" }, + { "misaligned", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RV_MISALIGNED }, .unit = "flags" }, #endif { NULL }, }; diff --git a/src/ExtLib/ffmpeg/libavutil/cpu.h b/src/ExtLib/ffmpeg/libavutil/cpu.h index c982b598bf..e4b1efaf86 100644 --- a/src/ExtLib/ffmpeg/libavutil/cpu.h +++ b/src/ExtLib/ffmpeg/libavutil/cpu.h @@ -91,6 +91,7 @@ #define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations #define AV_CPU_FLAG_RVB_ADDR (1 << 8) ///< Address bit-manipulations #define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations +#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses /** * Return the flags which specify extensions supported by the CPU. diff --git a/src/ExtLib/ffmpeg/libavutil/version.h b/src/ExtLib/ffmpeg/libavutil/version.h index 3b5a2e7aaa..9c7146c228 100644 --- a/src/ExtLib/ffmpeg/libavutil/version.h +++ b/src/ExtLib/ffmpeg/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 17 +#define LIBAVUTIL_VERSION_MINOR 20 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ From 36b5227c4ee55d7fe93ea9be638d5c0d1b9963d6 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 26 May 2024 07:40:54 +0300 Subject: [PATCH 04/57] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BD=D0=B5=D0=B4=D0=BE=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D1=8E=D1=89=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20FFm?= =?UTF-8?q?peg=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20commit=20eb01972.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ffmpeg/libavcodec/x86/vvc/vvc_alf.asm | 810 ++++++++++++++++++ .../ffmpeg/libavcodec/x86/vvc/vvc_sad.asm | 133 +++ 2 files changed, 943 insertions(+) create mode 100644 src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm create mode 100644 src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm new file mode 100644 index 0000000000..71e821c27b --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm @@ -0,0 +1,810 @@ +;****************************************************************************** +;* VVC Adaptive Loop Filter SIMD optimizations +;* +;* Copyright (c) 2023-2024 Nuo Mi +;* Copyright (c) 2023-2024 Wu Jianhua +;* +;* This file is part of FFmpeg. +;* +;* FFmpeg is free software; you can redistribute it and/or +;* modify it under the terms of the GNU Lesser General Public +;* License as published by the Free Software Foundation; either +;* version 2.1 of the License, or (at your option) any later version. +;* +;* FFmpeg is distributed in the hope that it will be useful, +;* but WITHOUT ANY WARRANTY; without even the implied warranty of +;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;* Lesser General Public License for more details. +;* +;* You should have received a copy of the GNU Lesser General Public +;* License along with FFmpeg; if not, write to the Free Software +;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +;****************************************************************************** + +%include "libavutil/x86/x86util.asm" + +SECTION_RODATA + +%macro PARAM_SHUFFE 1 +%assign i (%1 * 2) +%assign j ((i + 1) << 8) + (i) +param_shuffe_ %+ %1: +%rep 2 + times 4 dw j + times 4 dw (j + 0x0808) +%endrep +%endmacro + +PARAM_SHUFFE 0 +PARAM_SHUFFE 1 +PARAM_SHUFFE 2 +PARAM_SHUFFE 3 + +CLASSIFY_SHUFFE: times 2 db 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 +TRANSPOSE_PERMUTE: dd 0, 1, 4, 5, 2, 3, 6, 7 +ARG_VAR_SHUFFE: times 2 db 0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4 + +dd448: times 8 dd 512 - 64 +dw64: times 8 dd 64 +dd2: times 8 dd 2 +dw3: times 8 dd 3 +dw5: times 8 dd 5 +dd15: times 8 dd 15 + +SECTION .text + + +%define ALF_NUM_COEFF_LUMA 12 +%define ALF_NUM_COEFF_CHROMA 6 +%define ALF_NUM_COEFF_CC 7 + +;%1-%3 out +;%4 clip or filter +%macro LOAD_LUMA_PARAMS_W16 4 + lea offsetq, [3 * xq] ;xq * ALF_NUM_COEFF_LUMA / ALF_BLOCK_SIZE + movu m%1, [%4q + 2 * offsetq + 0 * 32] ; 2 * for sizeof(int16_t) + movu m%2, [%4q + 2 * offsetq + 1 * 32] + movu m%3, [%4q + 2 * offsetq + 2 * 32] +%endmacro + +%macro LOAD_LUMA_PARAMS_W16 6 + LOAD_LUMA_PARAMS_W16 %1, %2, %3, %4 + ;m%1 = 03 02 01 00 + ;m%2 = 07 06 05 04 + ;m%3 = 11 10 09 08 + + shufpd m%5, m%1, m%2, 0011b ;06 02 05 01 + shufpd m%6, m%3, m%5, 1001b ;06 10 01 09 + + shufpd m%1, m%1, m%6, 1100b ;06 03 09 00 + shufpd m%2, m%2, m%6, 0110b ;10 07 01 04 + shufpd m%3, m%3, m%5, 0110b ;02 11 05 08 + + vpermpd m%1, m%1, 01111000b ;09 06 03 00 + shufpd m%2, m%2, m%2, 1001b ;10 07 04 01 + vpermpd m%3, m%3, 10000111b ;11 08 05 02 +%endmacro + +; %1-%3 out +; %4 clip or filter +; %5-%6 tmp +%macro LOAD_LUMA_PARAMS 6 + LOAD_LUMA_PARAMS_W16 %1, %2, %3, %4, %5, %6 +%endmacro + +%macro LOAD_CHROMA_PARAMS 4 + ; LOAD_CHROMA_PARAMS_W %+ WIDTH %1, %2, %3, %4 + movq xm%1, [%3q] + movd xm%2, [%3q + 8] + vpbroadcastq m%1, xm%1 + vpbroadcastq m%2, xm%2 +%endmacro + +%macro LOAD_PARAMS 0 +%if LUMA + LOAD_LUMA_PARAMS 3, 4, 5, filter, 6, 7 + LOAD_LUMA_PARAMS 6, 7, 8, clip, 9, 10 +%else + LOAD_CHROMA_PARAMS 3, 4, filter, 5 + LOAD_CHROMA_PARAMS 6, 7, clip, 8 +%endif +%endmacro + +; FILTER(param_idx) +; input: m2, m9, m10 +; output: m0, m1 +; tmp: m11-m13 +%macro FILTER 1 + %assign i (%1 % 4) + %assign j (%1 / 4 + 3) + %assign k (%1 / 4 + 6) + %define filters m %+ j + %define clips m %+ k + + pshufb m12, clips, [param_shuffe_ %+ i] ;clip + pxor m11, m11 + psubw m11, m12 ;-clip + + psubw m9, m2 + CLIPW m9, m11, m12 + + psubw m10, m2 + CLIPW m10, m11, m12 + + punpckhwd m13, m9, m10 + punpcklwd m9, m9, m10 + + pshufb m12, filters, [param_shuffe_ %+ i] ;filter + punpcklwd m10, m12, m12 + punpckhwd m12, m12, m12 + + pmaddwd m9, m10 + pmaddwd m12, m13 + + paddd m0, m9 + paddd m1, m12 +%endmacro + +; FILTER(param_idx, bottom, top, byte_offset) +; input: param_idx, bottom, top, byte_offset +; output: m0, m1 +; temp: m9, m10 +%macro FILTER 4 + LOAD_PIXELS m10, [%2 + %4] + LOAD_PIXELS m9, [%3 - %4] + FILTER %1 +%endmacro + +; GET_SRCS(line) +; brief: get source lines +; input: src, src_stride, vb_pos +; output: s1...s6 +%macro GET_SRCS 1 + lea s1q, [srcq + src_strideq] + lea s3q, [s1q + src_strideq] +%if LUMA + lea s5q, [s3q + src_strideq] +%endif + neg src_strideq + lea s2q, [srcq + src_strideq] + lea s4q, [s2q + src_strideq] +%if LUMA + lea s6q, [s4q + src_strideq] +%endif + neg src_strideq + +%if LUMA + cmp vb_posq, 0 + je %%vb_bottom + cmp vb_posq, 4 + jne %%vb_end +%else + cmp vb_posq, 2 + jne %%vb_end + cmp %1, 2 + jge %%vb_bottom +%endif + +%%vb_above: + ; above + ; p1 = (y + i == vb_pos - 1) ? p0 : p1; + ; p2 = (y + i == vb_pos - 1) ? p0 : p2; + ; p3 = (y + i >= vb_pos - 2) ? p1 : p3; + ; p4 = (y + i >= vb_pos - 2) ? p2 : p4; + ; p5 = (y + i >= vb_pos - 3) ? p3 : p5; + ; p6 = (y + i >= vb_pos - 3) ? p4 : p6; + dec vb_posq + cmp vb_posq, %1 + cmove s1q, srcq + cmove s2q, srcq + + dec vb_posq + cmp vb_posq, %1 + cmovbe s3q, s1q + cmovbe s4q, s2q + + dec vb_posq +%if LUMA + cmp vb_posq, %1 + cmovbe s5q, s3q + cmovbe s6q, s4q +%endif + add vb_posq, 3 + jmp %%vb_end + +%%vb_bottom: + ; bottom + ; p1 = (y + i == vb_pos ) ? p0 : p1; + ; p2 = (y + i == vb_pos ) ? p0 : p2; + ; p3 = (y + i <= vb_pos + 1) ? p1 : p3; + ; p4 = (y + i <= vb_pos + 1) ? p2 : p4; + ; p5 = (y + i <= vb_pos + 2) ? p3 : p5; + ; p6 = (y + i <= vb_pos + 2) ? p4 : p6; + cmp vb_posq, %1 + cmove s1q, srcq + cmove s2q, srcq + + inc vb_posq + cmp vb_posq, %1 + cmovae s3q, s1q + cmovae s4q, s2q + + inc vb_posq +%if LUMA + cmp vb_posq, %1 + cmovae s5q, s3q + cmovae s6q, s4q +%endif + sub vb_posq, 2 +%%vb_end: +%endmacro + +; SHIFT_VB(line) +; brief: shift filter result +; input: m0, m1, vb_pos +; output: m0 +; temp: m9 +%macro SHIFT_VB 1 +%define SHIFT 7 +%if LUMA + cmp %1, 3 + je %%near_above + cmp %1, 0 + je %%near_below + jmp %%no_vb + %%near_above: + cmp vb_posq, 4 + je %%near_vb + jmp %%no_vb + %%near_below: + cmp vb_posq, 0 + je %%near_vb +%else + cmp %1, 0 + je %%no_vb + cmp %1, 3 + je %%no_vb + cmp vb_posq, 2 + je %%near_vb +%endif +%%no_vb: + psrad m0, SHIFT + psrad m1, SHIFT + jmp %%shift_end +%%near_vb: + vpbroadcastd m9, [dd448] + paddd m0, m9 + paddd m1, m9 + psrad m0, SHIFT + 3 + psrad m1, SHIFT + 3 +%%shift_end: + packssdw m0, m0, m1 +%endmacro + +; FILTER_VB(line) +; brief: filter pixels for luma and chroma +; input: line +; output: m0, m1 +; temp: s0q...s1q +%macro FILTER_VB 1 + vpbroadcastd m0, [dw64] + vpbroadcastd m1, [dw64] + + GET_SRCS %1 +%if LUMA + FILTER 0, s5q, s6q, 0 * ps + FILTER 1, s3q, s4q, 1 * ps + FILTER 2, s3q, s4q, 0 * ps + FILTER 3, s3q, s4q, -1 * ps + FILTER 4, s1q, s2q, 2 * ps + FILTER 5, s1q, s2q, 1 * ps + FILTER 6, s1q, s2q, 0 * ps + FILTER 7, s1q, s2q, -1 * ps + FILTER 8, s1q, s2q, -2 * ps + FILTER 9, srcq, srcq, 3 * ps + FILTER 10, srcq, srcq, 2 * ps + FILTER 11, srcq, srcq, 1 * ps +%else + FILTER 0, s3q, s4q, 0 * ps + FILTER 1, s1q, s2q, 1 * ps + FILTER 2, s1q, s2q, 0 * ps + FILTER 3, s1q, s2q, -1 * ps + FILTER 4, srcq, srcq, 2 * ps + FILTER 5, srcq, srcq, 1 * ps +%endif + SHIFT_VB %1 +%endmacro + +; LOAD_PIXELS(dest, src) +%macro LOAD_PIXELS 2 +%if ps == 2 + movu %1, %2 +%else + pmovzxbw %1, %2 +%endif +%endmacro + +; STORE_PIXELS(dst, src) +%macro STORE_PIXELS 2 + %if ps == 2 + movu %1, m%2 + %else + packuswb m%2, m%2 + vpermq m%2, m%2, 0x8 + movu %1, xm%2 + %endif +%endmacro + +%macro FILTER_16x4 0 +%if LUMA + push clipq + push strideq + %define s1q clipq + %define s2q strideq +%else + %define s1q s5q + %define s2q s6q +%endif + + %define s3q pixel_maxq + %define s4q offsetq + push xq + + xor xq, xq +%%filter_16x4_loop: + LOAD_PIXELS m2, [srcq] ;p0 + + FILTER_VB xq + + paddw m0, m2 + + ; clip to pixel + CLIPW m0, m14, m15 + + STORE_PIXELS [dstq], 0 + + lea srcq, [srcq + src_strideq] + lea dstq, [dstq + dst_strideq] + inc xq + cmp xq, 4 + jl %%filter_16x4_loop + + mov xq, src_strideq + neg xq + lea srcq, [srcq + xq * 4] + mov xq, dst_strideq + neg xq + lea dstq, [dstq + xq * 4] + + pop xq + +%if LUMA + pop strideq + pop clipq +%endif +%endmacro + +; FILTER(bpc, luma/chroma) +%macro ALF_FILTER 2 +%xdefine BPC %1 +%ifidn %2, luma + %xdefine LUMA 1 +%else + %xdefine LUMA 0 +%endif + +; ****************************** +; void vvc_alf_filter_%2_%1bpc_avx2(uint8_t *dst, ptrdiff_t dst_stride, +; const uint8_t *src, ptrdiff_t src_stride, const ptrdiff_t width, cosnt ptr_diff_t height, +; const int16_t *filter, const int16_t *clip, ptrdiff_t stride, ptrdiff_t vb_pos, ptrdiff_t pixel_max); +; ****************************** +cglobal vvc_alf_filter_%2_%1bpc, 11, 15, 16, 0-0x28, dst, dst_stride, src, src_stride, width, height, filter, clip, stride, vb_pos, pixel_max, \ + offset, x, s5, s6 +%define ps (%1 / 8) ; pixel size + movd xm15, pixel_maxd + vpbroadcastw m15, xm15 + pxor m14, m14 + +.loop: + push srcq + push dstq + xor xd, xd + + .loop_w: + LOAD_PARAMS + FILTER_16x4 + + add srcq, 16 * ps + add dstq, 16 * ps + add xd, 16 + cmp xd, widthd + jl .loop_w + + pop dstq + pop srcq + lea srcq, [srcq + 4 * src_strideq] + lea dstq, [dstq + 4 * dst_strideq] + + lea filterq, [filterq + 2 * strideq] + lea clipq, [clipq + 2 * strideq] + + sub vb_posq, 4 + sub heightq, 4 + jg .loop + RET +%endmacro + +; FILTER(bpc) +%macro ALF_FILTER 1 + ALF_FILTER %1, luma + ALF_FILTER %1, chroma +%endmacro + +%define ALF_GRADIENT_BORDER 2 +%define ALF_BORDER_LUMA 3 + +; ****************************** +; void ff_vvc_alf_classify_grad(int *gradient_sum, const uint8_t *src, +; ptrdiff_t src_stride, intptr_t width, intptr_t height, intptr_t vb_pos); +; ****************************** +%macro ALF_CLASSIFY_GRAD 1 +cglobal vvc_alf_classify_grad_%1bpc, 6, 14, 16, gradient_sum, src, src_stride, width, height, vb_pos, \ + x, y, s0, s1, s2, s3, vb_pos_below, src_stride3 + + lea src_stride3q, [src_strideq * 2 + src_strideq] + + lea vb_pos_belowd, [vb_posd + ALF_GRADIENT_BORDER] + + ; src = src - ALF_BORDER_LUMA * src_stride - ALF_BORDER_LUMA + sub srcq, src_stride3q + sub srcq, ALF_BORDER_LUMA * ps + + add widthd, ALF_GRADIENT_BORDER * 2 + add heightd, ALF_GRADIENT_BORDER * 2 + + xor yd, yd + +.loop_h: + xor xd, xd + pxor m15, m15 ; prev + .loop_w: + lea s0q, [srcq + xq * ps] + lea s1q, [s0q + src_strideq] + lea s2q, [s0q + 2 * src_strideq] + lea s3q, [s0q + src_stride3q] + + cmp yd, vb_pos_belowd + cmove s0q, s1q + + cmp yd, vb_posd + cmove s3q, s2q + + LOAD_PIXELS m0, [s0q] + LOAD_PIXELS m1, [s1q] + LOAD_PIXELS m2, [s2q] + LOAD_PIXELS m3, [s3q] + + LOAD_PIXELS m4, [s0q + 2 * ps] + LOAD_PIXELS m5, [s1q + 2 * ps] + LOAD_PIXELS m6, [s2q + 2 * ps] + LOAD_PIXELS m7, [s3q + 2 * ps] + + pblendw m8, m0, m1, 0xaa ; nw + pblendw m9, m0, m5, 0x55 ; n + pblendw m10, m4, m5, 0xaa ; ne + pblendw m11, m1, m2, 0xaa ; w + pblendw m12, m5, m6, 0xaa ; e + pblendw m13, m2, m3, 0xaa ; sw + pblendw m14, m2, m7, 0x55 ; s + + pblendw m0, m1, m6, 0x55 + paddw m0, m0 ; c + + movu m1, [CLASSIFY_SHUFFE] + pshufb m1, m0, m1 ; d + + paddw m9, m14 ; n + s + psubw m9, m0 ; (n + s) - c + pabsw m9, m9 ; ver + + paddw m11, m12 ; w + e + psubw m11, m1 ; (w + e) - d + pabsw m11, m11 ; hor + + pblendw m14, m6, m7, 0xaa ; se + paddw m8, m14 ; nw + se + psubw m8, m1 ; (nw + se) - d + pabsw m8, m8 ; di0 + + paddw m10, m13 ; ne + sw + psubw m10, m1 ; (nw + se) - d + pabsw m10, m10 ; di1 + + phaddw m9, m11 ; vh, each word represent 2x2 pixels + phaddw m8, m10 ; di, each word represent 2x2 pixels + phaddw m0, m9, m8 ; all = each word represent 4x2 pixels, order is v_h_d0_d1 x 4 + + vinserti128 m15, m15, xm0, 1 + pblendw m1, m0, m15, 0xaa ; t + + phaddw m1, m0 ; each word represent 8x2 pixels, adjacent word share 4x2 pixels + + vextracti128 xm15, m0, 1 ; prev + + movu [gradient_sumq], m1 + + add gradient_sumq, 32 + add xd, 16 + cmp xd, widthd + jl .loop_w + + lea srcq, [srcq + 2 * src_strideq] + add yd, 2 + cmp yd, heightd + jl .loop_h + RET +%endmacro + +; SAVE_CLASSIFY_PARAM_W16(dest, src) +%macro SAVE_CLASSIFY_PARAM_W16 2 + lea tempq, [%1q + xq] + movu [tempq], xm%2 + vperm2i128 m%2, m%2, m%2, 1 + movu [tempq + widthq], xm%2 +%endmacro + +; SAVE_CLASSIFY_PARAM_W8 +%macro SAVE_CLASSIFY_PARAM_W8 2 + movq [%1], xm%2 + vperm2i128 m%2, m%2, m%2, 1 + movq [%1 + widthq], xm%2 +%endmacro + +; SAVE_CLASSIFY_PARAM_W4 +%macro SAVE_CLASSIFY_PARAM_W4 2 + movd [%1], xm%2 + vperm2i128 m%2, m%2, m%2, 1 + movd [%1 + widthq], xm%2 +%endmacro + +; SAVE_CLASSIFY_PARAM_W(dest, src) +%macro SAVE_CLASSIFY_PARAM_W 2 + lea tempq, [%1q + xq] + cmp wd, 8 + jl %%w4 + SAVE_CLASSIFY_PARAM_W8 tempq, %2 + vpermq m%2, m%2, 00010011b + add tempq, 8 + cmp wd, 8 + je %%end +%%w4: + SAVE_CLASSIFY_PARAM_W4 tempq, %2 +%%end: +%endmacro + +%macro ALF_CLASSIFY_H8 0 + ; first line, sum of 16x4 pixels (includes borders) + lea gradq, [gradient_sumq + 2 * xq] + movu m0, [gradq] + movu m1, [gradq + sum_strideq] + movu m2, [gradq + 2 * sum_strideq] + + pcmpeqb m11, m11 + movd xm13, yd + vpbroadcastd m13, xm13 + movd xm12, vb_posd + vpbroadcastd m12, xm12 + pcmpeqd m13, m12 ; y == vb_pos + pandn m13, m11 ; y != vb_pos + + vpbroadcastd m14, [dw3] + pblendvb m14, m14, [dd2], m13 ; ac + + pblendvb m3, m15, [gradq + sum_stride3q], m13 + + ; extent to dword to avoid overflow + punpcklwd m4, m0, m15 + punpckhwd m5, m0, m15 + punpcklwd m6, m1, m15 + punpckhwd m7, m1, m15 + punpcklwd m8, m2, m15 + punpckhwd m9, m2, m15 + punpcklwd m10, m3, m15 + punpckhwd m11, m3, m15 + + paddd m0, m4, m6 + paddd m1, m5, m7 + paddd m2, m8, m10 + paddd m3, m9, m11 + + ; sum of the first row + paddd m0, m2 ; low + paddd m1, m3 ; high + + lea gradq, [gradq + 2 * sum_strideq] + + pblendvb m10, m15, [gradq], m13 + + movu m11, [gradq + sum_strideq] + movu m12, [gradq + 2 * sum_strideq] + movu m13, [gradq + sum_stride3q] + + punpcklwd m4, m10, m15 + punpckhwd m5, m10, m15 + punpcklwd m6, m11, m15 + punpckhwd m7, m11, m15 + punpcklwd m8, m12, m15 + punpckhwd m9, m12, m15 + punpcklwd m10, m13, m15 + punpckhwd m11, m13, m15 + + paddd m2, m4, m6 + paddd m3, m5, m7 + paddd m4, m8, m10 + paddd m5, m9, m11 + + ; sum of the second row + paddd m2, m4 ; low + paddd m3, m5 ; high + + punpckldq m4, m0, m2 + punpckhdq m5, m0, m2 + punpckldq m6, m1, m3 + punpckhdq m7, m1, m3 + + ; each dword represent 4x2 alf blocks + ; the order is 01452367 + punpckldq m0, m4, m6 ; sum_v + punpckhdq m1, m4, m6 ; sum_h + punpckldq m2, m5, m7 ; sum_d0 + punpckhdq m3, m5, m7 ; sum_d1 + + pcmpgtd m4, m0, m1 ; dir_hv - 1 + pmaxsd m5, m0, m1 ; hv1 + pminsd m6, m0, m1 ; hv0 + + paddd m0, m1; ; sum_hv + + pcmpgtd m7, m2, m3 ; dir_d - 1 + pmaxsd m8, m2, m3 ; d1 + pminsd m9, m2, m3 ; d0 + + ; *transpose_idx = dir_d * 2 + dir_hv; + vpbroadcastd m10, [dw3] + paddd m11, m7, m7 + paddd m11, m4 + paddd m10, m11 + vpermq m10, m10, 11011000b + SAVE_CLASSIFY_PARAM transpose_idx, 10 + + psrlq m10, m8, 32 + psrlq m11, m6, 32 + pmuldq m12, m10, m11 ; d1 * hv0 high + psrlq m1, m9, 32 + psrlq m2, m5, 32 + pmuldq m3, m1, m2 ; d0 * hv1 high + pcmpgtq m10, m12, m3 ; dir1 - 1 high + + pmuldq m1, m8, m6 ; d1 * hv0 low + pmuldq m2, m9, m5 ; d0 * hv1 low + pcmpgtq m1, m2 ; dir1 - 1 low + + vpblendd m1, m1, m10, 0xaa ; dir1 - 1 + + pblendvb m2, m5, m8, m1 ; hvd1 + pblendvb m3, m6, m9, m1 ; hvd0 + + movd xm5, bit_depthd + vpbroadcastd m5, xm5 + + ;*class_idx = arg_var[av_clip_uintp2(sum_hv * ac >> (BIT_DEPTH - 1), 4)]; + pmulld m0, m14 ; sum_hv * ac + vpsrlvd m0, m0, m5 + pminsd m0, [dd15] + movu m6, [ARG_VAR_SHUFFE] + pshufb m6, m0 ; class_idx + + vpbroadcastd m10, [dw5] + + ; if (hvd1 * 2 > 9 * hvd0) + ; *class_idx += ((dir1 << 1) + 2) * 5; + ; else if (hvd1 > 2 * hvd0) + ; *class_idx += ((dir1 << 1) + 1) * 5; + paddd m7, m3, m3 + pcmpgtd m7, m2, m7 ; hvd1 > 2 * hvd0 + pand m7, m10 + paddd m6, m7 ; class_idx + + paddd m8, m2, m2 + pslld m9, m3, 3 + paddd m9, m3 + pcmpgtd m8, m9 ; hvd1 * 2 > 9 * hvd0 + pand m8, m10 + paddd m6, m8 ; class_idx + + pandn m1, m7 + paddd m1, m1 ; dir1 << 1 + paddd m6, m1 ; class_idx + vpermq m6, m6, 11011000b + + SAVE_CLASSIFY_PARAM class_idx, 6 +%endmacro + +%macro ALF_CLASSIFY_16x8 0 +%define SAVE_CLASSIFY_PARAM SAVE_CLASSIFY_PARAM_W16 + ALF_CLASSIFY_H8 +%undef SAVE_CLASSIFY_PARAM +%endmacro + +%macro ALF_CLASSIFY_Wx8 0 +%define SAVE_CLASSIFY_PARAM SAVE_CLASSIFY_PARAM_W + ALF_CLASSIFY_H8 +%undef SAVE_CLASSIFY_PARAM +%endmacro + +; ****************************** +;void ff_vvc_alf_classify(int *class_idx, int *transpose_idx, const int *gradient_sum, +; intptr_t width, intptr_t height, intptr_t vb_pos, int *gradient_tmp, intptr_t bit_depth); +; ****************************** +%macro ALF_CLASSIFY 1 +%define ps (%1 / 8) +ALF_CLASSIFY_GRAD %1 +cglobal vvc_alf_classify_%1bpc, 7, 15, 16, class_idx, transpose_idx, gradient_sum, width, height, vb_pos, bit_depth, \ + x, y, grad, sum_stride, sum_stride3, temp, w + + sub bit_depthq, 1 + + ; now we can use gradient to get class idx and transpose idx + lea sum_strideq, [widthd + ALF_GRADIENT_BORDER * 2] + add sum_strideq, 15 + and sum_strideq, ~15 ; align to 16 + add sum_strideq, sum_strideq ; two rows a time + + add gradient_sumq, 8 ; first 4 words are garbage + + lea sum_stride3q, [3 * sum_strideq] + + xor yd, yd + and vb_posd, ~7 ; floor align to 8 + pxor m15, m15 + +.loop_sum_h: + xor xd, xd + .loop_sum_w16: + lea wd, [widthd] + sub wd, xd + cmp wd, 16 + jl .loop_sum_w16_end + + ALF_CLASSIFY_16x8 + + add xd, 16 + jmp .loop_sum_w16 + .loop_sum_w16_end: + + cmp wd, 0 + je .loop_sum_w_end + + ALF_CLASSIFY_Wx8 + +.loop_sum_w_end: + lea gradient_sumq, [gradient_sumq + 4 * sum_strideq] + lea transpose_idxq, [transpose_idxq + 2 * widthq] + lea class_idxq, [class_idxq + 2 * widthq] + + add yd, 8 + cmp yd, heightd + jl .loop_sum_h + + RET +%endmacro + +%if ARCH_X86_64 +%if HAVE_AVX2_EXTERNAL +INIT_YMM avx2 +ALF_FILTER 16 +ALF_FILTER 8 +ALF_CLASSIFY 16 +ALF_CLASSIFY 8 +%endif +%endif diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm new file mode 100644 index 0000000000..b468d89ac2 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm @@ -0,0 +1,133 @@ +; /* +; * Provide SIMD DMVR SAD functions for VVC decoding +; * +; * Copyright (c) 2024 Stone Chen +; * +; * This file is part of FFmpeg. +; * +; * FFmpeg is free software; you can redistribute it and/or +; * modify it under the terms of the GNU Lesser General Public +; * License as published by the Free Software Foundation; either +; * version 2.1 of the License, or (at your option) any later version. +; * +; * FFmpeg is distributed in the hope that it will be useful, +; * but WITHOUT ANY WARRANTY; without even the implied warranty of +; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +; * Lesser General Public License for more details. +; * +; * You should have received a copy of the GNU Lesser General Public +; * License along with FFmpeg; if not, write to the Free Software +; * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +; */ + +%include "libavutil/x86/x86util.asm" +%define MAX_PB_SIZE 128 +%define ROWS 2 + +SECTION_RODATA + +pw_1: times 2 dw 1 + +; DMVR SAD is only calculated on even rows to reduce complexity +SECTION .text + +%macro MIN_MAX_SAD 3 + pminuw %3, %2, %1 + pmaxuw %1, %2, %1 + psubusw %1, %1, %3 +%endmacro + +%macro HORIZ_ADD 3 ; xm0, xm1, m1 + vextracti128 %1, %3, q0001 ; 3 2 1 0 + paddd %1, %2 ; xm0 (7 + 3) (6 + 2) (5 + 1) (4 + 0) + pshufd %2, %1, q0032 ; xm1 - - (7 + 3) (6 + 2) + paddd %1, %1, %2 ; xm0 _ _ (5 1 7 3) (4 0 6 2) + pshufd %2, %1, q0001 ; xm1 _ _ (5 1 7 3) (5 1 7 3) + paddd %1, %1, %2 ; (01234567) +%endmacro + +%if ARCH_X86_64 +%if HAVE_AVX2_EXTERNAL + +INIT_YMM avx2 + +cglobal vvc_sad, 6, 9, 5, src1, src2, dx, dy, block_w, block_h, off1, off2, row_idx + movsxdifnidn dxq, dxd + movsxdifnidn dyq, dyd + + sub dxq, 2 + sub dyq, 2 + + mov off1q, 2 + mov off2q, 2 + + add off1q, dyq + sub off2q, dyq + + shl off1q, 7 + shl off2q, 7 + + add off1q, dxq + sub off2q, dxq + + lea src1q, [src1q + off1q * 2 + 2 * 2] + lea src2q, [src2q + off2q * 2 + 2 * 2] + + pxor m3, m3 + vpbroadcastd m4, [pw_1] + + cmp block_wd, 16 + jge vvc_sad_16_128 + + vvc_sad_8: + .loop_height: + movu xm0, [src1q] + vinserti128 m0, m0, [src1q + MAX_PB_SIZE * ROWS * 2], 1 + movu xm1, [src2q] + vinserti128 m1, m1, [src2q + MAX_PB_SIZE * ROWS * 2], 1 + + MIN_MAX_SAD m1, m0, m2 + pmaddwd m1, m4 + paddd m3, m1 + + add src1q, 2 * MAX_PB_SIZE * ROWS * 2 + add src2q, 2 * MAX_PB_SIZE * ROWS * 2 + + sub block_hd, 4 + jg .loop_height + + HORIZ_ADD xm0, xm3, m3 + movd eax, xm0 + RET + + vvc_sad_16_128: + sar block_wd, 4 + .loop_height: + mov off1q, src1q + mov off2q, src2q + mov row_idxd, block_wd + + .loop_width: + movu m0, [src1q] + movu m1, [src2q] + MIN_MAX_SAD m1, m0, m2 + pmaddwd m1, m4 + paddd m3, m1 + + add src1q, 32 + add src2q, 32 + dec row_idxd + jg .loop_width + + lea src1q, [off1q + ROWS * MAX_PB_SIZE * 2] + lea src2q, [off2q + ROWS * MAX_PB_SIZE * 2] + + sub block_hd, 2 + jg .loop_height + + HORIZ_ADD xm0, xm3, m3 + movd eax, xm0 + RET + +%endif +%endif From 7824eca5366467c276c0e119e119b1633276dc19 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Tue, 28 May 2024 10:42:51 +1000 Subject: [PATCH 05/57] =?UTF-8?q?MPCVideoDec=20-=20workaround=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BF=D1=80=D0=BE=D0=B8=D0=B3=D1=80=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B5=D0=BA=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D1=8B=D1=85=20"=D1=85=D0=B8=D1=82=D1=80=D0=BE"=20?= =?UTF-8?q?=D1=83=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20H264?= =?UTF-8?q?=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D0=BB=D0=B5=D0=B9=D1=81=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=D0=BE=D0=B2=20(ffmpeg=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0=D0=B5=D1=82=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BF=D0=BE=D0=B4=D1=80=D1=8F=D0=B4=20=D0=B8?= =?UTF-8?q?=D0=B4=D1=83=D1=89=D0=B8=D1=85=20=D1=84=D1=80=D0=B5=D0=B9=D0=BC?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=BE=D0=B4=D0=B8=D0=BD=D0=B0=D0=BA=D0=BE=D0=B2?= =?UTF-8?q?=D1=8B=D0=B9=20pts).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/filters/transform/MPCVideoDec/MPCVideoDec.cpp | 8 ++++++-- src/filters/transform/MPCVideoDec/MPCVideoDec.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp index 5f31a1f2cf..7258c9b826 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp @@ -1071,6 +1071,7 @@ CMPCVideoDecFilter::CMPCVideoDecFilter(LPUNKNOWN lpunk, HRESULT* phr) , m_DXVADecoderGUID(GUID_NULL) , m_nActiveCodecs(CODECS_ALL & ~CODEC_H264_MVC) , m_rtAvrTimePerFrame(0) + , m_rtLastStart(INVALID_TIME) , m_rtLastStop(0) , m_rtStartCache(INVALID_TIME) , m_bDXVACompatible(true) @@ -1315,7 +1316,8 @@ REFERENCE_TIME CMPCVideoDecFilter::GetFrameDuration() void CMPCVideoDecFilter::UpdateFrameTime(REFERENCE_TIME& rtStart, REFERENCE_TIME& rtStop) { - if (rtStart == INVALID_TIME) { + auto rtStartInput = rtStart; + if (rtStart == INVALID_TIME || (m_CodecId == AV_CODEC_ID_H264 && rtStart == m_rtLastStart)) { rtStart = m_rtLastStop; rtStop = INVALID_TIME; } @@ -1328,6 +1330,7 @@ void CMPCVideoDecFilter::UpdateFrameTime(REFERENCE_TIME& rtStart, REFERENCE_TIME rtStop = rtStart + (frame_duration / m_dRate); } + m_rtLastStart = rtStartInput; m_rtLastStop = rtStop; } @@ -2465,7 +2468,7 @@ HRESULT CMPCVideoDecFilter::InitDecoder(const CMediaType* pmt) } if (m_CodecId == AV_CODEC_ID_H264) { - // check "Disable DXVA for SD (H.264)" option + // check "Disable DXVA for SD (H.264)" option if (m_nDXVA_SD && std::max(m_nSurfaceWidth, m_nSurfaceHeight) <= 1024 && std::min(m_nSurfaceWidth, m_nSurfaceHeight) <= 576) { break; } @@ -3143,6 +3146,7 @@ HRESULT CMPCVideoDecFilter::NewSegment(REFERENCE_TIME rtStart, REFERENCE_TIME rt m_rtStartCache = INVALID_TIME; + m_rtLastStart = INVALID_TIME; m_rtLastStop = 0; if (m_bReorderBFrame) { diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.h b/src/filters/transform/MPCVideoDec/MPCVideoDec.h index cc26ed05ba..24ff242b78 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDec.h +++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.h @@ -98,7 +98,8 @@ class __declspec(uuid("008BAC12-FBAF-497b-9670-BC6F6FBAE2C4")) int m_nARX, m_nARY; - REFERENCE_TIME m_rtLastStop; // rtStop for last delivered frame + REFERENCE_TIME m_rtLastStart; // rtStart for last delivered frame + REFERENCE_TIME m_rtLastStop; // rtStop for last delivered frame double m_dRate; bool m_bUseFFmpeg; From f71fb3c0ac4a63c32a5642e7c2f2381a92046f39 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Tue, 28 May 2024 10:58:32 +1000 Subject: [PATCH 06/57] =?UTF-8?q?MPCVideoDec=20-=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=BA=D0=B8=20=D0=B2=20=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=BA=D0=B5=20AVMasteringDisplayMetadata.=20?= =?UTF-8?q?=D0=9A=D0=BE=D1=81=D0=BC=D0=B5=D1=82=D0=B8=D0=BA=D0=B0=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transform/MPCVideoDec/MPCVideoDec.cpp | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp index 7258c9b826..6e895f9a26 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp @@ -1358,9 +1358,9 @@ bool CMPCVideoDecFilter::AddFrameSideData(IMediaSample* pSample, AVFrame* pFrame CComPtr pMediaSideData; if (SUCCEEDED(pSample->QueryInterface(&pMediaSideData))) { HRESULT hr = E_FAIL; - if (AVFrameSideData* sd = av_frame_get_side_data(pFrame, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA)) { + if (auto sd = av_frame_get_side_data(pFrame, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA)) { if (sd->size == sizeof(AVMasteringDisplayMetadata)) { - AVMasteringDisplayMetadata* metadata = (AVMasteringDisplayMetadata*)sd->data; + auto metadata = reinterpret_cast(sd->data); MediaSideDataHDR hdr = { 0 }; if (metadata->has_primaries) { @@ -1381,12 +1381,18 @@ bool CMPCVideoDecFilter::AddFrameSideData(IMediaSample* pSample, AVFrame* pFrame hdr.min_display_mastering_luminance = av_q2d(metadata->min_luminance); } - hr = pMediaSideData->SetSideData(IID_MediaSideDataHDR, (const BYTE*)&hdr, sizeof(hdr)); + if (metadata->has_primaries || metadata->has_luminance) { + hr = pMediaSideData->SetSideData(IID_MediaSideDataHDR, + reinterpret_cast(&hdr), + sizeof(hdr)); + } } else { DLog(L"CMPCVideoDecFilter::AddFrameSideData(): Found HDR data of an unexpected size (%zu)", sd->size); } } else if (m_FilterInfo.masterDataHDR) { - hr = pMediaSideData->SetSideData(IID_MediaSideDataHDR, (const BYTE*)m_FilterInfo.masterDataHDR, sizeof(MediaSideDataHDR)); + hr = pMediaSideData->SetSideData(IID_MediaSideDataHDR, + reinterpret_cast(m_FilterInfo.masterDataHDR), + sizeof(MediaSideDataHDR)); SAFE_DELETE(m_FilterInfo.masterDataHDR); } @@ -1397,7 +1403,9 @@ bool CMPCVideoDecFilter::AddFrameSideData(IMediaSample* pSample, AVFrame* pFrame DLog(L"CMPCVideoDecFilter::AddFrameSideData(): Found HDR Light Level data of an unexpected size (%zu)", sd->size); } } else if (m_FilterInfo.HDRContentLightLevel) { - hr = pMediaSideData->SetSideData(IID_MediaSideDataHDRContentLightLevel, (const BYTE*)m_FilterInfo.HDRContentLightLevel, sizeof(MediaSideDataHDRContentLightLevel)); + hr = pMediaSideData->SetSideData(IID_MediaSideDataHDRContentLightLevel, + reinterpret_cast(m_FilterInfo.HDRContentLightLevel), + sizeof(MediaSideDataHDRContentLightLevel)); SAFE_DELETE(m_FilterInfo.HDRContentLightLevel); } @@ -1497,7 +1505,9 @@ bool CMPCVideoDecFilter::AddFrameSideData(IMediaSample* pSample, AVFrame* pFrame #undef RPU_MAP #undef RPU_COLOR - hr = pMediaSideData->SetSideData(IID_MediaSideDataDOVIMetadata, (const BYTE*)&hdr, sizeof(hdr)); + hr = pMediaSideData->SetSideData(IID_MediaSideDataDOVIMetadata, + reinterpret_cast(&hdr), + sizeof(hdr)); } return (hr == S_OK); From c87200f539e4ab977f25610f46aae3fca4baf23d Mon Sep 17 00:00:00 2001 From: v0lt Date: Wed, 29 May 2024 20:07:49 +0300 Subject: [PATCH 07/57] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D0=BC=20=D0=BF=D1=83=D1=82=D1=8C=20=D0=BA=20=D0=B2?= =?UTF-8?q?=D0=BD=D0=B5=D1=88=D0=BD=D0=B5=D0=B9=20=D0=B0=D1=83=D0=B4=D0=B8?= =?UTF-8?q?=D0=BE=D0=B4=D0=BE=D1=80=D0=BE=D0=B6=D0=BA=D0=B8=20=D1=82=D0=BE?= =?UTF-8?q?=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=BF=D1=80=D0=B8=20=D0=B5=D0=B3?= =?UTF-8?q?=D0=BE=20=D0=BD=D0=B0=D0=BB=D0=B8=D1=87=D0=B8=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/PlayerYouTube.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/mplayerc/PlayerYouTube.cpp b/src/apps/mplayerc/PlayerYouTube.cpp index 1484e0d228..5b630c753a 100644 --- a/src/apps/mplayerc/PlayerYouTube.cpp +++ b/src/apps/mplayerc/PlayerYouTube.cpp @@ -1574,7 +1574,9 @@ namespace Youtube } pOFD->fi = final_media_url; - pOFD->auds.emplace_back(final_audio_url); + if (final_audio_url.GetLength()) { + pOFD->auds.emplace_back(final_audio_url); + } return pOFD->fi.Valid(); } From f3be602ea462d8466305af0a533c1ba2aad0bdeb Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 30 May 2024 17:51:56 +0300 Subject: [PATCH 08/57] =?UTF-8?q?=D0=9F=D1=80=D0=B8=20=D1=81=D0=BE=D1=85?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B7=D0=B2=D1=83=D0=BA=D0=B0=20=D1=81=20?= =?UTF-8?q?=D0=AE=D1=82=D1=83=D0=B1=D0=B0=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D1=8F=D0=B5=D0=BC=20=D0=BA=20=D0=B0=D1=83=D0=B4=D0=B8?= =?UTF-8?q?=D0=BE=D1=84=D0=B0=D0=B9=D0=BB=D1=83=20=D0=BE=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=B6=D0=BA=D1=83=20=D1=81=20=D0=BF=D0=BE=D0=BC=D0=BE=D1=89?= =?UTF-8?q?=D1=8C=D1=8E=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20FFmpeg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/MainFrm.cpp | 30 +++++++++++++++++++----------- src/apps/mplayerc/SaveTaskDlg.cpp | 17 +++++++++++++---- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index d7ad0ec6e9..5850ecc55a 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -6054,21 +6054,29 @@ void CMainFrame::OnFileSaveAs() CString ffmpegpath; if (m_youtubeFields.fname.GetLength()) { - saveItems.emplace_back('v', in, GetAltFileName(), ""); - - const auto pFileData = dynamic_cast(m_lastOMD.get()); - if (pFileData) { - if (pFileData->auds.size()) { + if (m_bAudioOnly) { + saveItems.emplace_back('a', in, GetAltFileName(), ""); + if (m_youtubeFields.thumbnailUrl.GetLength() && EndsWithNoCase(m_youtubeFields.thumbnailUrl, L".jpg")) { + saveItems.emplace_back('t', m_youtubeFields.thumbnailUrl, L".jpg", ""); ffmpegpath = GetFullExePath(s.strFFmpegExePath, true); + } + } + else { + saveItems.emplace_back('v', in, GetAltFileName(), ""); - for (const auto& aud : pFileData->auds) { - saveItems.emplace_back('a', aud.GetPath(), aud.GetTitle(), ""); + const auto pFileData = dynamic_cast(m_lastOMD.get()); + if (pFileData) { + if (pFileData->auds.size()) { + for (const auto& aud : pFileData->auds) { + saveItems.emplace_back('a', aud.GetPath(), aud.GetTitle(), ""); + } + ffmpegpath = GetFullExePath(s.strFFmpegExePath, true); } - } - for (const auto& sub : pFileData->subs) { - if (sub.GetPath().Find(L"fmt=vtt") > 0) { - saveItems.emplace_back('s', sub.GetPath(), sub.GetTitle(), sub.GetLang()); + for (const auto& sub : pFileData->subs) { + if (sub.GetPath().Find(L"fmt=vtt") > 0) { + saveItems.emplace_back('s', sub.GetPath(), sub.GetTitle(), sub.GetLang()); + } } } } diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index 28123783ce..32ca3b59dc 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -71,12 +71,17 @@ CSaveTaskDlg::CSaveTaskDlg(const std::list& saveItems, const CString case 'a': m_dstPaths[i] = RenameFileExt(dstPath, (finalext == L".mp4") ? L".audio.m4a" : L".audio.mka"); break; - case 's': + case 's': { CStringW subext = L"." + item.title + L".vtt"; FixFilename(subext); m_dstPaths[i] = RenameFileExt(dstPath, subext); break; } + case 't': { + GetTemporaryFilePath(item.title, m_dstPaths[i]); + break; + } + } } m_hIcon = (HICON)LoadImageW(AfxGetInstanceHandle(), MAKEINTRESOURCEW(IDR_MAINFRAME), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE); @@ -385,10 +390,11 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) const CStringW finalext = finalfile.GetExtension().Mid(1).MakeLower(); const CStringW tmpfile = finalfile + L".tmp"; + CStringW strArgs = L"-y"; CStringW mapping; CStringW metadata; unsigned isub = 0; - CStringW strArgs = L"-y"; + for (unsigned i = 0; i < m_saveItems.size(); ++i) { const auto& item = m_saveItems[i]; @@ -416,10 +422,13 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) if (iSubLangDefault >= 0) { strArgs.AppendFormat(L" -disposition:s:%d default", iSubLangDefault); } - if (finalext == L"mp4") { + if (m_saveItems.back().type == 't') { + strArgs.Append(L" -disposition:v:0 attached_pic"); + } + if (finalext == L"mp4" || finalext == L"m4a") { strArgs.Append(L" -movflags +faststart"); } - strArgs.AppendFormat(LR"( -f %s "%s")", finalext, tmpfile); + strArgs.AppendFormat(LR"( -f %s "%s")", (finalext == L"m4a") ? L"mp4" : finalext, tmpfile); SHELLEXECUTEINFOW execinfo = { sizeof(execinfo) }; execinfo.lpFile = m_ffmpegPath.GetString(); From ef6f93edaabc3e9df444d74f19c8eae508c2031c Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 30 May 2024 18:35:51 +0300 Subject: [PATCH 09/57] =?UTF-8?q?=D0=A3=D1=82=D0=BE=D1=87=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BB=D1=8F=20commit=20f3be602.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/MainFrm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index 5850ecc55a..906d4aa5fe 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -6056,7 +6056,7 @@ void CMainFrame::OnFileSaveAs() if (m_youtubeFields.fname.GetLength()) { if (m_bAudioOnly) { saveItems.emplace_back('a', in, GetAltFileName(), ""); - if (m_youtubeFields.thumbnailUrl.GetLength() && EndsWithNoCase(m_youtubeFields.thumbnailUrl, L".jpg")) { + if (ext == L".m4a" && EndsWithNoCase(m_youtubeFields.thumbnailUrl, L".jpg")) { saveItems.emplace_back('t', m_youtubeFields.thumbnailUrl, L".jpg", ""); ffmpegpath = GetFullExePath(s.strFFmpegExePath, true); } From e4d6f611113e9c76a9b4105000f08ca321249f0a Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 30 May 2024 19:09:24 +0300 Subject: [PATCH 10/57] =?UTF-8?q?=D0=95=D1=81=D0=BB=D0=B8=20"=D0=BE=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=B6=D0=BA=D0=B0"=20=D0=B2=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D1=82=D0=B5=20WebP,=20=D1=82=D0=BE=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B5=D0=BE=D0=B1=D1=80=D0=B0=D0=B7=D1=83=D0=B5=D0=BC=20=D0=B5?= =?UTF-8?q?=D0=B5=20=D0=B2=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=20JPEG?= =?UTF-8?q?=20=D0=B2=D0=BE=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F=20=D1=81=D0=BE?= =?UTF-8?q?=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/MainFrm.cpp | 9 ++++++--- src/apps/mplayerc/SaveTaskDlg.cpp | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index 906d4aa5fe..1aed2417a4 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -6056,9 +6056,12 @@ void CMainFrame::OnFileSaveAs() if (m_youtubeFields.fname.GetLength()) { if (m_bAudioOnly) { saveItems.emplace_back('a', in, GetAltFileName(), ""); - if (ext == L".m4a" && EndsWithNoCase(m_youtubeFields.thumbnailUrl, L".jpg")) { - saveItems.emplace_back('t', m_youtubeFields.thumbnailUrl, L".jpg", ""); - ffmpegpath = GetFullExePath(s.strFFmpegExePath, true); + if (ext == L".m4a") { + auto thumbnail_ext = m_youtubeFields.thumbnailUrl.Mid(m_youtubeFields.thumbnailUrl.ReverseFind('.')).MakeLower(); + if (thumbnail_ext == L".jpg" || thumbnail_ext == L".webp") { + saveItems.emplace_back('t', m_youtubeFields.thumbnailUrl, thumbnail_ext, ""); + ffmpegpath = GetFullExePath(s.strFFmpegExePath, true); + } } } else { diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index 32ca3b59dc..7fec7e05f8 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -423,6 +423,9 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) strArgs.AppendFormat(L" -disposition:s:%d default", iSubLangDefault); } if (m_saveItems.back().type == 't') { + if (EndsWith(m_dstPaths.back(), L".webp")) { + strArgs.Append(L" -c:v:0 mjpeg"); + } strArgs.Append(L" -disposition:v:0 attached_pic"); } if (finalext == L"mp4" || finalext == L"m4a") { From 64bf3d1c2d18a65ec4f62dfe1d045d888d4e895c Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 30 May 2024 21:04:10 +0300 Subject: [PATCH 11/57] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BD=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20"Receiving=20data=20timeout".?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=20=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BD=D0=B0=D0=B4=D0=BE=20/=20There=20is=20no=20need?= =?UTF-8?q?=20to=20translate=20yet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.br.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.by.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.ca.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.cz.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.de.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.el.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.es.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.eu.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.fr.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.he.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.hr.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.hu.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.hy.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.it.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.ja.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.kr.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.nl.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.pl.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.ro.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.ru.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.sc.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.sk.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.sv.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.tc.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.tr.rc | 36 ++++++++++--------- src/apps/mpcresources/mplayerc.ua.rc | 36 ++++++++++--------- src/apps/mpcresources/text/mplayerc.br.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.by.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.ca.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.cz.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.de.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.el.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.es.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.eu.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.fr.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.he.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.hr.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.hu.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.hy.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.it.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.ja.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.kr.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.nl.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.pl.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.ro.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.ru.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.sc.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.sk.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.sv.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.tc.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.tr.rc.txt | 4 ++- src/apps/mpcresources/text/mplayerc.ua.rc.txt | 4 ++- src/apps/mplayerc/AppSettings.cpp | 3 ++ src/apps/mplayerc/AppSettings.h | 5 +++ src/apps/mplayerc/PPagePlayer.cpp | 14 +++++++- src/apps/mplayerc/PPagePlayer.h | 4 ++- src/apps/mplayerc/SettingsDefines.h | 1 + src/apps/mplayerc/mplayerc.rc | 36 ++++++++++--------- 59 files changed, 646 insertions(+), 461 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.br.rc b/src/apps/mpcresources/mplayerc.br.rc index 198b71ecd6..d6cc4d93f8 100644 --- a/src/apps/mpcresources/mplayerc.br.rc +++ b/src/apps/mpcresources/mplayerc.br.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Barra de busca de texto",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Localização das configurações",IDC_STATIC,5,140,115,55 - CONTROL "Registro do Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Perfil de usuário",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Pasta do player",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Histórico",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Localização das configurações",IDC_STATIC,5,136,115,55 + CONTROL "Registro do Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Perfil de usuário",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Pasta do player",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Histórico",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Manter histórico de arquivos abertos",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Outros",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Ícone de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Mostrar OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Mostrar nome do arquivo de mídia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Mostrar tempo de busca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Desativar menu 'Abrir disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Prioridade do processo acima do normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Tempo limite da rede:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "seg",IDC_STATIC,263,227,26,8 + GROUPBOX "Outros",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Ícone de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Mostrar OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Mostrar nome do arquivo de mídia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Mostrar tempo de busca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Desativar menu 'Abrir disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Prioridade do processo acima do normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Tempo limite da rede:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "seg",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.by.rc b/src/apps/mpcresources/mplayerc.by.rc index 55b89b4a2a..72ec140254 100644 --- a/src/apps/mpcresources/mplayerc.by.rc +++ b/src/apps/mpcresources/mplayerc.by.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Гісторыя",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Гісторыя",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Захоўваць гісторыю адчын. файлаў",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Іншае",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Значок у панэлі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Паказаць OSD (патрабуецца перазапуск)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Падвышаны прыярытэт працэсу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Іншае",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Значок у панэлі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Паказаць OSD (патрабуецца перазапуск)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Падвышаны прыярытэт працэсу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ca.rc b/src/apps/mpcresources/mplayerc.ca.rc index f5187660ce..94aaa33652 100644 --- a/src/apps/mpcresources/mplayerc.ca.rc +++ b/src/apps/mpcresources/mplayerc.ca.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Barra del títol",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Barra del títol",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Mantenir l'historial dels arxius oberts",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altres",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Icona a la safata",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Mostrar OSD (requereix reiniciar)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Més prioritat pel procés",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Altres",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Icona a la safata",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Mostrar OSD (requereix reiniciar)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Més prioritat pel procés",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.cz.rc b/src/apps/mpcresources/mplayerc.cz.rc index c05602dae1..2508b61753 100644 --- a/src/apps/mpcresources/mplayerc.cz.rc +++ b/src/apps/mpcresources/mplayerc.cz.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Historie",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Historie",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Ukládat historii otevřených souborů",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostatní",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Ikona v oznamovací oblasti",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Zobrazit OSD (vyžaduje restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Zakázat nabídku Otevřít disk",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Spouštět se zvýšenou prioritou",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Ostatní",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Ikona v oznamovací oblasti",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Zobrazit OSD (vyžaduje restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Zakázat nabídku Otevřít disk",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Spouštět se zvýšenou prioritou",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.de.rc b/src/apps/mpcresources/mplayerc.de.rc index ea40b6b55d..912821d068 100644 --- a/src/apps/mpcresources/mplayerc.de.rc +++ b/src/apps/mpcresources/mplayerc.de.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Suchleiste",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Speicherort der Einstellungen",IDC_STATIC,5,140,115,55 - CONTROL "Windows-Registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Benutzerprofil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Programm-Ordner",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Chronik und Position",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Speicherort der Einstellungen",IDC_STATIC,5,136,115,55 + CONTROL "Windows-Registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Benutzerprofil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Programm-Ordner",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Chronik und Position",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "&Chronik anlegen",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximale Anzahl an Einträgen:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Titel für URL in 'Neueste Chronik' anzeigen",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Weitere Einstellungen",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "&Taskleistensymbol anzeigen",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "OSD anzeigen (Neustart notwendig)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Dateiname (bzw. Titel)",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Netzwerk-Zeitüberschreitung:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "Sek.",IDC_STATIC,263,227,26,8 + GROUPBOX "Weitere Einstellungen",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "&Taskleistensymbol anzeigen",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "OSD anzeigen (Neustart notwendig)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Dateiname (bzw. Titel)",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Netzwerk-Zeitüberschreitung:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "Sek.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.el.rc b/src/apps/mpcresources/mplayerc.el.rc index f8c9a57088..7e3a38d087 100644 --- a/src/apps/mpcresources/mplayerc.el.rc +++ b/src/apps/mpcresources/mplayerc.el.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Κείμενο γραμμής αναζήτησης",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Ιστορικό",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Ιστορικό",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Διατήρηση ιστορικού πρόσφατων αρχείων",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Άλλα",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Εικονίδιο στη γραμμή ειδοποιήσεων",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Εμφάνιση OSD (απαιτείται επανεκκίνηση)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Εμφάνιση του ονόματος αρχείου",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Εμφάνιση χρόνου αναζήτησης",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Απενεργοποίηση του μενού "" Άνοιγμα δίσκου""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Προτεραιότητα διεργασίας πάνω από κανονική",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Χρονικό διάστημα δικτύου:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "δευτ.",IDC_STATIC,263,227,26,8 + GROUPBOX "Άλλα",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Εικονίδιο στη γραμμή ειδοποιήσεων",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Εμφάνιση OSD (απαιτείται επανεκκίνηση)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Εμφάνιση του ονόματος αρχείου",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Εμφάνιση χρόνου αναζήτησης",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Απενεργοποίηση του μενού "" Άνοιγμα δίσκου""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Προτεραιότητα διεργασίας πάνω από κανονική",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Χρονικό διάστημα δικτύου:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "δευτ.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.es.rc b/src/apps/mpcresources/mplayerc.es.rc index c56b1842e9..e0d2e66b50 100644 --- a/src/apps/mpcresources/mplayerc.es.rc +++ b/src/apps/mpcresources/mplayerc.es.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Texto de la barra de búsqueda",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Ubicación de ajustes",IDC_STATIC,5,140,115,55 - CONTROL "Registro de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Perfil de usuario",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Carpeta del reproductor",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Historial",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Ubicación de ajustes",IDC_STATIC,5,136,115,55 + CONTROL "Registro de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Perfil de usuario",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Carpeta del reproductor",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Historial",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Mantener historial de archivos abiertos",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Número máximo de entradas:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Mostrar título para URL en archivos recientes",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Otros",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Icono de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Mostrar OSD (requiere reinicio)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Mostrar nombre de archivo multimedia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Mostrar tiempo de búsqueda",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Deshabilitar menú 'Abrir Disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Mayor prioridad para el proceso",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Tiempo de espera de red:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "seg.",IDC_STATIC,263,227,26,8 + GROUPBOX "Otros",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Icono de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Mostrar OSD (requiere reinicio)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Mostrar nombre de archivo multimedia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Mostrar tiempo de búsqueda",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Deshabilitar menú 'Abrir Disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Mayor prioridad para el proceso",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Tiempo de espera de red:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "seg.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.eu.rc b/src/apps/mpcresources/mplayerc.eu.rc index 808d886642..600e3e35ab 100644 --- a/src/apps/mpcresources/mplayerc.eu.rc +++ b/src/apps/mpcresources/mplayerc.eu.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Historia",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Historia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Heutsi berriki irekitako agirien historiari",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Beste",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Erretilu ikurra",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Erakutsi IGE (beharrezkoa berrabiaratzea)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Erakutsi multimedia agiriaren izena",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Erakutsi bilaketa denbora",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Ezgaitu 'Ireki Diska' menua",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Ekinbide lehentasuna arruntetik gora",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Beste",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Erretilu ikurra",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Erakutsi IGE (beharrezkoa berrabiaratzea)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Erakutsi multimedia agiriaren izena",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Erakutsi bilaketa denbora",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Ezgaitu 'Ireki Diska' menua",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Ekinbide lehentasuna arruntetik gora",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.fr.rc b/src/apps/mpcresources/mplayerc.fr.rc index b10577f250..4f6ef5fed5 100644 --- a/src/apps/mpcresources/mplayerc.fr.rc +++ b/src/apps/mpcresources/mplayerc.fr.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Texte de la barre de recherche",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Emplacement des paramètres",IDC_STATIC,5,140,115,55 - CONTROL "Registre de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Profil Utilisateur",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Dossier du lecteur",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Historique",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Emplacement des paramètres",IDC_STATIC,5,136,115,55 + CONTROL "Registre de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Profil Utilisateur",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Dossier du lecteur",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Historique",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Conserver l'historique des fichiers ouverts",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Nombre maximum d'entrées :",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Afficher le titre de l'URL dans les fichiers récents",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Divers",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Icône dans la barre de notification",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Afficher l'OSD (nécessite un redémarrage)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Afficher le nom du fichier de média",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Afficher le temps de recherche",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Désactiver le menu 'Ouvrir le disque'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Priorité supérieure à la normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Délai d'expiration du réseau :",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Divers",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Icône dans la barre de notification",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Afficher l'OSD (nécessite un redémarrage)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Afficher le nom du fichier de média",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Afficher le temps de recherche",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Désactiver le menu 'Ouvrir le disque'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Priorité supérieure à la normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Délai d'expiration du réseau :",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.he.rc b/src/apps/mpcresources/mplayerc.he.rc index f50113f027..323450765b 100644 --- a/src/apps/mpcresources/mplayerc.he.rc +++ b/src/apps/mpcresources/mplayerc.he.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "היסטוריה",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "היסטוריה",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "שמור היסטורייה של קבצים שנפתחו לאחרונה",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "הגדרות נוספות",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "אייקון ליד השעון",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "תצוגת מידע בוידאו (דורש הפעלה מחדש)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "הנגן מקבל קדימות על פני תהליכים אחרים",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "הגדרות נוספות",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "אייקון ליד השעון",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "תצוגת מידע בוידאו (דורש הפעלה מחדש)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "הנגן מקבל קדימות על פני תהליכים אחרים",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hr.rc b/src/apps/mpcresources/mplayerc.hr.rc index 9b1013e3c7..3ffea840a6 100644 --- a/src/apps/mpcresources/mplayerc.hr.rc +++ b/src/apps/mpcresources/mplayerc.hr.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Tekst trake za potražnju",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Lokacija postavki",IDC_STATIC,5,140,115,55 - CONTROL "Windows registar",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Korisnički profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Mapa programa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Povijest",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Lokacija postavki",IDC_STATIC,5,136,115,55 + CONTROL "Windows registar",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Korisnički profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Mapa programa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Povijest",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Zadrži povijest nedavno otvaranih datoteka",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostalo",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Tray ikona",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Pokaži OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Pokaži ime medijske datoteke",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Pokaži vrijeme pretrage",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Onesposobi izbornik 'Otvori Disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Procesiraj prioritet iznad normalnog",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Mrežna stanka:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sek.",IDC_STATIC,263,227,26,8 + GROUPBOX "Ostalo",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Tray ikona",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Pokaži OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Pokaži ime medijske datoteke",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Pokaži vrijeme pretrage",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Onesposobi izbornik 'Otvori Disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Procesiraj prioritet iznad normalnog",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Mrežna stanka:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sek.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hu.rc b/src/apps/mpcresources/mplayerc.hu.rc index bbca8c9332..2372ba5856 100644 --- a/src/apps/mpcresources/mplayerc.hu.rc +++ b/src/apps/mpcresources/mplayerc.hu.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Keresősáv szövege",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Beállítások helye",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Felhasználói profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Lejátszó mappa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Előzmények",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Beállítások helye",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Felhasználói profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Lejátszó mappa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Előzmények",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Megnyitott fájlok előzményeinek megtartása",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "A bejegyzések maximális száma:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Az URL címének megjelenítése a legutóbbi fájlokban",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Egyéb",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Legyen tálca ikon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "OSD megjelenítése (újraindítást igényel)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Médiafájl nevének megjelenítése",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Keresési idő megjelenítése",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Kikapcsolja az 'Open Disc' menüt",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "A lejátszó prioritása normál érték felett",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Hálózat időtúllépése:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "mp.",IDC_STATIC,263,227,26,8 + GROUPBOX "Egyéb",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Legyen tálca ikon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "OSD megjelenítése (újraindítást igényel)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Médiafájl nevének megjelenítése",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Keresési idő megjelenítése",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Kikapcsolja az 'Open Disc' menüt",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "A lejátszó prioritása normál érték felett",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Hálózat időtúllépése:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "mp.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hy.rc b/src/apps/mpcresources/mplayerc.hy.rc index bfbd10cb01..d027dd3d96 100644 --- a/src/apps/mpcresources/mplayerc.hy.rc +++ b/src/apps/mpcresources/mplayerc.hy.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Պատմությունը",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Պատմությունը",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Պահպանել բացված ֆայլերի պատ-ը",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Այլ",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Պատկերակը առաջադրանքների վահանակ.",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Ցուցադրել OSD-ն (պահ.է վերամեկնարկում)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Անջատել 'Բացել սկավառակը' ընտրացանկը",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Գործողության բարձր առաջնայնություն",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Այլ",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Պատկերակը առաջադրանքների վահանակ.",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Ցուցադրել OSD-ն (պահ.է վերամեկնարկում)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Անջատել 'Բացել սկավառակը' ընտրացանկը",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Գործողության բարձր առաջնայնություն",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.it.rc b/src/apps/mpcresources/mplayerc.it.rc index abd0b12c32..2c57364f83 100644 --- a/src/apps/mpcresources/mplayerc.it.rc +++ b/src/apps/mpcresources/mplayerc.it.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Cerca testo barra",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Posizione delle impostazioni",IDC_STATIC,5,140,115,55 - CONTROL "Registro di Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Profilo utente",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Cartella lettore",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Cronologia",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Posizione delle impostazioni",IDC_STATIC,5,136,115,55 + CONTROL "Registro di Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Profilo utente",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Cartella lettore",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Cronologia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Conserva cronologia file aperti di recente",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Numero massimo di voci:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Visualizza titolo per l'URL nei file recenti",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altro",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Icona nell'area di notifica",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Mostra OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Mostra nome del file multimediale",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Mostra tempo di ricerca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disabilita il menu ""Apri disco""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Priorità del processo superiore al normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Timeout rete:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Altro",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Icona nell'area di notifica",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Mostra OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Mostra nome del file multimediale",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Mostra tempo di ricerca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disabilita il menu ""Apri disco""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Priorità del processo superiore al normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Timeout rete:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ja.rc b/src/apps/mpcresources/mplayerc.ja.rc index 06f2e28001..bbbfd89ee2 100644 --- a/src/apps/mpcresources/mplayerc.ja.rc +++ b/src/apps/mpcresources/mplayerc.ja.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "シーク バーのテキスト",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "設定の保存場所",IDC_STATIC,5,140,115,55 - CONTROL "Windows レジストリ",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "ユーザー プロファイル",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "MPC-BE フォルダー",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "履歴",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "設定の保存場所",IDC_STATIC,5,136,115,55 + CONTROL "Windows レジストリ",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "ユーザー プロファイル",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "MPC-BE フォルダー",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "履歴",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "最近使ったファイルの履歴を保存する",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "最大エントリー数:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "最近使ったファイルの URL のタイトルを表示する",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "その他",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "タスクトレイ アイコン",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "OSD を表示する",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "メディア ファイル名を表示する",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "シーク タイムを表示する",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "「ディスクを開く」のメニューを無効にする",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "プロセスの優先度を 通常以上 にする",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "ネットワーク タイムアウト:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "秒",IDC_STATIC,263,227,26,8 + GROUPBOX "その他",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "タスクトレイ アイコン",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "OSD を表示する",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "メディア ファイル名を表示する",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "シーク タイムを表示する",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "「ディスクを開く」のメニューを無効にする",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "プロセスの優先度を 通常以上 にする",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "ネットワーク タイムアウト:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "秒",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.kr.rc b/src/apps/mpcresources/mplayerc.kr.rc index 71d72baed1..ac37fd929d 100644 --- a/src/apps/mpcresources/mplayerc.kr.rc +++ b/src/apps/mpcresources/mplayerc.kr.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "막대 문구 찾기",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "설정 위치",IDC_STATIC,5,140,115,55 - CONTROL "윈도 레지스트리",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "사용자 프로필",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "재생기 폴더",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "히스토리",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "설정 위치",IDC_STATIC,5,136,115,55 + CONTROL "윈도 레지스트리",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "사용자 프로필",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "재생기 폴더",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "히스토리",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "최근 열람한 파일목록 기억",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "최대 항목 수 :",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "최근 열람한 파일 경로를 제목 표시줄에 표기",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "기타",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "트레이에 아이콘 보이기",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "화면 표시 보이기(다시 시작 필요)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "미디어 파일명 표기",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "탐색 시간 표기",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "'디스크 열기' 메뉴 사용 안 함",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "프로세스 우선순위 높이기",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "네트워크 경과 시간 :",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "초",IDC_STATIC,263,227,26,8 + GROUPBOX "기타",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "트레이에 아이콘 보이기",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "화면 표시 보이기(다시 시작 필요)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "미디어 파일명 표기",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "탐색 시간 표기",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "'디스크 열기' 메뉴 사용 안 함",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "프로세스 우선순위 높이기",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "네트워크 경과 시간 :",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "초",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.nl.rc b/src/apps/mpcresources/mplayerc.nl.rc index fd410e6e37..983d19e736 100644 --- a/src/apps/mpcresources/mplayerc.nl.rc +++ b/src/apps/mpcresources/mplayerc.nl.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Tekst van zoekbalk",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Opslaglocatie van instellingen",IDC_STATIC,5,140,115,55 - CONTROL "Windows-register",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Gebruikersprofiel",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Map mediaspeler",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Geschiedenis",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Opslaglocatie van instellingen",IDC_STATIC,5,136,115,55 + CONTROL "Windows-register",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Gebruikersprofiel",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Map mediaspeler",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Geschiedenis",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Onlangs geopende bestanden onthouden",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum aantal vermeldingen:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Titel voor URL in recente bestanden weergeven",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Overige",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Pictogram in systeemvak",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Toon OSD (vereist herstart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Toon naam van mediabestand",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Toon gezochte tijd",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Menu ""Schijf openen"" uitschakelen",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Procesprioriteit ""hoger dan normaal""",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Netwerk time-out:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Overige",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Pictogram in systeemvak",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Toon OSD (vereist herstart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Toon naam van mediabestand",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Toon gezochte tijd",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Menu ""Schijf openen"" uitschakelen",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Procesprioriteit ""hoger dan normaal""",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Netwerk time-out:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.pl.rc b/src/apps/mpcresources/mplayerc.pl.rc index bde64a298b..0fcfdeb6ed 100644 --- a/src/apps/mpcresources/mplayerc.pl.rc +++ b/src/apps/mpcresources/mplayerc.pl.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Tekst na pasku potępu",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Historia",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Historia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Przechowywanie historii otwieranych plików",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Inne",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Ikona obszaru powiadomień",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Menu ekranowe - OSD (wymagany restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Pokaż nazwę pliku",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Pokaż czas postępu",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Ukrywaj menu „Otwórz płytę”",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Priorytet programu powyżej normalnego",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Limit czasu sieci:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sek.",IDC_STATIC,263,227,26,8 + GROUPBOX "Inne",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Ikona obszaru powiadomień",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Menu ekranowe - OSD (wymagany restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Pokaż nazwę pliku",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Pokaż czas postępu",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Ukrywaj menu „Otwórz płytę”",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Priorytet programu powyżej normalnego",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Limit czasu sieci:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sek.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ro.rc b/src/apps/mpcresources/mplayerc.ro.rc index dc8b592c8c..d83559b8e1 100644 --- a/src/apps/mpcresources/mplayerc.ro.rc +++ b/src/apps/mpcresources/mplayerc.ro.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Caută textul barei",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Locația setărilor",IDC_STATIC,5,140,115,55 - CONTROL "Registru Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Profilul utilizatorului",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Dosarul player-ului",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Istoric",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Locația setărilor",IDC_STATIC,5,136,115,55 + CONTROL "Registru Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Profilul utilizatorului",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Dosarul player-ului",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Istoric",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Ține un istoric al ultimelor fișiere deschise",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Numărul maxim de intrări:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Afișează titlul pentru URL în fișierele recente",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altele",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Pictogramă în zona de notificare",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Arată OSD (necesită repornire player)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Afișează numele în fișierul media",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Afișează timpul de căutare",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Dezactivează meniul ""Deschide Disc""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Prioritatea procesării peste normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Pauză de rețea:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Altele",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Pictogramă în zona de notificare",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Arată OSD (necesită repornire player)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Afișează numele în fișierul media",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Afișează timpul de căutare",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Dezactivează meniul ""Deschide Disc""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Prioritatea procesării peste normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Pauză de rețea:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ru.rc b/src/apps/mpcresources/mplayerc.ru.rc index 566ca50f4a..fd5a209599 100644 --- a/src/apps/mpcresources/mplayerc.ru.rc +++ b/src/apps/mpcresources/mplayerc.ru.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Текст в полосе прокрутки",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Расположение настроек",IDC_STATIC,5,140,115,55 - CONTROL "Реестр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Профиль пользователя",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Папка плеера",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "История / Позиция",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Расположение настроек",IDC_STATIC,5,136,115,55 + CONTROL "Реестр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Профиль пользователя",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Папка плеера",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "История / Позиция",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Сохранять историю открытых файлов",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Максимальное число записей:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Показывать заголовок для URL в последних файлах",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Прочее",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Значок в области уведомлений",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Показать OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Показывать имя файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Тайм-аут соединения:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "сек.",IDC_STATIC,263,227,26,8 + GROUPBOX "Прочее",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Значок в области уведомлений",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Показать OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Показывать имя файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Тайм-аут соединения:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "сек.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sc.rc b/src/apps/mpcresources/mplayerc.sc.rc index 94b4521212..df64e29e75 100644 --- a/src/apps/mpcresources/mplayerc.sc.rc +++ b/src/apps/mpcresources/mplayerc.sc.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "进度栏文字",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "设置文件保存位置",IDC_STATIC,5,140,115,55 - CONTROL "操作系统注册表",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "用户账户文件夹",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "MPC-BE 播放器文件夹",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "历史",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "设置文件保存位置",IDC_STATIC,5,136,115,55 + CONTROL "操作系统注册表",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "用户账户文件夹",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "MPC-BE 播放器文件夹",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "历史",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "保存最近打开文件的历史记录",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "最大条目数:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "在最近的文件中显示链接页面的标题",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "其它",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "托盘图标",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "显示 OSD (需要重新启动播放器)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "显示媒体文件名称",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "显示搜索时间",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "隐藏打开光盘菜单",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "高于普通进程优先级",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "网络超时:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "秒",IDC_STATIC,263,227,26,8 + GROUPBOX "其它",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "托盘图标",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "显示 OSD (需要重新启动播放器)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "显示媒体文件名称",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "显示搜索时间",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "隐藏打开光盘菜单",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "高于普通进程优先级",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "网络超时:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "秒",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sk.rc b/src/apps/mpcresources/mplayerc.sk.rc index 6ac9fe4399..da70e3d37d 100644 --- a/src/apps/mpcresources/mplayerc.sk.rc +++ b/src/apps/mpcresources/mplayerc.sk.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "História",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "História",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Udržiavať históriu otváraných súborov",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostatné",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Ikona v lište nástrojov",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Zobraziť OSD (vyžaduje reštart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Zablokovať menu 'Otvoriť disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Vyššia priorita procesu",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Ostatné",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Ikona v lište nástrojov",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Zobraziť OSD (vyžaduje reštart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Zablokovať menu 'Otvoriť disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Vyššia priorita procesu",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sv.rc b/src/apps/mpcresources/mplayerc.sv.rc index 8228fdd3e6..6a33dbbd91 100644 --- a/src/apps/mpcresources/mplayerc.sv.rc +++ b/src/apps/mpcresources/mplayerc.sv.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "History",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "History",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Behåll historia över nyligen öppnade filer",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Annat",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Visa ikon i systemfältet",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Visa OSD (omstart krävs)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Process prioritet högre än normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Annat",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Visa ikon i systemfältet",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Visa OSD (omstart krävs)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Process prioritet högre än normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.tc.rc b/src/apps/mpcresources/mplayerc.tc.rc index 66c0e5683f..e3be338e86 100644 --- a/src/apps/mpcresources/mplayerc.tc.rc +++ b/src/apps/mpcresources/mplayerc.tc.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "搜尋列文字",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "儲存設定位置",IDC_STATIC,5,140,115,55 - CONTROL "作業系統登錄檔",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "使用者帳戶資料夾",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "播放程式資料夾",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "歷史記錄",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "儲存設定位置",IDC_STATIC,5,136,115,55 + CONTROL "作業系統登錄檔",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "使用者帳戶資料夾",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "播放程式資料夾",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "歷史記錄",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "保留最近開啟檔案的記錄",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "最大項目數量:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "在最近的檔案為網址連結顯示標題",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "其他選項",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "系統列(通知區域)圖示",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "顯示 OSD (需要重新啟動)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "顯示媒體檔案名稱",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "顯示搜尋時間",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "停用「開啟光碟」選單",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "程式優先順序調成標準以上",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "連線逾時:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "秒",IDC_STATIC,263,227,26,8 + GROUPBOX "其他選項",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "系統列(通知區域)圖示",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "顯示 OSD (需要重新啟動)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "顯示媒體檔案名稱",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "顯示搜尋時間",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "停用「開啟光碟」選單",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "程式優先順序調成標準以上",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "連線逾時:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "秒",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.tr.rc b/src/apps/mpcresources/mplayerc.tr.rc index 3c63445363..63e28d633a 100644 --- a/src/apps/mpcresources/mplayerc.tr.rc +++ b/src/apps/mpcresources/mplayerc.tr.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Arama çubuğu metini",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Ayarların saklanacağı konum",IDC_STATIC,5,140,115,55 - CONTROL "Windows kayıt defteri",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Kullanıcı profili",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Oynatıcı klasörü",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Geçmiş",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Ayarların saklanacağı konum",IDC_STATIC,5,136,115,55 + CONTROL "Windows kayıt defteri",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Kullanıcı profili",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Oynatıcı klasörü",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Geçmiş",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Son açılan dosyaları geçmişte sakla",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "En fazla girdi sayısı:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Son dosyalarda URL için başlığı göster",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Diğer",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Bildirim alanı simgesi göster",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "OSD göster",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Dosya adını göster",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Atlama zamanını göster",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disk Açma özelliğini devre dışı bırak",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "İşlem önceliğini normalden yüksek tut",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Ağ zaman aşımı:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sn.",IDC_STATIC,263,227,26,8 + GROUPBOX "Diğer",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Bildirim alanı simgesi göster",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "OSD göster",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Dosya adını göster",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Atlama zamanını göster",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disk Açma özelliğini devre dışı bırak",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "İşlem önceliğini normalden yüksek tut",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Ağ zaman aşımı:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sn.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ua.rc b/src/apps/mpcresources/mplayerc.ua.rc index a3eaee9c06..f0442e02cb 100644 --- a/src/apps/mpcresources/mplayerc.ua.rc +++ b/src/apps/mpcresources/mplayerc.ua.rc @@ -266,11 +266,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Текст у смужці перемотування",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Розташування налаштувань",IDC_STATIC,5,140,115,55 - CONTROL "Реєстр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "Профіль користувача",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Тека плеєра",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "Історія",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Розташування налаштувань",IDC_STATIC,5,136,115,55 + CONTROL "Реєстр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "Профіль користувача",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Тека плеєра",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "Історія",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Зберігати історію відкритих файлів",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Максимальна кількість записів:",IDC_STATIC,129,31,110,8 @@ -286,17 +286,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Показувати заголовок для URL у останніх відкр. файлах",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Інше",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Значок у панелі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Показувати OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Показувати ім'я файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Показувати поточну позиц.\тривалість",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Заборонити меню 'Відкрити диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Підвищений пріоритет процесу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Мережевий тайм-аут:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "сек.",IDC_STATIC,263,227,26,8 + GROUPBOX "Інше",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Значок у панелі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Показувати OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Показувати ім'я файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Показувати поточну позиц.\тривалість",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Заборонити меню 'Відкрити диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Підвищений пріоритет процесу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Мережевий тайм-аут:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "сек.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.br.rc.txt b/src/apps/mpcresources/text/mplayerc.br.rc.txt index 05352350e8..67f0c010a7 100644 --- a/src/apps/mpcresources/text/mplayerc.br.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.br.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausar reprodução do vídeo quando minimizado" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opções abrir" 6 "Forçar único processo" 7 "Usar mesmo processo para todos os arquivos" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Prioridade do processo acima do normal" 40 "Tempo limite da rede:" 43 "seg" +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.by.rc.txt b/src/apps/mpcresources/text/mplayerc.by.rc.txt index ff1d32ee6b..2f27cae657 100644 --- a/src/apps/mpcresources/text/mplayerc.by.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.by.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Адкрываць файлы выкарыст." 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Падвышаны прыярытэт працэсу" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ca.rc.txt b/src/apps/mpcresources/text/mplayerc.ca.rc.txt index 2c79c53bc2..12af375256 100644 --- a/src/apps/mpcresources/text/mplayerc.ca.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ca.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opcions d'apertura" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Més prioritat pel procés" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.cz.rc.txt b/src/apps/mpcresources/text/mplayerc.cz.rc.txt index 83ad43f7c8..69181da084 100644 --- a/src/apps/mpcresources/text/mplayerc.cz.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.cz.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Možnosti otevírání" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Spouštět se zvýšenou prioritou" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mpcresources/text/mplayerc.de.rc.txt index 1ff49491d5..8765397cbc 100644 --- a/src/apps/mpcresources/text/mplayerc.de.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.de.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Videowiedergabe pausieren, wenn minimiert" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Öffnen von Medien" 6 "Einzelnen Prozess des Players erzwingen" 7 "Mediendateien mit dem aktuellen Player öffnen" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "&Prozesspriorität höher als normal" 40 "Netzwerk-Zeitüberschreitung:" 43 "Sek." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.el.rc.txt b/src/apps/mpcresources/text/mplayerc.el.rc.txt index 0aa4dd85fd..5828336a6f 100644 --- a/src/apps/mpcresources/text/mplayerc.el.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.el.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Παύση της αναπαραγωγής βίντεο στην ελαχιστοποίηση" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Επιλογές ανοίγματος" 6 "Εξαναγκασμός μίας διεργασίας" 7 "Χρήση του ίδιου αναπαραγωγού για κάθε αρχείο πολυμέσων" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Προτεραιότητα διεργασίας πάνω από κανονική" 40 "Χρονικό διάστημα δικτύου:" 43 "δευτ." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.es.rc.txt b/src/apps/mpcresources/text/mplayerc.es.rc.txt index 28f4788173..22a22679f5 100644 --- a/src/apps/mpcresources/text/mplayerc.es.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.es.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausar la reproducción de video cuando se minimiza" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opciones de apertura" 6 "Forzar un solo proceso" 7 "Usar el mismo proceso para cada archivo" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Mayor prioridad para el proceso" 40 "Tiempo de espera de red:" 43 "seg." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.eu.rc.txt b/src/apps/mpcresources/text/mplayerc.eu.rc.txt index 08041ee4e6..7d39fd5203 100644 --- a/src/apps/mpcresources/text/mplayerc.eu.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.eu.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausatu bideo irakurketa txikiendutakoan" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Ireki aukerak" 6 "Behartu prozesu bakarra" 7 "Erabili prozesu berdina agiri guztientzat" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Ekinbide lehentasuna arruntetik gora" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.fr.rc.txt b/src/apps/mpcresources/text/mplayerc.fr.rc.txt index efa5991331..87ec78e65a 100644 --- a/src/apps/mpcresources/text/mplayerc.fr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.fr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Mettre en pause la lecture vidéo lorsqu'elle est réduite" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Options d'ouverture" 6 "Forcer un seul processus" 7 "Utiliser le même processus pour chaque fichier" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Priorité supérieure à la normale" 40 "Délai d'expiration du réseau :" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.he.rc.txt b/src/apps/mpcresources/text/mplayerc.he.rc.txt index 4eef4b8017..6825b9e239 100644 --- a/src/apps/mpcresources/text/mplayerc.he.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.he.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "פתח הגדרות" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "הנגן מקבל קדימות על פני תהליכים אחרים" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hr.rc.txt b/src/apps/mpcresources/text/mplayerc.hr.rc.txt index 5d06b43718..7fb5bc799c 100644 --- a/src/apps/mpcresources/text/mplayerc.hr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Zaustavi video pregled pri minimiziranju" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Mogućnosti Otvaranja" 6 "Forsiraj kao jedan proces" 7 "UKoristi isti proces za svaku datoteku" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Procesiraj prioritet iznad normalnog" 40 "Mrežna stanka:" 43 "sek." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hu.rc.txt b/src/apps/mpcresources/text/mplayerc.hu.rc.txt index 8a0d71d45f..7e92fb0100 100644 --- a/src/apps/mpcresources/text/mplayerc.hu.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hu.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Szüneteltesse a videó lejátszását, amikor kis méretben van" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Megnyitási lehetőségek" 6 "Kényszerítsen egyetlen folyamatot" 7 "Használja ugyanazt a folyamatot minden fájlhoz" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "A lejátszó prioritása normál érték felett" 40 "Hálózat időtúllépése:" 43 "mp." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hy.rc.txt b/src/apps/mpcresources/text/mplayerc.hy.rc.txt index 9076bed219..81126538a5 100644 --- a/src/apps/mpcresources/text/mplayerc.hy.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hy.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Բացելու ընտրանքներ" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Գործողության բարձր առաջնայնություն" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.it.rc.txt b/src/apps/mpcresources/text/mplayerc.it.rc.txt index 8ed17c15d2..f81100fd2a 100644 --- a/src/apps/mpcresources/text/mplayerc.it.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.it.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Metti in pausa la riproduzione video quando è ridotto a icona" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opzioni di apertura" 6 "Forza un unico processo" 7 "Usa la stessa procedura per ogni file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Priorità del processo superiore al normale" 40 "Timeout rete:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ja.rc.txt b/src/apps/mpcresources/text/mplayerc.ja.rc.txt index 6e727efc4d..41c6a597e5 100644 --- a/src/apps/mpcresources/text/mplayerc.ja.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ja.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化時にビデオ再生を一時停止させる" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "開くオプション" 6 "複数起動を禁止する" 7 "同じプレーヤーで開く" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "プロセスの優先度を 通常以上 にする" 40 "ネットワーク タイムアウト:" 43 "秒" +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mpcresources/text/mplayerc.kr.rc.txt index 5e11ab72a2..96df447980 100644 --- a/src/apps/mpcresources/text/mplayerc.kr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.kr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "최소화 시, 영상 재생 일시 정지" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "열기 옵션" 6 "프로세스 하나만 사용" 7 "파일을 열 때마다 같은 재생기창 사용" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "프로세스 우선순위 높이기" 40 "네트워크 경과 시간 :" 43 "초" +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.nl.rc.txt b/src/apps/mpcresources/text/mplayerc.nl.rc.txt index 09bcf84060..5f38d03e68 100644 --- a/src/apps/mpcresources/text/mplayerc.nl.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.nl.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Weergave pauseren als het venster geminimaliseerd is" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opties voor openen" 6 "Forceer een enkel proces" 7 "Gebruik hetzelfde proces voor elk bestand" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Procesprioriteit ""hoger dan normaal""" 40 "Netwerk time-out:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.pl.rc.txt b/src/apps/mpcresources/text/mplayerc.pl.rc.txt index 185f1dd891..da855fae74 100644 --- a/src/apps/mpcresources/text/mplayerc.pl.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.pl.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Wstrzymaj odtwarzanie po minimalizacji" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Otwieranie" 6 "Wymuś pojedyńcze okno" 7 "Użyj tego samego okna dla każdego pliku" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Priorytet programu powyżej normalnego" 40 "Limit czasu sieci:" 43 "sek." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.rc.txt b/src/apps/mpcresources/text/mplayerc.rc.txt index 90efa4c966..b75913a326 100644 --- a/src/apps/mpcresources/text/mplayerc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Open options" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Process priority above normal" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ro.rc.txt b/src/apps/mpcresources/text/mplayerc.ro.rc.txt index 24a5c48b8f..8d8fa18421 100644 --- a/src/apps/mpcresources/text/mplayerc.ro.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ro.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Previne redarea videoclipului când este minimizat" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Opțiuni pentru deschidere" 6 "Forțează un singur proces" 7 "Folosește același player pentru fiecare fișier media" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Prioritatea procesării peste normal" 40 "Pauză de rețea:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mpcresources/text/mplayerc.ru.rc.txt index e060179862..dc01122524 100644 --- a/src/apps/mpcresources/text/mplayerc.ru.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ru.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Приостанавливать воспроизведение видео при сворачивании окна" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Открывать файлы, используя" 6 "всегда один процесс" 7 "один и тот же процесс для каждого файла" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Повышенный приоритет процесса" 40 "Тайм-аут соединения:" 43 "сек." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sc.rc.txt b/src/apps/mpcresources/text/mplayerc.sc.rc.txt index 3e115be9ed..5b28abd9b3 100644 --- a/src/apps/mpcresources/text/mplayerc.sc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化时暂停播放" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "打开选项" 6 "只播放一个文件" 7 "为每个媒体文件使用相同的播放器" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "高于普通进程优先级" 40 "网络超时:" 43 "秒" +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sk.rc.txt b/src/apps/mpcresources/text/mplayerc.sk.rc.txt index b45e85fde7..1476380f23 100644 --- a/src/apps/mpcresources/text/mplayerc.sk.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sk.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Otvoriť nastavenia" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Vyššia priorita procesu" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sv.rc.txt b/src/apps/mpcresources/text/mplayerc.sv.rc.txt index 5aa6f9a677..baf6f50dc5 100644 --- a/src/apps/mpcresources/text/mplayerc.sv.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sv.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Öppna valmöjligheter" 6 "Force a single process" 7 "Use same process for every file" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Process prioritet högre än normal" 40 "Network timeout:" 43 "sec." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.tc.rc.txt b/src/apps/mpcresources/text/mplayerc.tc.rc.txt index 642d9c4b17..6138f9be70 100644 --- a/src/apps/mpcresources/text/mplayerc.tc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化時暫停播放" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "開啟選項" 6 "強制單一程式" 7 "所有檔案使用同一處理程序" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "程式優先順序調成標準以上" 40 "連線逾時:" 43 "秒" +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.tr.rc.txt b/src/apps/mpcresources/text/mplayerc.tr.rc.txt index 851baf2530..344e30e811 100644 --- a/src/apps/mpcresources/text/mplayerc.tr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Küçültüldüğünde video oynatmayı duraklat" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "Açılış ayarları" 6 "Tek oynatıcı için zorla" 7 "Her dosya için benzer oynatıcı" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "İşlem önceliğini normalden yüksek tut" 40 "Ağ zaman aşımı:" 43 "sn." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ua.rc.txt b/src/apps/mpcresources/text/mplayerc.ua.rc.txt index f600f6eb9f..5df3505714 100644 --- a/src/apps/mpcresources/text/mplayerc.ua.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ua.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Призупиняти відтворення відео при згортанні вікна" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 5 "При відкритті файлів" 6 "Примусовий одновіконний режим" 7 "Використовувати один процес для усіх файлів" @@ -436,6 +436,8 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 44 39 "Підвищений пріоритет процесу" 40 "Мережевий тайм-аут:" 43 "сек." +44 "Receiving data (TODO):" +47 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mplayerc/AppSettings.cpp b/src/apps/mplayerc/AppSettings.cpp index 74d2b97fab..e142dddc8c 100644 --- a/src/apps/mplayerc/AppSettings.cpp +++ b/src/apps/mplayerc/AppSettings.cpp @@ -627,6 +627,7 @@ void CAppSettings::ResetSettings() iBufferDuration = APP_BUFDURATION_DEF; iNetworkTimeout = APP_NETTIMEOUT_DEF; + iNetworkReceiveTimeout = APP_NETRECEIVETIMEOUT_DEF; bAudioMixer = false; nAudioMixerLayout = SPK_STEREO; @@ -1016,6 +1017,7 @@ void CAppSettings::LoadSettings(bool bForce/* = false*/) profile.ReadInt(IDS_R_SETTINGS, IDS_RS_BUFFERDURATION, iBufferDuration, APP_BUFDURATION_MIN, APP_BUFDURATION_MAX); profile.ReadInt(IDS_R_SETTINGS, IDS_RS_NETWORKTIMEOUT, iNetworkTimeout, APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); + profile.ReadInt(IDS_R_SETTINGS, IDS_RS_NETRECEIVETIMEOUT, iNetworkReceiveTimeout, APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); // Audio profile.ReadInt(IDS_R_AUDIO, IDS_RS_VOLUME, nVolume, 0, 100); @@ -1725,6 +1727,7 @@ void CAppSettings::SaveSettings() profile.WriteInt(IDS_R_SETTINGS, IDS_RS_BUFFERDURATION, iBufferDuration); profile.WriteInt(IDS_R_SETTINGS, IDS_RS_NETWORKTIMEOUT, iNetworkTimeout); + profile.WriteInt(IDS_R_SETTINGS, IDS_RS_NETRECEIVETIMEOUT, iNetworkReceiveTimeout); // Prevent Minimize when in Fullscreen mode on non default monitor profile.WriteBool(IDS_R_SETTINGS, IDS_RS_PREVENT_MINIMIZE, fPreventMinimize); diff --git a/src/apps/mplayerc/AppSettings.h b/src/apps/mplayerc/AppSettings.h index 57f45b175c..c5b9e0dd25 100644 --- a/src/apps/mplayerc/AppSettings.h +++ b/src/apps/mplayerc/AppSettings.h @@ -104,6 +104,10 @@ constexpr auto CLSW_UNRECOGNIZEDSWITCH = (CLSW_DEVICE << 1); #define APP_NETTIMEOUT_DEF 10 #define APP_NETTIMEOUT_MAX 60 +#define APP_NETRECEIVETIMEOUT_MIN 2 +#define APP_NETRECEIVETIMEOUT_DEF 10 +#define APP_NETRECEIVETIMEOUT_MAX 10 + #define APP_AUDIOLEVEL_MAX 10.0 #define APP_AUDIOLEVEL_MIN -10.0 #define APP_AUDIOGAIN_MAX 10.0 @@ -667,6 +671,7 @@ class CAppSettings bool AudioFilters[ADEC_COUNT]; int iBufferDuration; int iNetworkTimeout; + int iNetworkReceiveTimeout; // Audio Switcher bool bAudioMixer; diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index 65645746dc..d2131b34b4 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -71,6 +71,8 @@ void CPPagePlayer::DoDataExchange(CDataExchange* pDX) DDX_Control(pDX, IDC_SPIN1, m_spnRecentFiles); DDX_Control(pDX, IDC_EDIT2, m_edtNetworkTimeout); DDX_Control(pDX, IDC_SPIN2, m_spnNetworkTimeout); + DDX_Control(pDX, IDC_EDIT4, m_edtNetworkReceiveTimeout); + DDX_Control(pDX, IDC_SPIN4, m_spnNetworkReceiveTimeout); } BEGIN_MESSAGE_MAP(CPPagePlayer, CPPageBase) @@ -142,6 +144,16 @@ BOOL CPPagePlayer::OnInitDialog() m_edtNetworkTimeout.SetRange(APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); m_spnNetworkTimeout.SetRange(APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); + m_edtNetworkReceiveTimeout = s.iNetworkTimeout; + m_edtNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); + m_spnNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); + + // TODO + m_edtNetworkReceiveTimeout.ShowWindow(SW_HIDE); + m_spnNetworkReceiveTimeout.ShowWindow(SW_HIDE); + GetDlgItem(IDC_STATIC4)->ShowWindow(SW_HIDE); + GetDlgItem(IDC_STATIC5)->ShowWindow(SW_HIDE); + UpdateData(FALSE); GetDlgItem(IDC_FILE_POS)->EnableWindow(s.bKeepHistory); diff --git a/src/apps/mplayerc/PPagePlayer.h b/src/apps/mplayerc/PPagePlayer.h index 2c1e8f72a7..9861e14bcb 100644 --- a/src/apps/mplayerc/PPagePlayer.h +++ b/src/apps/mplayerc/PPagePlayer.h @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -61,6 +61,8 @@ class CPPagePlayer : public CPPageBase CIntEdit m_edtNetworkTimeout; CSpinButtonCtrl m_spnNetworkTimeout; + CIntEdit m_edtNetworkReceiveTimeout; + CSpinButtonCtrl m_spnNetworkReceiveTimeout; enum { IDD = IDD_PPAGEPLAYER }; diff --git a/src/apps/mplayerc/SettingsDefines.h b/src/apps/mplayerc/SettingsDefines.h index a3f55b97e4..e65d9e8199 100644 --- a/src/apps/mplayerc/SettingsDefines.h +++ b/src/apps/mplayerc/SettingsDefines.h @@ -255,6 +255,7 @@ #define IDS_RS_PANSCANZOOM L"PanScanZoom" #define IDS_RS_BUFFERDURATION L"BufferDuration" #define IDS_RS_NETWORKTIMEOUT L"NetworkTimeout" +#define IDS_RS_NETRECEIVETIMEOUT L"NetworkReceiveTimeout" #define IDS_RS_SUBDELAYINTERVAL L"SubDelayInterval" #define IDS_RS_LOGOFILE L"LogoFile" #define IDS_RS_AUDIOWINDOWMODE L"AudioWindowMode" diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc index 1a74d41f30..3908d8ba33 100644 --- a/src/apps/mplayerc/mplayerc.rc +++ b/src/apps/mplayerc/mplayerc.rc @@ -265,11 +265,11 @@ BEGIN COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,140,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,153,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,166,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,180,106,10 - GROUPBOX "History",IDC_STATIC,124,5,167,133,WS_GROUP + GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + GROUPBOX "History",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Keep history of recently opened files",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 LTEXT "Maximum number of entries:",IDC_STATIC,129,31,110,8 @@ -285,17 +285,21 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Other",IDC_STATIC,124,140,167,101,WS_GROUP - CONTROL "Tray icon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,152,156,9 - CONTROL "Show OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,164,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,176,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,188,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,201,156,9 - CONTROL "Process priority above normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,213,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,227,96,8 - EDITTEXT IDC_EDIT2,230,225,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,225,11,13 - LTEXT "sec.",IDC_STATIC,263,227,26,8 + GROUPBOX "Other",IDC_STATIC,124,136,167,117,WS_GROUP + CONTROL "Tray icon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 + CONTROL "Show OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 + CONTROL "Process priority above normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 + LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 + EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 + LTEXT "sec.",IDC_STATIC,263,223,26,8 + LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 + EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 + LTEXT "sec.",IDC_STATIC5,263,239,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 From d486deed0477bff5e9c2a1334949572960ee4e52 Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 30 May 2024 21:26:09 +0300 Subject: [PATCH 12/57] =?UTF-8?q?MPCVideoDec:=20=D0=94=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=BA=D0=B0=20MEDIASUBTYPE=5Fhvc1,=20=D0=BA=D0=BE?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=8B=D0=B9=20=D0=B2=D1=8B=D0=B4=D0=B0=D0=B5?= =?UTF-8?q?=D1=82=20WM=20ASF=20Reader.=20=D0=A3=D0=B1=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B0=D0=BA=D1=82=D1=83=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20MEDIASUBTYPE=5FHM10.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/moreuuids.h | 4 ++-- .../parser/MatroskaSplitter/MatroskaSplitter.cpp | 13 +------------ src/filters/transform/MPCVideoDec/MPCVideoDec.cpp | 4 ++-- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/include/moreuuids.h b/include/moreuuids.h index 6ecaf9cdb0..193e03a6ae 100644 --- a/include/moreuuids.h +++ b/include/moreuuids.h @@ -265,8 +265,8 @@ DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_HEVC, FCC('HEVC')); // {31435648-0000-0010-8000-00AA00389B71} HVC1 DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_HVC1, FCC('HVC1')); -//{30314D48-0000-0010-8000-00AA00389B71} HEVC HM10.0 -DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_HM10, FCC('HM10')); +// {31637668-0000-0010-8000-00AA00389B71} hvc1 +DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_hvc1, FCC('hvc1')); // RealMedia diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp index f5cb7c4de1..51accf18ec 100644 --- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp +++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -394,17 +394,6 @@ HRESULT CMatroskaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) mts.push_back(mt); - if (mt.subtype == MEDIASUBTYPE_HM10) { - std::vector pData; - if (ReadFirtsBlock(pData, pTE.get())) { - CBaseSplitterFileEx::hevchdr h; - CMediaType mt2; - if (m_pFile->CBaseSplitterFileEx::Read(h, pData, &mt2)) { - mts.insert(mts.cbegin(), mt2); - } - } - } - if (mt.subtype == MEDIASUBTYPE_H264 || mt.subtype == MEDIASUBTYPE_h264) { m_dtsonly = (pTE->CodecPrivate.empty() || pTE->CodecPrivate.data()[0] != 1); } diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp index 6e895f9a26..b25f4fa84c 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp @@ -466,7 +466,7 @@ FFMPEG_CODECS ffCodecs[] = { // HEVC { &MEDIASUBTYPE_HEVC, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, { &MEDIASUBTYPE_HVC1, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, - { &MEDIASUBTYPE_HM10, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, + { &MEDIASUBTYPE_hvc1, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, // Avid DNxHD { &MEDIASUBTYPE_AVdn, AV_CODEC_ID_DNXHD, VDEC_DNXHD, HWCodec_None }, @@ -851,7 +851,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = { // HEVC { &MEDIATYPE_Video, &MEDIASUBTYPE_HEVC }, { &MEDIATYPE_Video, &MEDIASUBTYPE_HVC1 }, - { &MEDIATYPE_Video, &MEDIASUBTYPE_HM10 }, + { &MEDIATYPE_Video, &MEDIASUBTYPE_hvc1 }, // Avid DNxHD { &MEDIATYPE_Video, &MEDIASUBTYPE_AVdn }, From 229a8fc3d7774f63b479791f1d0a29f47c6f7d7b Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Fri, 31 May 2024 09:53:48 +1000 Subject: [PATCH 13/57] =?UTF-8?q?=D0=9F=D0=BE=20=D0=B2=D0=BE=D0=B7=D0=BC?= =?UTF-8?q?=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=D0=B5=D0=B7?= =?UTF-8?q?=D0=B4=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D1=83?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=BE=D0=BF=D1=86=D0=B8=D0=B8=20=D1=81=D0=B5?= =?UTF-8?q?=D1=82=D0=B5=D0=B2=D0=BE=D0=B3=D0=BE=20=D1=82=D0=B0=D0=B9=D0=BC?= =?UTF-8?q?-=D0=B0=D1=83=D1=82=D0=B0=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D0=BD=D0=B5=D0=BA=D1=82=D0=B0=20=D0=B8=20=D1=87=D1=82?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DSUtil/HTTPAsync.h | 4 +++- src/Subtitles/TextFile.cpp | 6 ++--- src/apps/mplayerc/AppSettings.cpp | 4 ++++ src/apps/mplayerc/Content.cpp | 4 ++-- src/apps/mplayerc/MainFrm.cpp | 6 ++--- src/apps/mplayerc/PlayerYouTube.cpp | 10 ++++----- src/apps/mplayerc/SaveTaskDlg.cpp | 2 +- src/apps/mplayerc/UpdateChecker.cpp | 4 ++-- .../parser/BaseSplitter/AsyncReader.cpp | 8 +++---- .../reader/StreamReader/LiveStream.cpp | 22 +++++++++---------- 10 files changed, 38 insertions(+), 32 deletions(-) diff --git a/src/DSUtil/HTTPAsync.h b/src/DSUtil/HTTPAsync.h index 0437f4aea4..ecbf168d7f 100644 --- a/src/DSUtil/HTTPAsync.h +++ b/src/DSUtil/HTTPAsync.h @@ -1,5 +1,5 @@ /* - * (C) 2016-2023 see Authors.txt + * (C) 2016-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -27,6 +27,8 @@ namespace http { inline CStringW userAgent = L"Mozilla/5.0"; + inline DWORD connectTimeout = 10000; + inline DWORD readTimeout = 10000; } class CHTTPAsync diff --git a/src/Subtitles/TextFile.cpp b/src/Subtitles/TextFile.cpp index 8c93ef7589..c808aa6f51 100644 --- a/src/Subtitles/TextFile.cpp +++ b/src/Subtitles/TextFile.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -747,7 +747,7 @@ bool CWebTextFile::Open(LPCWSTR lpszFileName) } CHTTPAsync HTTPAsync; - if (SUCCEEDED(HTTPAsync.Connect(lpszFileName, 5000))) { + if (SUCCEEDED(HTTPAsync.Connect(lpszFileName, http::connectTimeout))) { if (GetTemporaryFilePath(L".tmp", fn)) { CFile temp; if (!temp.Open(fn, modeCreate | modeWrite | typeBinary | shareDenyWrite)) { @@ -768,7 +768,7 @@ bool CWebTextFile::Open(LPCWSTR lpszFileName) DWORD dwSizeRead = 0; DWORD totalSize = 0; do { - if (HTTPAsync.Read(buffer, 1024, dwSizeRead) != S_OK) { + if (HTTPAsync.Read(buffer, 1024, dwSizeRead, http::readTimeout) != S_OK) { break; } temp.Write(buffer, dwSizeRead); diff --git a/src/apps/mplayerc/AppSettings.cpp b/src/apps/mplayerc/AppSettings.cpp index e142dddc8c..3aebbf11ff 100644 --- a/src/apps/mplayerc/AppSettings.cpp +++ b/src/apps/mplayerc/AppSettings.cpp @@ -1018,6 +1018,8 @@ void CAppSettings::LoadSettings(bool bForce/* = false*/) profile.ReadInt(IDS_R_SETTINGS, IDS_RS_BUFFERDURATION, iBufferDuration, APP_BUFDURATION_MIN, APP_BUFDURATION_MAX); profile.ReadInt(IDS_R_SETTINGS, IDS_RS_NETWORKTIMEOUT, iNetworkTimeout, APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); profile.ReadInt(IDS_R_SETTINGS, IDS_RS_NETRECEIVETIMEOUT, iNetworkReceiveTimeout, APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); + http::connectTimeout = iNetworkTimeout * 1000; + http::readTimeout = iNetworkReceiveTimeout * 1000; // Audio profile.ReadInt(IDS_R_AUDIO, IDS_RS_VOLUME, nVolume, 0, 100); @@ -1728,6 +1730,8 @@ void CAppSettings::SaveSettings() profile.WriteInt(IDS_R_SETTINGS, IDS_RS_BUFFERDURATION, iBufferDuration); profile.WriteInt(IDS_R_SETTINGS, IDS_RS_NETWORKTIMEOUT, iNetworkTimeout); profile.WriteInt(IDS_R_SETTINGS, IDS_RS_NETRECEIVETIMEOUT, iNetworkReceiveTimeout); + http::connectTimeout = iNetworkTimeout * 1000; + http::readTimeout = iNetworkReceiveTimeout * 1000; // Prevent Minimize when in Fullscreen mode on non default monitor profile.WriteBool(IDS_R_SETTINGS, IDS_RS_PREVENT_MINIMIZE, fPreventMinimize); diff --git a/src/apps/mplayerc/Content.cpp b/src/apps/mplayerc/Content.cpp index 42027de665..8f9b87b65c 100644 --- a/src/apps/mplayerc/Content.cpp +++ b/src/apps/mplayerc/Content.cpp @@ -126,7 +126,7 @@ namespace Content { content.raw.resize(nMinSize); DWORD dwSizeRead = 0; - if (content.HTTPAsync->Read(content.raw.data(), nMinSize, dwSizeRead) == S_OK) { + if (content.HTTPAsync->Read(content.raw.data(), nMinSize, dwSizeRead, AfxGetAppSettings().iNetworkReceiveTimeout * 1000) == S_OK) { content.raw.resize(dwSizeRead); if (dwSizeRead) { Encoding(content); @@ -176,7 +176,7 @@ namespace Content { nMaxSize -= old_size; content.raw.resize(old_size + nMaxSize); DWORD dwSizeRead = 0; - if (content.HTTPAsync->Read(content.raw.data() + old_size, nMaxSize, dwSizeRead) == S_OK) { + if (content.HTTPAsync->Read(content.raw.data() + old_size, nMaxSize, dwSizeRead, AfxGetAppSettings().iNetworkReceiveTimeout * 1000) == S_OK) { content.raw.resize(old_size + dwSizeRead); if (dwSizeRead) { Encoding(content); diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index 1aed2417a4..ba3251f195 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -19623,19 +19623,19 @@ HRESULT CMainFrame::SetAudioPicture(BOOL show) if (!bLoadRes && !m_youtubeFields.thumbnailUrl.IsEmpty()) { CHTTPAsync HTTPAsync; - if (SUCCEEDED(HTTPAsync.Connect(m_youtubeFields.thumbnailUrl.GetString(), 10000))) { + if (SUCCEEDED(HTTPAsync.Connect(m_youtubeFields.thumbnailUrl.GetString(), http::connectTimeout))) { const auto contentLength = HTTPAsync.GetLenght(); if (contentLength) { m_youtubeThumbnailData.resize(contentLength); DWORD dwSizeRead = 0; - if (S_OK != HTTPAsync.Read((PBYTE)m_youtubeThumbnailData.data(), contentLength, dwSizeRead) || dwSizeRead != contentLength) { + if (S_OK != HTTPAsync.Read((PBYTE)m_youtubeThumbnailData.data(), contentLength, dwSizeRead, http::readTimeout) || dwSizeRead != contentLength) { m_youtubeThumbnailData.clear(); } } else { std::vector tmp(16 * KILOBYTE); for (;;) { DWORD dwSizeRead = 0; - if (S_OK != HTTPAsync.Read((PBYTE)tmp.data(), tmp.size(), dwSizeRead)) { + if (S_OK != HTTPAsync.Read((PBYTE)tmp.data(), tmp.size(), dwSizeRead, http::readTimeout)) { break; } diff --git a/src/apps/mplayerc/PlayerYouTube.cpp b/src/apps/mplayerc/PlayerYouTube.cpp index 5b630c753a..4ebc714322 100644 --- a/src/apps/mplayerc/PlayerYouTube.cpp +++ b/src/apps/mplayerc/PlayerYouTube.cpp @@ -200,21 +200,21 @@ namespace Youtube pData.clear(); CHTTPAsync HTTPAsync; - if (FAILED(HTTPAsync.Connect(url, 10000, header))) { + if (FAILED(HTTPAsync.Connect(url, http::connectTimeout, header))) { return false; } const auto contentLength = HTTPAsync.GetLenght(); if (contentLength) { pData.resize(contentLength); DWORD dwSizeRead = 0; - if (S_OK != HTTPAsync.Read((PBYTE)pData.data(), contentLength, dwSizeRead) || dwSizeRead != contentLength) { + if (S_OK != HTTPAsync.Read((PBYTE)pData.data(), contentLength, dwSizeRead, http::readTimeout) || dwSizeRead != contentLength) { pData.clear(); } } else { static std::vector tmp(16 * KILOBYTE); for (;;) { DWORD dwSizeRead = 0; - if (S_OK != HTTPAsync.Read((PBYTE)tmp.data(), tmp.size(), dwSizeRead)) { + if (S_OK != HTTPAsync.Read((PBYTE)tmp.data(), tmp.size(), dwSizeRead, http::readTimeout)) { break; } @@ -546,7 +546,7 @@ namespace Youtube const auto& url = final_item->url; CHTTPAsync HTTPAsync; - if (FAILED(HTTPAsync.Connect(url, 10000))) { + if (FAILED(HTTPAsync.Connect(url, http::connectTimeout))) { DLog(L"Youtube::Parse_URL() : failed to connect \"%s\", skip", url.GetString()); auto it = std::find_if(youtubeUrllist.cbegin(), youtubeUrllist.cend(), [&url](const YoutubeUrllistItem& item) { return item.url == url; }); @@ -598,7 +598,7 @@ namespace Youtube const auto& url = final_item->url; CHTTPAsync HTTPAsync; - if (FAILED(HTTPAsync.Connect(url, 10000))) { + if (FAILED(HTTPAsync.Connect(url, http::connectTimeout))) { DLog(L"Youtube::Parse_URL() : failed to connect \"%s\", skip", url.GetString()); auto it = std::find_if(youtubeAudioUrllist.cbegin(), youtubeAudioUrllist.cend(), [&url](const YoutubeUrllistItem& item) { return item.url == url; }); diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index 7fec7e05f8..5dbc78c1d1 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -492,7 +492,7 @@ HRESULT CSaveTaskDlg::DownloadHTTP(CStringW url, const CStringW filepath) while (!m_bAbort) { DWORD dwSizeRead = 0; - hr = httpAsync.Read(pBuffer.data(), bufLen, dwSizeRead); + hr = httpAsync.Read(pBuffer.data(), bufLen, dwSizeRead, http::readTimeout); if (hr != S_OK) { break; } diff --git a/src/apps/mplayerc/UpdateChecker.cpp b/src/apps/mplayerc/UpdateChecker.cpp index 0c390d802b..4cea88a2ed 100644 --- a/src/apps/mplayerc/UpdateChecker.cpp +++ b/src/apps/mplayerc/UpdateChecker.cpp @@ -52,12 +52,12 @@ Update_Status UpdateChecker::CheckNewVersion() Update_Status updatestatus = UPDATER_ERROR_CONNECT; CHTTPAsync HTTPAsync; - if (SUCCEEDED(HTTPAsync.Connect(L"https://api.github.com/repos/Aleksoid1978/MPC-BE/releases/latest", 3000))) { + if (SUCCEEDED(HTTPAsync.Connect(L"https://api.github.com/repos/Aleksoid1978/MPC-BE/releases/latest", http::connectTimeout))) { constexpr auto sizeRead = 16 * KILOBYTE; CStringA data; DWORD dwSizeRead = 0; int dataSize = 0; - while (S_OK == HTTPAsync.Read(reinterpret_cast(data.GetBuffer(dataSize + sizeRead) + dataSize), sizeRead, dwSizeRead)) { + while (S_OK == HTTPAsync.Read(reinterpret_cast(data.GetBuffer(dataSize + sizeRead) + dataSize), sizeRead, dwSizeRead, http::readTimeout)) { data.ReleaseBuffer(dataSize + dwSizeRead); dataSize = data.GetLength(); dwSizeRead = 0; diff --git a/src/filters/parser/BaseSplitter/AsyncReader.cpp b/src/filters/parser/BaseSplitter/AsyncReader.cpp index 265379ab5f..e4608f1f3d 100644 --- a/src/filters/parser/BaseSplitter/AsyncReader.cpp +++ b/src/filters/parser/BaseSplitter/AsyncReader.cpp @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2023 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -61,7 +61,7 @@ BOOL CAsyncFileReader::Open(LPCWSTR lpszFileName) CUrlParser urlParser; if (m_bSupportURL && urlParser.Parse(lpszFileName) - && m_HTTPAsync.Connect(lpszFileName, 10000) == S_OK) { + && m_HTTPAsync.Connect(lpszFileName, http::connectTimeout) == S_OK) { const UINT64 ContentLength = m_HTTPAsync.GetLenght(); if (ContentLength == 0) { return FALSE; @@ -112,7 +112,7 @@ STDMETHODIMP CAsyncFileReader::SyncRead(LONGLONG llPosition, LONG lLength, BYTE* const DWORD lenght = llPosition - m_pos; DWORD dwSizeRead = 0; - HRESULT hr = m_HTTPAsync.Read(pBufferTmp.data(), lenght, dwSizeRead); + HRESULT hr = m_HTTPAsync.Read(pBufferTmp.data(), lenght, dwSizeRead, http::readTimeout); if (hr != S_OK || dwSizeRead != lenght) { if (RetryOnError()) { continue; @@ -133,7 +133,7 @@ STDMETHODIMP CAsyncFileReader::SyncRead(LONGLONG llPosition, LONG lLength, BYTE* } DWORD dwSizeRead = 0; - HRESULT hr = m_HTTPAsync.Read(pBuffer, lLength, dwSizeRead); + HRESULT hr = m_HTTPAsync.Read(pBuffer, lLength, dwSizeRead, http::readTimeout); if (hr != S_OK || dwSizeRead != lLength) { if (RetryOnError()) { continue; diff --git a/src/filters/reader/StreamReader/LiveStream.cpp b/src/filters/reader/StreamReader/LiveStream.cpp index afcc5e9656..fb1e82e754 100644 --- a/src/filters/reader/StreamReader/LiveStream.cpp +++ b/src/filters/reader/StreamReader/LiveStream.cpp @@ -115,8 +115,8 @@ HRESULT CLiveStream::HTTPRead(PBYTE pBuffer, DWORD dwSizeToRead, DWORD& dwSizeRe ZeroMemory(buff, sizeof(buff)); DWORD _dwSizeRead = 0; - if (S_OK == m_HTTPAsync.Read(&b, 1, _dwSizeRead) && _dwSizeRead == 1 && b) { - if (S_OK == m_HTTPAsync.Read(buff, b * 16, _dwSizeRead) && _dwSizeRead == b * 16) { + if (S_OK == m_HTTPAsync.Read(&b, 1, _dwSizeRead, dwTimeOut) && _dwSizeRead == 1 && b) { + if (S_OK == m_HTTPAsync.Read(buff, b * 16, _dwSizeRead, dwTimeOut) && _dwSizeRead == b * 16) { int len = decode_html_entities_utf8((char*)buff, nullptr); CString str = UTF8orLocalToWStr((LPCSTR)buff); @@ -334,10 +334,10 @@ bool CLiveStream::ParseM3U8(const CString& url, CString& realUrl) uri.Trim(L'"'); uri = CombinePath(base, uri); CHTTPAsync http; - if (SUCCEEDED(http.Connect(uri))) { + if (SUCCEEDED(http.Connect(uri, http::connectTimeout))) { BYTE key[CAESDecryptor::AESBLOCKSIZE] = {}; DWORD dwSizeRead = 0; - if (SUCCEEDED(http.Read(key, CAESDecryptor::AESBLOCKSIZE, dwSizeRead)) && dwSizeRead == CAESDecryptor::AESBLOCKSIZE) { + if (SUCCEEDED(http.Read(key, CAESDecryptor::AESBLOCKSIZE, dwSizeRead, http::readTimeout)) && dwSizeRead == CAESDecryptor::AESBLOCKSIZE) { std::vector pIV; iv.Delete(0, 2); if (iv.GetLength() != (CAESDecryptor::AESBLOCKSIZE * 2)) { @@ -475,7 +475,7 @@ bool CLiveStream::ParseM3U8(const CString& url, CString& realUrl) bool CLiveStream::OpenHLSSegment() { if (!m_hlsData.Segments.empty()) { - auto hr = m_HTTPAsync.Connect(m_hlsData.Segments.front()); + auto hr = m_HTTPAsync.Connect(m_hlsData.Segments.front(), http::connectTimeout); m_hlsData.Segments.pop_front(); if (SUCCEEDED(hr)) { m_hlsData.SegmentSize = m_HTTPAsync.GetLenght(); @@ -585,7 +585,7 @@ bool CLiveStream::Load(const WCHAR* fnw) } } else if (str_protocol == L"http" || str_protocol == L"https") { m_protocol = protocol::PR_HTTP; - HRESULT hr = m_HTTPAsync.Connect(m_url_str, 10000, L"Icy-MetaData:1\r\n"); + HRESULT hr = m_HTTPAsync.Connect(m_url_str, http::connectTimeout, L"Icy-MetaData:1\r\n"); if (FAILED(hr)) { return false; } @@ -635,7 +635,7 @@ bool CLiveStream::Load(const WCHAR* fnw) || contentType.IsEmpty()) { BYTE buf[1024] = {}; DWORD dwSizeRead = 0; - if (HTTPRead(buf, sizeof(buf), dwSizeRead) == S_OK && dwSizeRead) { + if (HTTPRead(buf, sizeof(buf), dwSizeRead, http::readTimeout) == S_OK && dwSizeRead) { GetType(buf, dwSizeRead, m_subtype); Append(buf, dwSizeRead); } @@ -672,7 +672,7 @@ bool CLiveStream::Load(const WCHAR* fnw) } else { BYTE body[8] = {}; DWORD dwSizeRead = 0; - if (m_HTTPAsync.Read(body, 7, dwSizeRead) == S_OK) { + if (m_HTTPAsync.Read(body, 7, dwSizeRead, http::readTimeout) == S_OK) { if (memcmp(body, "#EXTM3U", 7) == 0) { ret = ParseM3U8(m_url_str, m_hlsData.PlaylistUrl); } @@ -716,7 +716,7 @@ bool CLiveStream::Load(const WCHAR* fnw) if (m_protocol == protocol::PR_HTTP && !m_len) { BYTE buf[1024] = {}; DWORD dwSizeRead = 0; - if (HTTPRead(buf, sizeof(buf), dwSizeRead) == S_OK && dwSizeRead) { + if (HTTPRead(buf, sizeof(buf), dwSizeRead, http::readTimeout) == S_OK && dwSizeRead) { Append(buf, dwSizeRead); } } @@ -975,7 +975,7 @@ DWORD CLiveStream::ThreadProc() } } else if (m_protocol == protocol::PR_HTTP) { DWORD dwSizeRead = 0; - const HRESULT hr = HTTPRead(&buff[buffsize], MAXBUFSIZE, dwSizeRead); + const HRESULT hr = HTTPRead(&buff[buffsize], MAXBUFSIZE, dwSizeRead, http::readTimeout); if (FAILED(hr)) { attempts += 50; continue; @@ -1034,7 +1034,7 @@ DWORD CLiveStream::ThreadProc() DWORD dwSizeRead = 0; auto ptr = m_hlsData.bAes128 ? encryptedBuff.get() : &buff[buffsize]; - if (FAILED(m_HTTPAsync.Read(ptr, MAXBUFSIZE, dwSizeRead))) { + if (FAILED(m_HTTPAsync.Read(ptr, MAXBUFSIZE, dwSizeRead, http::readTimeout))) { bEndOfStream = TRUE; break; } else if (dwSizeRead == 0) { From e0b139350d9104bbaa0444347fcd10f660e3c2a6 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Fri, 31 May 2024 09:58:44 +1000 Subject: [PATCH 14/57] =?UTF-8?q?=D0=92=D0=B5=D1=80=D0=BD=D1=83=D0=BB=20?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D1=82=D0=BD=D0=BE=20MEDIASUBTYPE=5FHM1?= =?UTF-8?q?0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/moreuuids.h | 3 +++ .../parser/MatroskaSplitter/MatroskaSplitter.cpp | 11 +++++++++++ src/filters/transform/MPCVideoDec/MPCVideoDec.cpp | 2 ++ 3 files changed, 16 insertions(+) diff --git a/include/moreuuids.h b/include/moreuuids.h index 193e03a6ae..95eb29bebb 100644 --- a/include/moreuuids.h +++ b/include/moreuuids.h @@ -268,6 +268,9 @@ DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_HVC1, FCC('HVC1')); // {31637668-0000-0010-8000-00AA00389B71} hvc1 DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_hvc1, FCC('hvc1')); +// {30314D48-0000-0010-8000-00AA00389B71} HEVC HM10.0 +DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_HM10, FCC('HM10')); + // RealMedia diff --git a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp index 51accf18ec..830d0ff49e 100644 --- a/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp +++ b/src/filters/parser/MatroskaSplitter/MatroskaSplitter.cpp @@ -394,6 +394,17 @@ HRESULT CMatroskaSplitterFilter::CreateOutputs(IAsyncReader* pAsyncReader) mts.push_back(mt); + if (mt.subtype == MEDIASUBTYPE_HM10) { + std::vector pData; + if (ReadFirtsBlock(pData, pTE.get())) { + CBaseSplitterFileEx::hevchdr h; + CMediaType mt2; + if (m_pFile->CBaseSplitterFileEx::Read(h, pData, &mt2)) { + mts.insert(mts.cbegin(), mt2); + } + } + } + if (mt.subtype == MEDIASUBTYPE_H264 || mt.subtype == MEDIASUBTYPE_h264) { m_dtsonly = (pTE->CodecPrivate.empty() || pTE->CodecPrivate.data()[0] != 1); } diff --git a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp index b25f4fa84c..f58a0c822b 100644 --- a/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp +++ b/src/filters/transform/MPCVideoDec/MPCVideoDec.cpp @@ -467,6 +467,7 @@ FFMPEG_CODECS ffCodecs[] = { { &MEDIASUBTYPE_HEVC, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, { &MEDIASUBTYPE_HVC1, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, { &MEDIASUBTYPE_hvc1, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, + { &MEDIASUBTYPE_HM10, AV_CODEC_ID_HEVC, VDEC_HEVC, HWCodec_HEVC }, // Avid DNxHD { &MEDIASUBTYPE_AVdn, AV_CODEC_ID_DNXHD, VDEC_DNXHD, HWCodec_None }, @@ -852,6 +853,7 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesIn[] = { { &MEDIATYPE_Video, &MEDIASUBTYPE_HEVC }, { &MEDIATYPE_Video, &MEDIASUBTYPE_HVC1 }, { &MEDIATYPE_Video, &MEDIASUBTYPE_hvc1 }, + { &MEDIATYPE_Video, &MEDIASUBTYPE_HM10 }, // Avid DNxHD { &MEDIATYPE_Video, &MEDIASUBTYPE_AVdn }, From 49b079948a121602377ef013f05bf7379cbcd2d1 Mon Sep 17 00:00:00 2001 From: v0lt Date: Fri, 31 May 2024 17:44:12 +0300 Subject: [PATCH 15/57] =?UTF-8?q?=D0=94=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=BA=D0=B0=20=D0=BE=D1=84=D0=BE=D1=80=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=20"Network=20timeouts".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.br.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.by.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.ca.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.cz.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.de.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.el.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.es.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.eu.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.fr.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.he.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.hr.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.hu.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.hy.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.it.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.ja.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.kr.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.nl.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.pl.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.ro.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.ru.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.sc.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.sk.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.sv.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.tc.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.tr.rc | 47 ++++++++++--------- src/apps/mpcresources/mplayerc.ua.rc | 47 ++++++++++--------- src/apps/mpcresources/text/mplayerc.br.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.by.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.ca.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.cz.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.de.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.el.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.es.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.eu.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.fr.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.he.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.hr.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.hu.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.hy.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.it.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.ja.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.kr.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.nl.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.pl.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.ro.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.ru.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.sc.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.sk.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.sv.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.tc.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.tr.rc.txt | 11 +++-- src/apps/mpcresources/text/mplayerc.ua.rc.txt | 11 +++-- src/apps/mplayerc/PPagePlayer.cpp | 6 --- src/apps/mplayerc/mplayerc.rc | 47 ++++++++++--------- 55 files changed, 810 insertions(+), 762 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.br.rc b/src/apps/mpcresources/mplayerc.br.rc index d6cc4d93f8..5ff9c65f1e 100644 --- a/src/apps/mpcresources/mplayerc.br.rc +++ b/src/apps/mpcresources/mplayerc.br.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forçar único processo",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Usar mesmo processo para todos os arquivos",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Novo processo para cada arquivo",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Texto da barra de título",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Barra de busca de texto",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Localização das configurações",IDC_STATIC,5,136,115,55 - CONTROL "Registro do Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Perfil de usuário",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Pasta do player",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Texto da barra de título",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Barra de busca de texto",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Localização das configurações",IDC_STATIC,5,135,115,55 + CONTROL "Registro do Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Perfil de usuário",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Pasta do player",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Histórico",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Manter histórico de arquivos abertos",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Outros",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Ícone de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Mostrar OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Mostrar nome do arquivo de mídia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Mostrar tempo de busca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Desativar menu 'Abrir disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Prioridade do processo acima do normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Tempo limite da rede:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "seg",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Outros",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Ícone de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Mostrar OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Mostrar nome do arquivo de mídia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Mostrar tempo de busca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Desativar menu 'Abrir disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Prioridade do processo acima do normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "seg",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.by.rc b/src/apps/mpcresources/mplayerc.by.rc index 72ec140254..b779f01183 100644 --- a/src/apps/mpcresources/mplayerc.by.rc +++ b/src/apps/mpcresources/mplayerc.by.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Гісторыя",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Захоўваць гісторыю адчын. файлаў",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Іншае",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Значок у панэлі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Паказаць OSD (патрабуецца перазапуск)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Падвышаны прыярытэт працэсу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Іншае",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Значок у панэлі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Паказаць OSD (патрабуецца перазапуск)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Падвышаны прыярытэт працэсу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ca.rc b/src/apps/mpcresources/mplayerc.ca.rc index 94aaa33652..81c5db12cf 100644 --- a/src/apps/mpcresources/mplayerc.ca.rc +++ b/src/apps/mpcresources/mplayerc.ca.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Barra del títol",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Mantenir l'historial dels arxius oberts",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altres",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Icona a la safata",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Mostrar OSD (requereix reiniciar)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Més prioritat pel procés",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Altres",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Icona a la safata",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Mostrar OSD (requereix reiniciar)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Més prioritat pel procés",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.cz.rc b/src/apps/mpcresources/mplayerc.cz.rc index 2508b61753..6a1d6f4482 100644 --- a/src/apps/mpcresources/mplayerc.cz.rc +++ b/src/apps/mpcresources/mplayerc.cz.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Historie",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Ukládat historii otevřených souborů",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostatní",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Ikona v oznamovací oblasti",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Zobrazit OSD (vyžaduje restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Zakázat nabídku Otevřít disk",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Spouštět se zvýšenou prioritou",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Ostatní",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Ikona v oznamovací oblasti",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Zobrazit OSD (vyžaduje restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Zakázat nabídku Otevřít disk",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Spouštět se zvýšenou prioritou",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.de.rc b/src/apps/mpcresources/mplayerc.de.rc index 912821d068..70b21d93b2 100644 --- a/src/apps/mpcresources/mplayerc.de.rc +++ b/src/apps/mpcresources/mplayerc.de.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Einzelnen Prozess des Players erzwingen",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Mediendateien mit dem aktuellen Player öffnen",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Mediendateien mit jeweils neuem Player öffnen",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Titelleiste",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Suchleiste",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Speicherort der Einstellungen",IDC_STATIC,5,136,115,55 - CONTROL "Windows-Registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Benutzerprofil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Programm-Ordner",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Titelleiste",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Suchleiste",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Speicherort der Einstellungen",IDC_STATIC,5,135,115,55 + CONTROL "Windows-Registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Benutzerprofil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Programm-Ordner",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Chronik und Position",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "&Chronik anlegen",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Titel für URL in 'Neueste Chronik' anzeigen",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Weitere Einstellungen",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "&Taskleistensymbol anzeigen",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "OSD anzeigen (Neustart notwendig)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Dateiname (bzw. Titel)",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Netzwerk-Zeitüberschreitung:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "Sek.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Weitere Einstellungen",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "&Taskleistensymbol anzeigen",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "OSD anzeigen (Neustart notwendig)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Dateiname (bzw. Titel)",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "Sek.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.el.rc b/src/apps/mpcresources/mplayerc.el.rc index 7e3a38d087..dd406913c1 100644 --- a/src/apps/mpcresources/mplayerc.el.rc +++ b/src/apps/mpcresources/mplayerc.el.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Εξαναγκασμός μίας διεργασίας",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Χρήση του ίδιου αναπαραγωγού για κάθε αρχείο πολυμέσων",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Άνοιγμα νέου αναπαραγωγού για κάθε αρχείο πολυμέσων",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Κείμενο γραμμής τίτλου",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Κείμενο γραμμής αναζήτησης",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Κείμενο γραμμής τίτλου",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Κείμενο γραμμής αναζήτησης",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Ιστορικό",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Διατήρηση ιστορικού πρόσφατων αρχείων",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Άλλα",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Εικονίδιο στη γραμμή ειδοποιήσεων",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Εμφάνιση OSD (απαιτείται επανεκκίνηση)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Εμφάνιση του ονόματος αρχείου",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Εμφάνιση χρόνου αναζήτησης",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Απενεργοποίηση του μενού "" Άνοιγμα δίσκου""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Προτεραιότητα διεργασίας πάνω από κανονική",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Χρονικό διάστημα δικτύου:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "δευτ.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Άλλα",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Εικονίδιο στη γραμμή ειδοποιήσεων",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Εμφάνιση OSD (απαιτείται επανεκκίνηση)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Εμφάνιση του ονόματος αρχείου",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Εμφάνιση χρόνου αναζήτησης",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Απενεργοποίηση του μενού "" Άνοιγμα δίσκου""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Προτεραιότητα διεργασίας πάνω από κανονική",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "δευτ.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.es.rc b/src/apps/mpcresources/mplayerc.es.rc index e0d2e66b50..ea10d52db3 100644 --- a/src/apps/mpcresources/mplayerc.es.rc +++ b/src/apps/mpcresources/mplayerc.es.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forzar un solo proceso",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Usar el mismo proceso para cada archivo",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Nuevo proceso para cada archivo",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Texto de la barra de título",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Texto de la barra de búsqueda",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Ubicación de ajustes",IDC_STATIC,5,136,115,55 - CONTROL "Registro de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Perfil de usuario",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Carpeta del reproductor",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Texto de la barra de título",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Texto de la barra de búsqueda",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Ubicación de ajustes",IDC_STATIC,5,135,115,55 + CONTROL "Registro de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Perfil de usuario",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Carpeta del reproductor",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Historial",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Mantener historial de archivos abiertos",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Mostrar título para URL en archivos recientes",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Otros",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Icono de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Mostrar OSD (requiere reinicio)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Mostrar nombre de archivo multimedia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Mostrar tiempo de búsqueda",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Deshabilitar menú 'Abrir Disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Mayor prioridad para el proceso",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Tiempo de espera de red:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "seg.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Otros",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Icono de bandeja",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Mostrar OSD (requiere reinicio)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Mostrar nombre de archivo multimedia",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Mostrar tiempo de búsqueda",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Deshabilitar menú 'Abrir Disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Mayor prioridad para el proceso",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "seg.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.eu.rc b/src/apps/mpcresources/mplayerc.eu.rc index 600e3e35ab..cdbf3b2e2c 100644 --- a/src/apps/mpcresources/mplayerc.eu.rc +++ b/src/apps/mpcresources/mplayerc.eu.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Behartu prozesu bakarra",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Erabili prozesu berdina agiri guztientzat",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Prozesu berria agiri bakoitzarentzat",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Historia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Heutsi berriki irekitako agirien historiari",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Beste",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Erretilu ikurra",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Erakutsi IGE (beharrezkoa berrabiaratzea)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Erakutsi multimedia agiriaren izena",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Erakutsi bilaketa denbora",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Ezgaitu 'Ireki Diska' menua",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Ekinbide lehentasuna arruntetik gora",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Beste",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Erretilu ikurra",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Erakutsi IGE (beharrezkoa berrabiaratzea)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Erakutsi multimedia agiriaren izena",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Erakutsi bilaketa denbora",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Ezgaitu 'Ireki Diska' menua",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Ekinbide lehentasuna arruntetik gora",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.fr.rc b/src/apps/mpcresources/mplayerc.fr.rc index 4f6ef5fed5..719554da5e 100644 --- a/src/apps/mpcresources/mplayerc.fr.rc +++ b/src/apps/mpcresources/mplayerc.fr.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forcer un seul processus",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Utiliser le même processus pour chaque fichier",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Nouveau processus pour chaque fichier",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Texte de la barre de titre",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Texte de la barre de recherche",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Emplacement des paramètres",IDC_STATIC,5,136,115,55 - CONTROL "Registre de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Profil Utilisateur",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Dossier du lecteur",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Texte de la barre de titre",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Texte de la barre de recherche",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Emplacement des paramètres",IDC_STATIC,5,135,115,55 + CONTROL "Registre de Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Profil Utilisateur",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Dossier du lecteur",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Historique",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Conserver l'historique des fichiers ouverts",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Afficher le titre de l'URL dans les fichiers récents",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Divers",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Icône dans la barre de notification",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Afficher l'OSD (nécessite un redémarrage)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Afficher le nom du fichier de média",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Afficher le temps de recherche",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Désactiver le menu 'Ouvrir le disque'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Priorité supérieure à la normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Délai d'expiration du réseau :",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Divers",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Icône dans la barre de notification",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Afficher l'OSD (nécessite un redémarrage)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Afficher le nom du fichier de média",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Afficher le temps de recherche",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Désactiver le menu 'Ouvrir le disque'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Priorité supérieure à la normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.he.rc b/src/apps/mpcresources/mplayerc.he.rc index 323450765b..f6f319eb4f 100644 --- a/src/apps/mpcresources/mplayerc.he.rc +++ b/src/apps/mpcresources/mplayerc.he.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "היסטוריה",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "שמור היסטורייה של קבצים שנפתחו לאחרונה",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "הגדרות נוספות",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "אייקון ליד השעון",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "תצוגת מידע בוידאו (דורש הפעלה מחדש)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "הנגן מקבל קדימות על פני תהליכים אחרים",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "הגדרות נוספות",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "אייקון ליד השעון",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "תצוגת מידע בוידאו (דורש הפעלה מחדש)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "הנגן מקבל קדימות על פני תהליכים אחרים",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hr.rc b/src/apps/mpcresources/mplayerc.hr.rc index 3ffea840a6..69cd158d35 100644 --- a/src/apps/mpcresources/mplayerc.hr.rc +++ b/src/apps/mpcresources/mplayerc.hr.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forsiraj kao jedan proces",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "UKoristi isti proces za svaku datoteku",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Novi proces za svaku datoteku",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Tekst naslovne trake",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Tekst trake za potražnju",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Lokacija postavki",IDC_STATIC,5,136,115,55 - CONTROL "Windows registar",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Korisnički profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Mapa programa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Tekst naslovne trake",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Tekst trake za potražnju",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Lokacija postavki",IDC_STATIC,5,135,115,55 + CONTROL "Windows registar",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Korisnički profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Mapa programa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Povijest",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Zadrži povijest nedavno otvaranih datoteka",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostalo",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Tray ikona",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Pokaži OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Pokaži ime medijske datoteke",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Pokaži vrijeme pretrage",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Onesposobi izbornik 'Otvori Disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Procesiraj prioritet iznad normalnog",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Mrežna stanka:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sek.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Ostalo",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Tray ikona",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Pokaži OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Pokaži ime medijske datoteke",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Pokaži vrijeme pretrage",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Onesposobi izbornik 'Otvori Disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Procesiraj prioritet iznad normalnog",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sek.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hu.rc b/src/apps/mpcresources/mplayerc.hu.rc index 2372ba5856..d4edf04098 100644 --- a/src/apps/mpcresources/mplayerc.hu.rc +++ b/src/apps/mpcresources/mplayerc.hu.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Kényszerítsen egyetlen folyamatot",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Használja ugyanazt a folyamatot minden fájlhoz",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Új folyamat minden fájlhoz",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Címsáv szövege",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Keresősáv szövege",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Beállítások helye",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Felhasználói profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Lejátszó mappa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Címsáv szövege",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Keresősáv szövege",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Beállítások helye",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Felhasználói profil",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Lejátszó mappa",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Előzmények",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Megnyitott fájlok előzményeinek megtartása",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Az URL címének megjelenítése a legutóbbi fájlokban",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Egyéb",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Legyen tálca ikon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "OSD megjelenítése (újraindítást igényel)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Médiafájl nevének megjelenítése",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Keresési idő megjelenítése",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Kikapcsolja az 'Open Disc' menüt",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "A lejátszó prioritása normál érték felett",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Hálózat időtúllépése:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "mp.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Egyéb",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Legyen tálca ikon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "OSD megjelenítése (újraindítást igényel)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Médiafájl nevének megjelenítése",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Keresési idő megjelenítése",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Kikapcsolja az 'Open Disc' menüt",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "A lejátszó prioritása normál érték felett",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "mp.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.hy.rc b/src/apps/mpcresources/mplayerc.hy.rc index d027dd3d96..58a9c1e853 100644 --- a/src/apps/mpcresources/mplayerc.hy.rc +++ b/src/apps/mpcresources/mplayerc.hy.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Պատմությունը",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Պահպանել բացված ֆայլերի պատ-ը",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Այլ",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Պատկերակը առաջադրանքների վահանակ.",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Ցուցադրել OSD-ն (պահ.է վերամեկնարկում)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Անջատել 'Բացել սկավառակը' ընտրացանկը",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Գործողության բարձր առաջնայնություն",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Այլ",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Պատկերակը առաջադրանքների վահանակ.",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Ցուցադրել OSD-ն (պահ.է վերամեկնարկում)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Անջատել 'Բացել սկավառակը' ընտրացանկը",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Գործողության բարձր առաջնայնություն",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.it.rc b/src/apps/mpcresources/mplayerc.it.rc index 2c57364f83..ed7bb8ab53 100644 --- a/src/apps/mpcresources/mplayerc.it.rc +++ b/src/apps/mpcresources/mplayerc.it.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forza un unico processo",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Usa la stessa procedura per ogni file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Nuovo processo per ogni file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Testo barra del titolo",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Cerca testo barra",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Posizione delle impostazioni",IDC_STATIC,5,136,115,55 - CONTROL "Registro di Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Profilo utente",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Cartella lettore",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Testo barra del titolo",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Cerca testo barra",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Posizione delle impostazioni",IDC_STATIC,5,135,115,55 + CONTROL "Registro di Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Profilo utente",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Cartella lettore",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Cronologia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Conserva cronologia file aperti di recente",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Visualizza titolo per l'URL nei file recenti",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altro",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Icona nell'area di notifica",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Mostra OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Mostra nome del file multimediale",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Mostra tempo di ricerca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disabilita il menu ""Apri disco""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Priorità del processo superiore al normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Timeout rete:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Altro",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Icona nell'area di notifica",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Mostra OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Mostra nome del file multimediale",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Mostra tempo di ricerca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disabilita il menu ""Apri disco""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Priorità del processo superiore al normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ja.rc b/src/apps/mpcresources/mplayerc.ja.rc index bbbfd89ee2..bc55647f3b 100644 --- a/src/apps/mpcresources/mplayerc.ja.rc +++ b/src/apps/mpcresources/mplayerc.ja.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "複数起動を禁止する",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "同じプレーヤーで開く",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "新規プレーヤーで開く",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "タイトル バーのテキスト",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "シーク バーのテキスト",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "設定の保存場所",IDC_STATIC,5,136,115,55 - CONTROL "Windows レジストリ",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "ユーザー プロファイル",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "MPC-BE フォルダー",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "タイトル バーのテキスト",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "シーク バーのテキスト",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "設定の保存場所",IDC_STATIC,5,135,115,55 + CONTROL "Windows レジストリ",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "ユーザー プロファイル",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "MPC-BE フォルダー",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "履歴",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "最近使ったファイルの履歴を保存する",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "最近使ったファイルの URL のタイトルを表示する",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "その他",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "タスクトレイ アイコン",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "OSD を表示する",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "メディア ファイル名を表示する",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "シーク タイムを表示する",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "「ディスクを開く」のメニューを無効にする",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "プロセスの優先度を 通常以上 にする",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "ネットワーク タイムアウト:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "秒",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "その他",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "タスクトレイ アイコン",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "OSD を表示する",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "メディア ファイル名を表示する",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "シーク タイムを表示する",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "「ディスクを開く」のメニューを無効にする",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "プロセスの優先度を 通常以上 にする",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "秒",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.kr.rc b/src/apps/mpcresources/mplayerc.kr.rc index ac37fd929d..7c99debf0f 100644 --- a/src/apps/mpcresources/mplayerc.kr.rc +++ b/src/apps/mpcresources/mplayerc.kr.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "프로세스 하나만 사용",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "파일을 열 때마다 같은 재생기창 사용",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "파일을 열 때마다 새 재생기창 사용",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "제목 표시줄 문구",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "막대 문구 찾기",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "설정 위치",IDC_STATIC,5,136,115,55 - CONTROL "윈도 레지스트리",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "사용자 프로필",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "재생기 폴더",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "제목 표시줄 문구",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "막대 문구 찾기",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "설정 위치",IDC_STATIC,5,135,115,55 + CONTROL "윈도 레지스트리",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "사용자 프로필",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "재생기 폴더",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "히스토리",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "최근 열람한 파일목록 기억",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "최근 열람한 파일 경로를 제목 표시줄에 표기",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "기타",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "트레이에 아이콘 보이기",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "화면 표시 보이기(다시 시작 필요)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "미디어 파일명 표기",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "탐색 시간 표기",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "'디스크 열기' 메뉴 사용 안 함",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "프로세스 우선순위 높이기",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "네트워크 경과 시간 :",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "초",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "기타",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "트레이에 아이콘 보이기",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "화면 표시 보이기(다시 시작 필요)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "미디어 파일명 표기",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "탐색 시간 표기",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "'디스크 열기' 메뉴 사용 안 함",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "프로세스 우선순위 높이기",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "초",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.nl.rc b/src/apps/mpcresources/mplayerc.nl.rc index 983d19e736..a14518d56e 100644 --- a/src/apps/mpcresources/mplayerc.nl.rc +++ b/src/apps/mpcresources/mplayerc.nl.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forceer een enkel proces",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Gebruik hetzelfde proces voor elk bestand",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Nieuw proces voor elk bestand",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Tekst van titelbalk",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Tekst van zoekbalk",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Opslaglocatie van instellingen",IDC_STATIC,5,136,115,55 - CONTROL "Windows-register",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Gebruikersprofiel",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Map mediaspeler",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Tekst van titelbalk",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Tekst van zoekbalk",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Opslaglocatie van instellingen",IDC_STATIC,5,135,115,55 + CONTROL "Windows-register",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Gebruikersprofiel",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Map mediaspeler",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Geschiedenis",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Onlangs geopende bestanden onthouden",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Titel voor URL in recente bestanden weergeven",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Overige",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Pictogram in systeemvak",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Toon OSD (vereist herstart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Toon naam van mediabestand",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Toon gezochte tijd",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Menu ""Schijf openen"" uitschakelen",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Procesprioriteit ""hoger dan normaal""",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Netwerk time-out:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Overige",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Pictogram in systeemvak",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Toon OSD (vereist herstart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Toon naam van mediabestand",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Toon gezochte tijd",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Menu ""Schijf openen"" uitschakelen",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Procesprioriteit ""hoger dan normaal""",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.pl.rc b/src/apps/mpcresources/mplayerc.pl.rc index 0fcfdeb6ed..fd20f3381b 100644 --- a/src/apps/mpcresources/mplayerc.pl.rc +++ b/src/apps/mpcresources/mplayerc.pl.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Wymuś pojedyńcze okno",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Użyj tego samego okna dla każdego pliku",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Otwieraj nowe okno dla każdego otwieranego pliku",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Tekst na pasku tytułu",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Tekst na pasku potępu",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Tekst na pasku tytułu",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Tekst na pasku potępu",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Historia",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Przechowywanie historii otwieranych plików",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Inne",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Ikona obszaru powiadomień",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Menu ekranowe - OSD (wymagany restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Pokaż nazwę pliku",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Pokaż czas postępu",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Ukrywaj menu „Otwórz płytę”",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Priorytet programu powyżej normalnego",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Limit czasu sieci:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sek.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Inne",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Ikona obszaru powiadomień",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Menu ekranowe - OSD (wymagany restart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Pokaż nazwę pliku",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Pokaż czas postępu",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Ukrywaj menu „Otwórz płytę”",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Priorytet programu powyżej normalnego",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sek.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ro.rc b/src/apps/mpcresources/mplayerc.ro.rc index d83559b8e1..61a70918d2 100644 --- a/src/apps/mpcresources/mplayerc.ro.rc +++ b/src/apps/mpcresources/mplayerc.ro.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Forțează un singur proces",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Folosește același player pentru fiecare fișier media",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Deschide un player nou pentru fiecare fișier media redat",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Textul barei de titlu",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Caută textul barei",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Locația setărilor",IDC_STATIC,5,136,115,55 - CONTROL "Registru Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Profilul utilizatorului",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Dosarul player-ului",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Textul barei de titlu",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Caută textul barei",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Locația setărilor",IDC_STATIC,5,135,115,55 + CONTROL "Registru Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Profilul utilizatorului",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Dosarul player-ului",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Istoric",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Ține un istoric al ultimelor fișiere deschise",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Afișează titlul pentru URL în fișierele recente",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Altele",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Pictogramă în zona de notificare",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Arată OSD (necesită repornire player)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Afișează numele în fișierul media",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Afișează timpul de căutare",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Dezactivează meniul ""Deschide Disc""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Prioritatea procesării peste normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Pauză de rețea:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Altele",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Pictogramă în zona de notificare",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Arată OSD (necesită repornire player)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Afișează numele în fișierul media",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Afișează timpul de căutare",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Dezactivează meniul ""Deschide Disc""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Prioritatea procesării peste normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ru.rc b/src/apps/mpcresources/mplayerc.ru.rc index fd5a209599..6c6cca7f19 100644 --- a/src/apps/mpcresources/mplayerc.ru.rc +++ b/src/apps/mpcresources/mplayerc.ru.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "всегда один процесс",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "один и тот же процесс для каждого файла",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "новый процесс для каждого файла",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Текст в заголовке окна",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Текст в полосе прокрутки",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Расположение настроек",IDC_STATIC,5,136,115,55 - CONTROL "Реестр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Профиль пользователя",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Папка плеера",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Текст в заголовке окна",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Текст в полосе прокрутки",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Расположение настроек",IDC_STATIC,5,135,115,55 + CONTROL "Реестр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Профиль пользователя",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Папка плеера",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "История / Позиция",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Сохранять историю открытых файлов",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Показывать заголовок для URL в последних файлах",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Прочее",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Значок в области уведомлений",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Показать OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Показывать имя файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Тайм-аут соединения:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "сек.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Прочее",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Значок в области уведомлений",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Показать OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Показывать имя файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "сек.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sc.rc b/src/apps/mpcresources/mplayerc.sc.rc index df64e29e75..09aa507eaf 100644 --- a/src/apps/mpcresources/mplayerc.sc.rc +++ b/src/apps/mpcresources/mplayerc.sc.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "只播放一个文件",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "为每个媒体文件使用相同的播放器",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "为每个播放的媒体文件打开一个新的播放器",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "标题栏文字",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "进度栏文字",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "设置文件保存位置",IDC_STATIC,5,136,115,55 - CONTROL "操作系统注册表",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "用户账户文件夹",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "MPC-BE 播放器文件夹",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "标题栏文字",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "进度栏文字",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "设置文件保存位置",IDC_STATIC,5,135,115,55 + CONTROL "操作系统注册表",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "用户账户文件夹",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "MPC-BE 播放器文件夹",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "历史",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "保存最近打开文件的历史记录",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "在最近的文件中显示链接页面的标题",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "其它",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "托盘图标",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "显示 OSD (需要重新启动播放器)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "显示媒体文件名称",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "显示搜索时间",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "隐藏打开光盘菜单",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "高于普通进程优先级",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "网络超时:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "秒",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "其它",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "托盘图标",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "显示 OSD (需要重新启动播放器)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "显示媒体文件名称",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "显示搜索时间",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "隐藏打开光盘菜单",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "高于普通进程优先级",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "秒",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sk.rc b/src/apps/mpcresources/mplayerc.sk.rc index da70e3d37d..49d56c5894 100644 --- a/src/apps/mpcresources/mplayerc.sk.rc +++ b/src/apps/mpcresources/mplayerc.sk.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "História",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Udržiavať históriu otváraných súborov",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Ostatné",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Ikona v lište nástrojov",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Zobraziť OSD (vyžaduje reštart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Zablokovať menu 'Otvoriť disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Vyššia priorita procesu",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Ostatné",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Ikona v lište nástrojov",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Zobraziť OSD (vyžaduje reštart)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Zablokovať menu 'Otvoriť disk'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Vyššia priorita procesu",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.sv.rc b/src/apps/mpcresources/mplayerc.sv.rc index 6a33dbbd91..0b3deb3387 100644 --- a/src/apps/mpcresources/mplayerc.sv.rc +++ b/src/apps/mpcresources/mplayerc.sv.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "History",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Behåll historia över nyligen öppnade filer",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Annat",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Visa ikon i systemfältet",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Visa OSD (omstart krävs)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Process prioritet högre än normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Annat",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Visa ikon i systemfältet",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Visa OSD (omstart krävs)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Process prioritet högre än normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.tc.rc b/src/apps/mpcresources/mplayerc.tc.rc index e3be338e86..9c2c08fdad 100644 --- a/src/apps/mpcresources/mplayerc.tc.rc +++ b/src/apps/mpcresources/mplayerc.tc.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "強制單一程式",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "所有檔案使用同一處理程序",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "所有檔案使用獨立處理程序",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "標題列文字",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "搜尋列文字",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "儲存設定位置",IDC_STATIC,5,136,115,55 - CONTROL "作業系統登錄檔",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "使用者帳戶資料夾",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "播放程式資料夾",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "標題列文字",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "搜尋列文字",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "儲存設定位置",IDC_STATIC,5,135,115,55 + CONTROL "作業系統登錄檔",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "使用者帳戶資料夾",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "播放程式資料夾",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "歷史記錄",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "保留最近開啟檔案的記錄",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "在最近的檔案為網址連結顯示標題",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "其他選項",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "系統列(通知區域)圖示",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "顯示 OSD (需要重新啟動)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "顯示媒體檔案名稱",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "顯示搜尋時間",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "停用「開啟光碟」選單",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "程式優先順序調成標準以上",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "連線逾時:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "秒",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "其他選項",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "系統列(通知區域)圖示",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "顯示 OSD (需要重新啟動)",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "顯示媒體檔案名稱",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "顯示搜尋時間",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "停用「開啟光碟」選單",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "程式優先順序調成標準以上",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "秒",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.tr.rc b/src/apps/mpcresources/mplayerc.tr.rc index 63e28d633a..308468d191 100644 --- a/src/apps/mpcresources/mplayerc.tr.rc +++ b/src/apps/mpcresources/mplayerc.tr.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Tek oynatıcı için zorla",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Her dosya için benzer oynatıcı",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Her dosya için yeni oynatıcı",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Başlık çubuğu metini",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Arama çubuğu metini",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Ayarların saklanacağı konum",IDC_STATIC,5,136,115,55 - CONTROL "Windows kayıt defteri",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Kullanıcı profili",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Oynatıcı klasörü",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Başlık çubuğu metini",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Arama çubuğu metini",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Ayarların saklanacağı konum",IDC_STATIC,5,135,115,55 + CONTROL "Windows kayıt defteri",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Kullanıcı profili",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Oynatıcı klasörü",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Geçmiş",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Son açılan dosyaları geçmişte sakla",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Son dosyalarda URL için başlığı göster",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Diğer",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Bildirim alanı simgesi göster",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "OSD göster",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Dosya adını göster",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Atlama zamanını göster",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disk Açma özelliğini devre dışı bırak",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "İşlem önceliğini normalden yüksek tut",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Ağ zaman aşımı:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sn.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Diğer",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Bildirim alanı simgesi göster",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "OSD göster",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Dosya adını göster",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Atlama zamanını göster",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disk Açma özelliğini devre dışı bırak",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "İşlem önceliğini normalden yüksek tut",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sn.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/mplayerc.ua.rc b/src/apps/mpcresources/mplayerc.ua.rc index f0442e02cb..991319cffa 100644 --- a/src/apps/mpcresources/mplayerc.ua.rc +++ b/src/apps/mpcresources/mplayerc.ua.rc @@ -262,14 +262,14 @@ BEGIN CONTROL "Примусовий одновіконний режим",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Використовувати один процес для усіх файлів",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "Новий процес для кожного файла",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Текст у заголовку вікна",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Текст у смужці перемотування",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Розташування налаштувань",IDC_STATIC,5,136,115,55 - CONTROL "Реєстр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "Профіль користувача",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Тека плеєра",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Текст у заголовку вікна",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Текст у смужці перемотування",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Розташування налаштувань",IDC_STATIC,5,135,115,55 + CONTROL "Реєстр Windows",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "Профіль користувача",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Тека плеєра",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "Історія",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Зберігати історію відкритих файлів",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -286,21 +286,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Показувати заголовок для URL у останніх відкр. файлах",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Інше",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Значок у панелі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Показувати OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Показувати ім'я файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Показувати поточну позиц.\тривалість",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Заборонити меню 'Відкрити диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Підвищений пріоритет процесу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Мережевий тайм-аут:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "сек.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Інше",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Значок у панелі задач",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Показувати OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Показувати ім'я файла",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Показувати поточну позиц.\тривалість",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Заборонити меню 'Відкрити диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Підвищений пріоритет процесу",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "сек.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.br.rc.txt b/src/apps/mpcresources/text/mplayerc.br.rc.txt index 67f0c010a7..38a1f40abc 100644 --- a/src/apps/mpcresources/text/mplayerc.br.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.br.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausar reprodução do vídeo quando minimizado" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opções abrir" 6 "Forçar único processo" 7 "Usar mesmo processo para todos os arquivos" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Mostrar tempo de busca" 38 "Desativar menu 'Abrir disco'" 39 "Prioridade do processo acima do normal" -40 "Tempo limite da rede:" -43 "seg" -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "seg" +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.by.rc.txt b/src/apps/mpcresources/text/mplayerc.by.rc.txt index 2f27cae657..ef986fd2ee 100644 --- a/src/apps/mpcresources/text/mplayerc.by.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.by.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Адкрываць файлы выкарыст." 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Disable 'Open Disc' menu" 39 "Падвышаны прыярытэт працэсу" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ca.rc.txt b/src/apps/mpcresources/text/mplayerc.ca.rc.txt index 12af375256..0aa8b97e41 100644 --- a/src/apps/mpcresources/text/mplayerc.ca.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ca.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opcions d'apertura" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Disable 'Open Disc' menu" 39 "Més prioritat pel procés" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.cz.rc.txt b/src/apps/mpcresources/text/mplayerc.cz.rc.txt index 69181da084..f413c41044 100644 --- a/src/apps/mpcresources/text/mplayerc.cz.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.cz.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Možnosti otevírání" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Zakázat nabídku Otevřít disk" 39 "Spouštět se zvýšenou prioritou" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mpcresources/text/mplayerc.de.rc.txt index 8765397cbc..b362b1e683 100644 --- a/src/apps/mpcresources/text/mplayerc.de.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.de.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Videowiedergabe pausieren, wenn minimiert" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Öffnen von Medien" 6 "Einzelnen Prozess des Players erzwingen" 7 "Mediendateien mit dem aktuellen Player öffnen" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Verstrichene/Verbleibende Zeit / Gesamtzeit" 38 "Disc-Wiedergabe deaktivieren" 39 "&Prozesspriorität höher als normal" -40 "Netzwerk-Zeitüberschreitung:" -43 "Sek." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "Sek." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.el.rc.txt b/src/apps/mpcresources/text/mplayerc.el.rc.txt index 5828336a6f..64ecb60502 100644 --- a/src/apps/mpcresources/text/mplayerc.el.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.el.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Παύση της αναπαραγωγής βίντεο στην ελαχιστοποίηση" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Επιλογές ανοίγματος" 6 "Εξαναγκασμός μίας διεργασίας" 7 "Χρήση του ίδιου αναπαραγωγού για κάθε αρχείο πολυμέσων" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Εμφάνιση χρόνου αναζήτησης" 38 "Απενεργοποίηση του μενού "" Άνοιγμα δίσκου""" 39 "Προτεραιότητα διεργασίας πάνω από κανονική" -40 "Χρονικό διάστημα δικτύου:" -43 "δευτ." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "δευτ." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.es.rc.txt b/src/apps/mpcresources/text/mplayerc.es.rc.txt index 22a22679f5..a16c145ec3 100644 --- a/src/apps/mpcresources/text/mplayerc.es.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.es.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausar la reproducción de video cuando se minimiza" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opciones de apertura" 6 "Forzar un solo proceso" 7 "Usar el mismo proceso para cada archivo" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Mostrar tiempo de búsqueda" 38 "Deshabilitar menú 'Abrir Disco'" 39 "Mayor prioridad para el proceso" -40 "Tiempo de espera de red:" -43 "seg." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "seg." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.eu.rc.txt b/src/apps/mpcresources/text/mplayerc.eu.rc.txt index 7d39fd5203..59abc64fd2 100644 --- a/src/apps/mpcresources/text/mplayerc.eu.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.eu.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pausatu bideo irakurketa txikiendutakoan" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Ireki aukerak" 6 "Behartu prozesu bakarra" 7 "Erabili prozesu berdina agiri guztientzat" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Erakutsi bilaketa denbora" 38 "Ezgaitu 'Ireki Diska' menua" 39 "Ekinbide lehentasuna arruntetik gora" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.fr.rc.txt b/src/apps/mpcresources/text/mplayerc.fr.rc.txt index 87ec78e65a..ff673cfa9b 100644 --- a/src/apps/mpcresources/text/mplayerc.fr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.fr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Mettre en pause la lecture vidéo lorsqu'elle est réduite" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Options d'ouverture" 6 "Forcer un seul processus" 7 "Utiliser le même processus pour chaque fichier" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Afficher le temps de recherche" 38 "Désactiver le menu 'Ouvrir le disque'" 39 "Priorité supérieure à la normale" -40 "Délai d'expiration du réseau :" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.he.rc.txt b/src/apps/mpcresources/text/mplayerc.he.rc.txt index 6825b9e239..d2ec3b0936 100644 --- a/src/apps/mpcresources/text/mplayerc.he.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.he.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "פתח הגדרות" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Disable 'Open Disc' menu" 39 "הנגן מקבל קדימות על פני תהליכים אחרים" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hr.rc.txt b/src/apps/mpcresources/text/mplayerc.hr.rc.txt index 7fb5bc799c..c85a5e572f 100644 --- a/src/apps/mpcresources/text/mplayerc.hr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Zaustavi video pregled pri minimiziranju" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Mogućnosti Otvaranja" 6 "Forsiraj kao jedan proces" 7 "UKoristi isti proces za svaku datoteku" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Pokaži vrijeme pretrage" 38 "Onesposobi izbornik 'Otvori Disk'" 39 "Procesiraj prioritet iznad normalnog" -40 "Mrežna stanka:" -43 "sek." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sek." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hu.rc.txt b/src/apps/mpcresources/text/mplayerc.hu.rc.txt index 7e92fb0100..3647a00325 100644 --- a/src/apps/mpcresources/text/mplayerc.hu.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hu.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Szüneteltesse a videó lejátszását, amikor kis méretben van" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Megnyitási lehetőségek" 6 "Kényszerítsen egyetlen folyamatot" 7 "Használja ugyanazt a folyamatot minden fájlhoz" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Keresési idő megjelenítése" 38 "Kikapcsolja az 'Open Disc' menüt" 39 "A lejátszó prioritása normál érték felett" -40 "Hálózat időtúllépése:" -43 "mp." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "mp." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.hy.rc.txt b/src/apps/mpcresources/text/mplayerc.hy.rc.txt index 81126538a5..9707f876e1 100644 --- a/src/apps/mpcresources/text/mplayerc.hy.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hy.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Բացելու ընտրանքներ" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Անջատել 'Բացել սկավառակը' ընտրացանկը" 39 "Գործողության բարձր առաջնայնություն" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.it.rc.txt b/src/apps/mpcresources/text/mplayerc.it.rc.txt index f81100fd2a..2fd1f5cc71 100644 --- a/src/apps/mpcresources/text/mplayerc.it.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.it.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Metti in pausa la riproduzione video quando è ridotto a icona" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opzioni di apertura" 6 "Forza un unico processo" 7 "Usa la stessa procedura per ogni file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Mostra tempo di ricerca" 38 "Disabilita il menu ""Apri disco""" 39 "Priorità del processo superiore al normale" -40 "Timeout rete:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ja.rc.txt b/src/apps/mpcresources/text/mplayerc.ja.rc.txt index 41c6a597e5..1e8a32f3e0 100644 --- a/src/apps/mpcresources/text/mplayerc.ja.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ja.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化時にビデオ再生を一時停止させる" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "開くオプション" 6 "複数起動を禁止する" 7 "同じプレーヤーで開く" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "シーク タイムを表示する" 38 "「ディスクを開く」のメニューを無効にする" 39 "プロセスの優先度を 通常以上 にする" -40 "ネットワーク タイムアウト:" -43 "秒" -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "秒" +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mpcresources/text/mplayerc.kr.rc.txt index 96df447980..40f73d5b5b 100644 --- a/src/apps/mpcresources/text/mplayerc.kr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.kr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "최소화 시, 영상 재생 일시 정지" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "열기 옵션" 6 "프로세스 하나만 사용" 7 "파일을 열 때마다 같은 재생기창 사용" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "탐색 시간 표기" 38 "'디스크 열기' 메뉴 사용 안 함" 39 "프로세스 우선순위 높이기" -40 "네트워크 경과 시간 :" -43 "초" -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "초" +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.nl.rc.txt b/src/apps/mpcresources/text/mplayerc.nl.rc.txt index 5f38d03e68..e35e9d9ddd 100644 --- a/src/apps/mpcresources/text/mplayerc.nl.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.nl.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Weergave pauseren als het venster geminimaliseerd is" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opties voor openen" 6 "Forceer een enkel proces" 7 "Gebruik hetzelfde proces voor elk bestand" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Toon gezochte tijd" 38 "Menu ""Schijf openen"" uitschakelen" 39 "Procesprioriteit ""hoger dan normaal""" -40 "Netwerk time-out:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.pl.rc.txt b/src/apps/mpcresources/text/mplayerc.pl.rc.txt index da855fae74..79682fb56c 100644 --- a/src/apps/mpcresources/text/mplayerc.pl.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.pl.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Wstrzymaj odtwarzanie po minimalizacji" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Otwieranie" 6 "Wymuś pojedyńcze okno" 7 "Użyj tego samego okna dla każdego pliku" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Pokaż czas postępu" 38 "Ukrywaj menu „Otwórz płytę”" 39 "Priorytet programu powyżej normalnego" -40 "Limit czasu sieci:" -43 "sek." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sek." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.rc.txt b/src/apps/mpcresources/text/mplayerc.rc.txt index b75913a326..3e03b6a604 100644 --- a/src/apps/mpcresources/text/mplayerc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Open options" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Disable 'Open Disc' menu" 39 "Process priority above normal" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ro.rc.txt b/src/apps/mpcresources/text/mplayerc.ro.rc.txt index 8d8fa18421..f58c3ac238 100644 --- a/src/apps/mpcresources/text/mplayerc.ro.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ro.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Previne redarea videoclipului când este minimizat" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Opțiuni pentru deschidere" 6 "Forțează un singur proces" 7 "Folosește același player pentru fiecare fișier media" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Afișează timpul de căutare" 38 "Dezactivează meniul ""Deschide Disc""" 39 "Prioritatea procesării peste normal" -40 "Pauză de rețea:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mpcresources/text/mplayerc.ru.rc.txt index dc01122524..76b3ad241f 100644 --- a/src/apps/mpcresources/text/mplayerc.ru.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ru.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Приостанавливать воспроизведение видео при сворачивании окна" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Открывать файлы, используя" 6 "всегда один процесс" 7 "один и тот же процесс для каждого файла" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Показывать время после поиска" 38 "Отключить меню 'Открыть диск'" 39 "Повышенный приоритет процесса" -40 "Тайм-аут соединения:" -43 "сек." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "сек." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sc.rc.txt b/src/apps/mpcresources/text/mplayerc.sc.rc.txt index 5b28abd9b3..18cf1add74 100644 --- a/src/apps/mpcresources/text/mplayerc.sc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化时暂停播放" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "打开选项" 6 "只播放一个文件" 7 "为每个媒体文件使用相同的播放器" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "显示搜索时间" 38 "隐藏打开光盘菜单" 39 "高于普通进程优先级" -40 "网络超时:" -43 "秒" -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "秒" +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sk.rc.txt b/src/apps/mpcresources/text/mplayerc.sk.rc.txt index 1476380f23..a0344f671c 100644 --- a/src/apps/mpcresources/text/mplayerc.sk.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sk.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Otvoriť nastavenia" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Zablokovať menu 'Otvoriť disk'" 39 "Vyššia priorita procesu" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.sv.rc.txt b/src/apps/mpcresources/text/mplayerc.sv.rc.txt index baf6f50dc5..b610e93476 100644 --- a/src/apps/mpcresources/text/mplayerc.sv.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sv.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Pause the video playback when minimized" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Öppna valmöjligheter" 6 "Force a single process" 7 "Use same process for every file" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Show seek time" 38 "Disable 'Open Disc' menu" 39 "Process prioritet högre än normal" -40 "Network timeout:" -43 "sec." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sec." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.tc.rc.txt b/src/apps/mpcresources/text/mplayerc.tc.rc.txt index 6138f9be70..ff644edd29 100644 --- a/src/apps/mpcresources/text/mplayerc.tc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tc.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "最小化時暫停播放" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "開啟選項" 6 "強制單一程式" 7 "所有檔案使用同一處理程序" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "顯示搜尋時間" 38 "停用「開啟光碟」選單" 39 "程式優先順序調成標準以上" -40 "連線逾時:" -43 "秒" -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "秒" +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.tr.rc.txt b/src/apps/mpcresources/text/mplayerc.tr.rc.txt index 344e30e811..2a0691fa6f 100644 --- a/src/apps/mpcresources/text/mplayerc.tr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tr.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Küçültüldüğünde video oynatmayı duraklat" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "Açılış ayarları" 6 "Tek oynatıcı için zorla" 7 "Her dosya için benzer oynatıcı" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Atlama zamanını göster" 38 "Disk Açma özelliğini devre dışı bırak" 39 "İşlem önceliğini normalden yüksek tut" -40 "Ağ zaman aşımı:" -43 "sn." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "sn." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mpcresources/text/mplayerc.ua.rc.txt b/src/apps/mpcresources/text/mplayerc.ua.rc.txt index 5df3505714..c52bd662d7 100644 --- a/src/apps/mpcresources/text/mplayerc.ua.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ua.rc.txt @@ -407,7 +407,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYBACK LINES 38 36 "Призупиняти відтворення відео при згортанні вікна" END -BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 +BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 5 "При відкритті файлів" 6 "Примусовий одновіконний режим" 7 "Використовувати один процес для усіх файлів" @@ -434,10 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 48 37 "Показувати поточну позиц.\тривалість" 38 "Заборонити меню 'Відкрити диск'" 39 "Підвищений пріоритет процесу" -40 "Мережевий тайм-аут:" -43 "сек." -44 "Receiving data (TODO):" -47 "sec." +40 "Network timeouts" +41 "Connection:" +44 "сек." +45 "Receiving data:" +48 "sec." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index d2131b34b4..ef74d000fa 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -148,12 +148,6 @@ BOOL CPPagePlayer::OnInitDialog() m_edtNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); m_spnNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); - // TODO - m_edtNetworkReceiveTimeout.ShowWindow(SW_HIDE); - m_spnNetworkReceiveTimeout.ShowWindow(SW_HIDE); - GetDlgItem(IDC_STATIC4)->ShowWindow(SW_HIDE); - GetDlgItem(IDC_STATIC5)->ShowWindow(SW_HIDE); - UpdateData(FALSE); GetDlgItem(IDC_FILE_POS)->EnableWindow(s.bKeepHistory); diff --git a/src/apps/mplayerc/mplayerc.rc b/src/apps/mplayerc/mplayerc.rc index 3908d8ba33..b486d9b83b 100644 --- a/src/apps/mplayerc/mplayerc.rc +++ b/src/apps/mplayerc/mplayerc.rc @@ -261,14 +261,14 @@ BEGIN CONTROL "Force a single process",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE | WS_GROUP,10,53,105,18 CONTROL "Use same process for every file",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,17,105,18 CONTROL "New process for every file",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | BS_TOP | BS_MULTILINE,10,35,105,18 - LTEXT "Title bar text",IDC_STATIC,10,80,109,8 - COMBOBOX IDC_COMBO1,10,91,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Seek bar text",IDC_STATIC,10,108,100,8 - COMBOBOX IDC_COMBO2,10,119,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Location of settings",IDC_STATIC,5,136,115,55 - CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,149,106,10 - CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,162,106,10 - CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,176,106,10 + LTEXT "Title bar text",IDC_STATIC,10,79,109,8 + COMBOBOX IDC_COMBO1,10,90,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Seek bar text",IDC_STATIC,10,107,100,8 + COMBOBOX IDC_COMBO2,10,118,109,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Location of settings",IDC_STATIC,5,135,115,55 + CONTROL "Windows registry",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON | BS_TOP | WS_GROUP,10,148,106,10 + CONTROL "User profile",IDC_RADIO5,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,161,106,10 + CONTROL "Player folder",IDC_RADIO6,"Button",BS_AUTORADIOBUTTON | BS_TOP,10,175,106,10 GROUPBOX "History",IDC_STATIC,124,5,167,128,WS_GROUP CONTROL "Keep history of recently opened files",IDC_CHECK1, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,17,156,9 @@ -285,21 +285,22 @@ BEGIN CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,129,108,158,1 CONTROL "Display title for URL in recent files",IDC_CHECK4, "Button",BS_AUTOCHECKBOX | BS_TOP | BS_MULTILINE | WS_TABSTOP,129,112,156,17 - GROUPBOX "Other",IDC_STATIC,124,136,167,117,WS_GROUP - CONTROL "Tray icon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,148,156,9 - CONTROL "Show OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,160,156,9 - CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,172,148,9 - CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,184,148,9 - CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,197,156,9 - CONTROL "Process priority above normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,209,156,9 - LTEXT "Network timeout:",IDC_STATIC,129,223,96,8 - EDITTEXT IDC_EDIT2,230,221,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,221,11,13 - LTEXT "sec.",IDC_STATIC,263,223,26,8 - LTEXT "Receiving data (TODO):",IDC_STATIC4,129,239,96,8 - EDITTEXT IDC_EDIT4,230,237,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER - CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,237,12,13 - LTEXT "sec.",IDC_STATIC5,263,239,26,8 + GROUPBOX "Other",IDC_STATIC,124,135,167,84,WS_GROUP + CONTROL "Tray icon",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,147,156,9 + CONTROL "Show OSD",IDC_SHOW_OSD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,159,156,9 + CONTROL "Show name of media file",IDC_CHECK14,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,171,148,9 + CONTROL "Show seek time",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 + CONTROL "Disable 'Open Disc' menu",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 + CONTROL "Process priority above normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 + GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connection:",IDC_STATIC,129,233,96,8 + EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 + LTEXT "sec.",IDC_STATIC,263,233,26,8 + LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER + CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 + LTEXT "sec.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 From 65bd1318bf4d64a90bb6e1325b374093962ec9f7 Mon Sep 17 00:00:00 2001 From: v0lt Date: Fri, 31 May 2024 19:49:44 +0300 Subject: [PATCH 16/57] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=20#pragma?= =?UTF-8?q?=20once=20=D0=B8=D0=B7=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= =?UTF-8?q?=20.cpp.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DSUtil/DXVAState.cpp | 4 +--- src/apps/mplayerc/TorrentInfo.cpp | 4 +--- src/filters/renderer/VideoRenderers/D3DHook.cpp | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/DSUtil/DXVAState.cpp b/src/DSUtil/DXVAState.cpp index 4c2c2537ed..43822dad52 100644 --- a/src/DSUtil/DXVAState.cpp +++ b/src/DSUtil/DXVAState.cpp @@ -1,5 +1,5 @@ /* - * (C) 2017-2022 see Authors.txt + * (C) 2017-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -18,8 +18,6 @@ * */ -#pragma once - #include "stdafx.h" #include "DXVAState.h" #include "apps/mplayerc/mpc_messages.h" diff --git a/src/apps/mplayerc/TorrentInfo.cpp b/src/apps/mplayerc/TorrentInfo.cpp index dc5adacdd2..3657f3f698 100644 --- a/src/apps/mplayerc/TorrentInfo.cpp +++ b/src/apps/mplayerc/TorrentInfo.cpp @@ -1,5 +1,5 @@ /* - * (C) 2019-2023 see Authors.txt + * (C) 2019-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -19,8 +19,6 @@ * using code from TorrentInfo plug-in for FAR 3.0 https://sourceforge.net/projects/farplugs/ */ -#pragma once - #include "stdafx.h" #include "TorrentInfo.h" #include diff --git a/src/filters/renderer/VideoRenderers/D3DHook.cpp b/src/filters/renderer/VideoRenderers/D3DHook.cpp index c3735f399d..0bf50f9d86 100644 --- a/src/filters/renderer/VideoRenderers/D3DHook.cpp +++ b/src/filters/renderer/VideoRenderers/D3DHook.cpp @@ -1,5 +1,5 @@ /* - * (C) 2017-2021 see Authors.txt + * (C) 2017-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -19,8 +19,6 @@ * */ -#pragma once - #include "stdafx.h" #include #include "D3DHook.h" From 5d3bd10866f2530bd87e00d9f802b9da9ee53e1c Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Sat, 1 Jun 2024 10:47:12 +1000 Subject: [PATCH 17/57] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20?= =?UTF-8?q?=D0=B2=D0=B0=D1=80=D0=BD=D0=B8=D0=BD=D0=B3=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B5=20ffmpeg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ExtLib/ffmpeg/ffmpeg.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExtLib/ffmpeg/ffmpeg.mak b/src/ExtLib/ffmpeg/ffmpeg.mak index 09e0663de3..a91ce5454d 100644 --- a/src/ExtLib/ffmpeg/ffmpeg.mak +++ b/src/ExtLib/ffmpeg/ffmpeg.mak @@ -39,7 +39,7 @@ CFLAGS = -I. -I.. -Icompat/atomics/win32 -Icompat/windows \ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DOPJ_STATIC \ -D_WIN32_WINNT=0x0601 -DWINVER=0x0601 \ -fomit-frame-pointer -std=c17 \ - -fno-common -fno-ident -mthreads + -fno-common -fno-ident -mthreads -Wno-discarded-qualifiers YASMFLAGS = -I. -Pconfig.asm ifeq ($(64BIT),yes) @@ -58,7 +58,7 @@ endif ifeq ($(DEBUG),yes) CFLAGS += -DDEBUG -D_DEBUG -g -Og else - CFLAGS += -DNDEBUG -UDEBUG -U_DEBUG -O3 -fno-tree-vectorize + CFLAGS += -DNDEBUG -UDEBUG -U_DEBUG -O3 -fno-tree-vectorize -Wno-stringop-overflow endif # Object directories From dd6c371ec9452f186dbb284a1addfb0028945290 Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Sat, 1 Jun 2024 10:48:46 +1000 Subject: [PATCH 18/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D1=83=D1=81=D1=81=D0=BA=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4.=20=D0=98=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5/=D1=81?= =?UTF-8?q?=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D0=B9=20=D0=BE=D0=BF=D1=86=D0=B8=D0=B8=20"?= =?UTF-8?q?=D0=A1=D0=B5=D1=82=D0=B5=D0=B2=D0=BE=D0=B9=20=D1=82=D0=B0=D0=B9?= =?UTF-8?q?=D0=BC-=D0=B0=D1=83=D1=82=20->=20=D0=A7=D1=82=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85:"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.ru.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.ru.rc.txt | 8 ++++---- src/apps/mplayerc/AppSettings.cpp | 2 ++ src/apps/mplayerc/PPagePlayer.cpp | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.ru.rc b/src/apps/mpcresources/mplayerc.ru.rc index 6c6cca7f19..f450d4d893 100644 --- a/src/apps/mpcresources/mplayerc.ru.rc +++ b/src/apps/mpcresources/mplayerc.ru.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Сетевой тайм-аут",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Открытия:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "сек.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Чтения данных:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "сек.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mpcresources/text/mplayerc.ru.rc.txt index 76b3ad241f..458ef56b7e 100644 --- a/src/apps/mpcresources/text/mplayerc.ru.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ru.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Показывать время после поиска" 38 "Отключить меню 'Открыть диск'" 39 "Повышенный приоритет процесса" -40 "Network timeouts" -41 "Connection:" +40 "Сетевой тайм-аут" +41 "Открытия:" 44 "сек." -45 "Receiving data:" -48 "sec." +45 "Чтения данных:" +48 "сек." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 diff --git a/src/apps/mplayerc/AppSettings.cpp b/src/apps/mplayerc/AppSettings.cpp index 3aebbf11ff..913a586e90 100644 --- a/src/apps/mplayerc/AppSettings.cpp +++ b/src/apps/mplayerc/AppSettings.cpp @@ -628,6 +628,8 @@ void CAppSettings::ResetSettings() iBufferDuration = APP_BUFDURATION_DEF; iNetworkTimeout = APP_NETTIMEOUT_DEF; iNetworkReceiveTimeout = APP_NETRECEIVETIMEOUT_DEF; + http::connectTimeout = iNetworkTimeout * 1000; + http::readTimeout = iNetworkReceiveTimeout * 1000; bAudioMixer = false; nAudioMixerLayout = SPK_STEREO; diff --git a/src/apps/mplayerc/PPagePlayer.cpp b/src/apps/mplayerc/PPagePlayer.cpp index ef74d000fa..a69cfe4603 100644 --- a/src/apps/mplayerc/PPagePlayer.cpp +++ b/src/apps/mplayerc/PPagePlayer.cpp @@ -144,7 +144,7 @@ BOOL CPPagePlayer::OnInitDialog() m_edtNetworkTimeout.SetRange(APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); m_spnNetworkTimeout.SetRange(APP_NETTIMEOUT_MIN, APP_NETTIMEOUT_MAX); - m_edtNetworkReceiveTimeout = s.iNetworkTimeout; + m_edtNetworkReceiveTimeout = s.iNetworkReceiveTimeout; m_edtNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); m_spnNetworkReceiveTimeout.SetRange(APP_NETRECEIVETIMEOUT_MIN, APP_NETRECEIVETIMEOUT_MAX); @@ -272,6 +272,7 @@ BOOL CPPagePlayer::OnApply() s.iRecentFilesNumber = m_edtRecentFiles; s.iNetworkTimeout = m_edtNetworkTimeout; + s.iNetworkReceiveTimeout = m_edtNetworkReceiveTimeout; // Check if the settings location needs to be changed CProfile& profile = AfxGetProfile(); From cb43a396ee70dd353205df426930e48d12846675 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 07:09:01 +0300 Subject: [PATCH 19/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D1=83=D1=81=D1=81=D0=BA=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.ru.rc | 6 +++--- src/apps/mpcresources/text/mplayerc.ru.rc.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.ru.rc b/src/apps/mpcresources/mplayerc.ru.rc index f450d4d893..464ca7ed03 100644 --- a/src/apps/mpcresources/mplayerc.ru.rc +++ b/src/apps/mpcresources/mplayerc.ru.rc @@ -293,12 +293,12 @@ BEGIN CONTROL "Показывать время после поиска",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Отключить меню 'Открыть диск'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Повышенный приоритет процесса",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Сетевой тайм-аут",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Открытия:",IDC_STATIC,129,233,96,8 + GROUPBOX "Сетевые тайм-ауты",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Соединение:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "сек.",IDC_STATIC,263,233,26,8 - LTEXT "Чтения данных:",IDC_STATIC,129,249,96,8 + LTEXT "Получение данных:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 LTEXT "сек.",IDC_STATIC,263,249,26,8 diff --git a/src/apps/mpcresources/text/mplayerc.ru.rc.txt b/src/apps/mpcresources/text/mplayerc.ru.rc.txt index 458ef56b7e..4f3c16745c 100644 --- a/src/apps/mpcresources/text/mplayerc.ru.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ru.rc.txt @@ -434,10 +434,10 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Показывать время после поиска" 38 "Отключить меню 'Открыть диск'" 39 "Повышенный приоритет процесса" -40 "Сетевой тайм-аут" -41 "Открытия:" +40 "Сетевые тайм-ауты" +41 "Соединение:" 44 "сек." -45 "Чтения данных:" +45 "Получение данных:" 48 "сек." END From cdd16d902b02df6751c6dab850cb0f0c6c764711 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 07:12:38 +0300 Subject: [PATCH 20/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=B8=D1=82=D0=B0=D0=B9=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=D0=B9=20(Simplified)=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=20(=D0=B0=D0=B2=D1=82=D0=BE=D1=80=20wushantao).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.sc.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.sc.rc.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.sc.rc b/src/apps/mpcresources/mplayerc.sc.rc index 09aa507eaf..57a6f2ee01 100644 --- a/src/apps/mpcresources/mplayerc.sc.rc +++ b/src/apps/mpcresources/mplayerc.sc.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "显示搜索时间",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "隐藏打开光盘菜单",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "高于普通进程优先级",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "网络超时",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "连接:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "秒",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "接收数据:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "秒",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.sc.rc.txt b/src/apps/mpcresources/text/mplayerc.sc.rc.txt index 18cf1add74..cb8e55c9b0 100644 --- a/src/apps/mpcresources/text/mplayerc.sc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.sc.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "显示搜索时间" 38 "隐藏打开光盘菜单" 39 "高于普通进程优先级" -40 "Network timeouts" -41 "Connection:" +40 "网络超时" +41 "连接:" 44 "秒" -45 "Receiving data:" -48 "sec." +45 "接收数据:" +48 "秒" END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From 4d17790f9b24ec739204782a01bc1279d21af3df Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 13:55:46 +0300 Subject: [PATCH 21/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BD=D0=B5=D0=BC=D0=B5=D1=86=D0=BA=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=20Klaus1189).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.de.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.de.rc.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.de.rc b/src/apps/mpcresources/mplayerc.de.rc index 70b21d93b2..734b82e223 100644 --- a/src/apps/mpcresources/mplayerc.de.rc +++ b/src/apps/mpcresources/mplayerc.de.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Netzwerk-Zeitüberschreitungen:",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Verbindung:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "Sek.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Datenempfang:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "Sek.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mpcresources/text/mplayerc.de.rc.txt index b362b1e683..a860f32013 100644 --- a/src/apps/mpcresources/text/mplayerc.de.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.de.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Verstrichene/Verbleibende Zeit / Gesamtzeit" 38 "Disc-Wiedergabe deaktivieren" 39 "&Prozesspriorität höher als normal" -40 "Network timeouts" -41 "Connection:" +40 "Netzwerk-Zeitüberschreitungen:" +41 "Verbindung:" 44 "Sek." -45 "Receiving data:" -48 "sec." +45 "Datenempfang:" +48 "Sek." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From 7b6c6143f88a57161f772f621474a67ffb5c7768 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 18:16:34 +0300 Subject: [PATCH 22/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20ffmpeg=20git-n7.1-dev-1020-ge0db1f5?= =?UTF-8?q?1d6.=20=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=20=D0=BA=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D0=BE=D0=BC=D0=BD=D1=8B=D0=B9=20=D0=BA=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20libavcodec/dxva2=5Fvp9.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- docs/custom_code/ffmpeg.txt | 1 - src/ExtLib/ffmpeg/libavcodec/diracdec.c | 14 +- src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c | 8 +- src/ExtLib/ffmpeg/libavcodec/h2645_sei.c | 8 +- src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c | 122 +++++++++--------- src/ExtLib/ffmpeg/libavcodec/packet.h | 4 - .../ffmpeg/libavcodec/sbrdsp_template.c | 6 + src/ExtLib/ffmpeg/libavcodec/vc1_block.c | 5 - src/ExtLib/ffmpeg/libavcodec/vlc.c | 2 +- src/ExtLib/ffmpeg/libavcodec/vp8dsp.c | 4 + src/ExtLib/ffmpeg/libavcodec/vp8dsp.h | 2 + src/ExtLib/ffmpeg/libavcodec/vp9.c | 6 + src/ExtLib/ffmpeg/libavcodec/vvc/refs.c | 11 +- .../ffmpeg/libavcodec/x86/vvc/vvc_alf.asm | 11 +- .../ffmpeg/libavcodec/x86/vvc/vvc_sad.asm | 5 +- src/ExtLib/ffmpeg/libavutil/random_seed.c | 6 +- src/ExtLib/ffmpeg/libswscale/x86/swscale.c | 14 +- src/ExtLib/ffmpeg/libswscale/yuv2rgb.c | 2 +- 20 files changed, 126 insertions(+), 109 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 582299008d..885b686505 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -6,7 +6,7 @@ MPCVideoDec Декодирование VVC сделано с помощью vvdec (https://github.com/fraunhoferhhi/vvdec). Обновлены библиотеки: - ffmpeg git-n7.1-dev-922-ge9197db4f7; + ffmpeg git-n7.1-dev-1020-ge0db1f51d6; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 561d9dfbd3..29649fffe3 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -6,7 +6,7 @@ MPCVideoDec VVC decoding is done using vvdec (https://github.com/fraunhoferhhi/vvdec). Updated libraries: - ffmpeg git-n7.1-dev-922-ge9197db4f7; + ffmpeg git-n7.1-dev-1020-ge0db1f51d6; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/custom_code/ffmpeg.txt b/docs/custom_code/ffmpeg.txt index c605e59232..77383076aa 100644 --- a/docs/custom_code/ffmpeg.txt +++ b/docs/custom_code/ffmpeg.txt @@ -19,7 +19,6 @@ * libavcodec/dxva2.c * libavcodec/dxva2_hevc.c * libavcodec/dxva2_internal.h -* libavcodec/dxva2_vp9.c * libavcodec/h264_refs.c * libavcodec/h264_slice.c * libavcodec/h264dec.c diff --git a/src/ExtLib/ffmpeg/libavcodec/diracdec.c b/src/ExtLib/ffmpeg/libavcodec/diracdec.c index 3a36479c59..76209aebba 100644 --- a/src/ExtLib/ffmpeg/libavcodec/diracdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/diracdec.c @@ -351,7 +351,7 @@ static int alloc_buffers(DiracContext *s, int stride) return 0; } -static void free_sequence_buffers(DiracContext *s) +static av_cold void free_sequence_buffers(DiracContext *s) { int i, j, k; @@ -403,11 +403,8 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx) for (i = 0; i < MAX_FRAMES; i++) { s->all_frames[i].avframe = av_frame_alloc(); - if (!s->all_frames[i].avframe) { - while (i > 0) - av_frame_free(&s->all_frames[--i].avframe); + if (!s->all_frames[i].avframe) return AVERROR(ENOMEM); - } } ret = ff_thread_once(&dirac_arith_init, ff_dirac_init_arith_tables); if (ret != 0) @@ -416,7 +413,7 @@ static av_cold int dirac_decode_init(AVCodecContext *avctx) return 0; } -static void dirac_decode_flush(AVCodecContext *avctx) +static av_cold void dirac_decode_flush(AVCodecContext *avctx) { DiracContext *s = avctx->priv_data; free_sequence_buffers(s); @@ -429,7 +426,9 @@ static av_cold int dirac_decode_end(AVCodecContext *avctx) DiracContext *s = avctx->priv_data; int i; - dirac_decode_flush(avctx); + // Necessary in case dirac_decode_init() failed + if (s->all_frames[MAX_FRAMES - 1].avframe) + free_sequence_buffers(s); for (i = 0; i < MAX_FRAMES; i++) av_frame_free(&s->all_frames[i].avframe); @@ -2371,4 +2370,5 @@ const FFCodec ff_dirac_decoder = { FF_CODEC_DECODE_CB(dirac_decode_frame), .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_DR1, .flush = dirac_decode_flush, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c b/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c index 2126966353..f32933786e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2_vp9.c @@ -120,12 +120,8 @@ int ff_dxva2_vp9_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACont /* segmentation data */ pp->stVP9Segments.wSegmentInfoFlags = (h->h.segmentation.enabled << 0) | -// ==> Start patch MPC - ((h->h.segmentation.enabled && h->h.segmentation.update_map) << 1) | - ((h->h.segmentation.enabled && h->h.segmentation.temporal) << 2) | - //(h->h.segmentation.update_map << 1) | - //(h->h.segmentation.temporal << 2) | -// ==> End patch MPC + (h->h.segmentation.update_map << 1) | + (h->h.segmentation.temporal << 2) | (h->h.segmentation.absolute_vals << 3) | (0 << 4); /* ReservedSegmentFlags4Bits */ diff --git a/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c b/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c index 1deb76c765..7c83747cd0 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c +++ b/src/ExtLib/ffmpeg/libavcodec/h2645_sei.c @@ -619,11 +619,15 @@ static int h2645_sei_to_side_data(AVCodecContext *avctx, H2645SEI *sei, metadata->min_luminance.num = sei->mastering_display.min_luminance; metadata->min_luminance.den = luma_den; - metadata->has_luminance &= sei->mastering_display.min_luminance >= 1 && - sei->mastering_display.min_luminance <= 50000 && + metadata->has_luminance &= sei->mastering_display.min_luminance <= 50000 && sei->mastering_display.min_luminance < sei->mastering_display.max_luminance; + /* Real (blu-ray) releases in the wild come with minimum luminance + * values of 0.000 cd/m2, so permit this edge case */ + if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) + metadata->has_luminance &= sei->mastering_display.min_luminance >= 1; + if (metadata->has_luminance || metadata->has_primaries) av_log(avctx, AV_LOG_DEBUG, "Mastering Display Metadata:\n"); if (metadata->has_primaries) { diff --git a/src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c b/src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c index fa704b665e..eba0936089 100644 --- a/src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c @@ -196,7 +196,7 @@ static void jpeg2000_bitbuf_refill_forward(StateVars *buffer, const uint8_t *arr while (buffer->bits_left < 32) { buffer->tmp = 0xFF; buffer->bits = (buffer->last == 0xFF) ? 7 : 8; - if (buffer->pos <= length) { + if (buffer->pos < length) { buffer->tmp = array[buffer->pos]; buffer->pos += 1; buffer->last = buffer->tmp; @@ -413,7 +413,7 @@ static void recover_mag_sgn(StateVars *mag_sgn, uint8_t pos, uint16_t q, int32_t static int jpeg2000_import_bit(StateVars *stream, const uint8_t *array, uint32_t length) { - int cond = stream->pos <= length; + int cond = stream->pos < length; int pos = FFMIN(stream->pos, length); if (stream->bits == 0) { stream->bits = (stream->tmp == 0xFF) ? 7 : 8; @@ -427,7 +427,7 @@ static int jpeg2000_import_bit(StateVars *stream, const uint8_t *array, uint32_t static int jpeg2000_peek_bit(StateVars *stream, const uint8_t *array, uint32_t length) { if (stream->bits == 0) { - int cond = stream->pos <= length; + int cond = stream->pos < length; int pos = FFMIN(stream->pos, length); stream->bits = (stream->tmp == 0xFF) ? 7 : 8; stream->pos += cond; @@ -508,17 +508,17 @@ static int jpeg2000_decode_sig_emb(const Jpeg2000DecoderContext *s, MelDecoderSt } av_always_inline -static int jpeg2000_get_state(int x1, int x2, int width, int shift_by, +static int jpeg2000_get_state(int x1, int x2, int stride, int shift_by, const uint8_t *block_states) { - return (block_states[(x1 + 1) * (width + 2) + (x2 + 1)] >> shift_by) & 1; + return (block_states[(x1 + 1) * stride + (x2 + 1)] >> shift_by) & 1; } av_always_inline -static void jpeg2000_modify_state(int x1, int x2, int width, - int value, uint8_t *block_states) +static void jpeg2000_modify_state(int x1, int x2, int stride, + int value, uint8_t *block_states) { - block_states[(x1 + 1) * (width + 2) + (x2 + 1)] |= value; + block_states[(x1 + 1) * stride + (x2 + 1)] |= value; } av_always_inline @@ -528,8 +528,8 @@ static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, StateVars *mel_stream, StateVars *vlc_stream, StateVars *mag_sgn_stream, const uint8_t *Dcup, uint32_t Lcup, uint32_t Pcup, uint8_t pLSB, - int width, int height, int32_t *sample_buf, - uint8_t *block_states) + int width, int height, const int stride, + int32_t *sample_buf, uint8_t *block_states) { uint16_t q = 0; // Represents current quad position uint16_t q1, q2; @@ -958,26 +958,26 @@ static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, j1 = 2 * y; j2 = 2 * x; - sample_buf[j2 + (j1 * width)] = (int32_t)*mu; - jpeg2000_modify_state(j1, j2, width, *sigma, block_states); + sample_buf[j2 + (j1 * stride)] = (int32_t)*mu; + jpeg2000_modify_state(j1, j2, stride, *sigma, block_states); sigma += 1; mu += 1; x1 = y != quad_height - 1 || is_border_y == 0; - sample_buf[j2 + ((j1 + 1) * width)] = ((int32_t)*mu) * x1; - jpeg2000_modify_state(j1 + 1, j2, width, (*sigma) * x1, block_states); + sample_buf[j2 + ((j1 + 1) * stride)] = ((int32_t)*mu) * x1; + jpeg2000_modify_state(j1 + 1, j2, stride, (*sigma) * x1, block_states); sigma += 1; mu += 1; x2 = x != quad_width - 1 || is_border_x == 0; - sample_buf[(j2 + 1) + (j1 * width)] = ((int32_t)*mu) * x2; - jpeg2000_modify_state(j1, j2 + 1, width, (*sigma) * x2, block_states); + sample_buf[(j2 + 1) + (j1 * stride)] = ((int32_t)*mu) * x2; + jpeg2000_modify_state(j1, j2 + 1, stride, (*sigma) * x2, block_states); sigma += 1; mu += 1; x3 = x1 | x2; - sample_buf[(j2 + 1) + (j1 + 1) * width] = ((int32_t)*mu) * x3; - jpeg2000_modify_state(j1 + 1, j2 + 1, width, (*sigma) * x3, block_states); + sample_buf[(j2 + 1) + (j1 + 1) * stride] = ((int32_t)*mu) * x3; + jpeg2000_modify_state(j1 + 1, j2 + 1, stride, (*sigma) * x3, block_states); sigma += 1; mu += 1; } @@ -992,39 +992,39 @@ static int jpeg2000_decode_ht_cleanup_segment(const Jpeg2000DecoderContext *s, static void jpeg2000_calc_mbr(uint8_t *mbr, const uint16_t i, const uint16_t j, const uint32_t mbr_info, uint8_t causal_cond, - uint8_t *block_states, int width) + uint8_t *block_states, int stride) { int local_mbr = 0; - local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SIGMA, block_states); - local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_SIGMA, block_states); - local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j - 1, stride, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, stride, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, stride, HT_SHIFT_SIGMA, block_states); - local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SIGMA, block_states); - local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j - 1, stride, HT_SHIFT_SIGMA, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, stride, HT_SHIFT_SIGMA, block_states); - local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; - local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SIGMA, block_states) * causal_cond; - local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j - 1, stride, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, stride, HT_SHIFT_SIGMA, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, stride, HT_SHIFT_SIGMA, block_states) * causal_cond; - local_mbr |= jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); - local_mbr |= jpeg2000_get_state(i - 1, j + 0, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i - 1, j - 1, width, HT_SHIFT_SCAN, block_states); - local_mbr |= jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i - 1, j + 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j - 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, stride, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 0, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j - 1, stride, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i - 1, j + 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i - 1, j + 1, stride, HT_SHIFT_SCAN, block_states); - local_mbr |= jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i + 0, j - 1, width, HT_SHIFT_SCAN, block_states); - local_mbr |= jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i + 0, j + 1, width, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j - 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j - 1, stride, HT_SHIFT_SCAN, block_states); + local_mbr |= jpeg2000_get_state(i + 0, j + 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 0, j + 1, stride, HT_SHIFT_SCAN, block_states); - local_mbr |= jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i + 1, j - 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; - local_mbr |= jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i + 1, j + 0, width, HT_SHIFT_SCAN, block_states) * causal_cond; - local_mbr |= jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_REF, block_states) * - jpeg2000_get_state(i + 1, j + 1, width, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j - 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j - 1, stride, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 0, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 0, stride, HT_SHIFT_SCAN, block_states) * causal_cond; + local_mbr |= jpeg2000_get_state(i + 1, j + 1, stride, HT_SHIFT_REF, block_states) * + jpeg2000_get_state(i + 1, j + 1, stride, HT_SHIFT_SCAN, block_states) * causal_cond; *mbr |= local_mbr; } @@ -1040,18 +1040,18 @@ static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s int modify_state, cond; uint8_t bit; uint8_t causal_cond = i != (i_s + height - 1); - int32_t *sp = &sample_buf[j + (i * (stride - 2))]; + int32_t *sp = &sample_buf[j + (i * (stride))]; uint8_t mbr = 0; if (jpeg2000_get_state(i, j, stride - 2, HT_SHIFT_SIGMA, block_states) == 0) - jpeg2000_calc_mbr(&mbr, i, j, mbr_info & 0x1EF, causal_cond, block_states, stride - 2); + jpeg2000_calc_mbr(&mbr, i, j, mbr_info & 0x1EF, causal_cond, block_states, stride); mbr_info >>= 3; cond = mbr != 0; bit = jpeg2000_peek_bit(sig_prop, magref_segment, magref_length); *sp |= (bit * cond) << pLSB; sig_prop->bits -= cond; modify_state = (((1 << HT_SHIFT_REF_IND) | (1 << HT_SHIFT_REF)) * cond) | 1 << HT_SHIFT_SCAN; - jpeg2000_modify_state(i, j, stride - 2, modify_state, block_states); + jpeg2000_modify_state(i, j, stride, modify_state, block_states); } } } @@ -1060,8 +1060,8 @@ static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.4. */ av_noinline -static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, - uint16_t height, uint8_t *magref_segment, +static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, uint16_t height, + const int stride, uint8_t *magref_segment, uint32_t magref_length, uint8_t pLSB, int32_t *sample_buf, uint8_t *block_states) { @@ -1071,7 +1071,6 @@ static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, const uint16_t num_h_stripe = width / 4; int b_width = 4; int b_height = 4; - int stride = width + 2; int last_width; uint16_t i = 0, j = 0; @@ -1114,7 +1113,7 @@ static void jpeg2000_decode_sigprop_segment(Jpeg2000Cblk *cblk, uint16_t width, * See procedure decodeSigPropMag at Rec. ITU-T T.814, 7.5. */ static int -jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, +jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, const int stride, uint8_t *magref_segment,uint32_t magref_length, uint8_t pLSB, int32_t *sample_buf, uint8_t *block_states) { @@ -1134,7 +1133,7 @@ jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, * We move column wise, going from one quad to another. See * Rec. ITU-T T.814, Figure 7. */ - sp = &sample_buf[j + i * width]; + sp = &sample_buf[j + i * stride]; if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; @@ -1146,7 +1145,7 @@ jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, height = block_height % 4; for (int j = 0; j < width; j++) { for (int i = i_start; i < i_start + height; i++) { - sp = &sample_buf[j + i * width]; + sp = &sample_buf[j + i * stride]; if (jpeg2000_get_state(i, j, width, HT_SHIFT_SIGMA, block_states) != 0) { jpeg2000_modify_state(i, j, width, 1 << HT_SHIFT_REF_IND, block_states); *sp |= jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length) << pLSB; @@ -1194,6 +1193,9 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c int32_t M_b = magp; + const int quad_buf_width = width + 4; + const int quad_buf_height = height + 4; + /* codeblock size as constrained by Rec. ITU-T T.800, Table A.18 */ av_assert0(width <= 1024U && height <= 1024U); av_assert0(width * height <= 4096); @@ -1261,23 +1263,23 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c jpeg2000_init_mel_decoder(&mel_state); - sample_buf = av_calloc((width + 4) * (height + 4), sizeof(int32_t)); - block_states = av_calloc((width + 4) * (height + 4), sizeof(uint8_t)); + sample_buf = av_calloc(quad_buf_width * quad_buf_height, sizeof(int32_t)); + block_states = av_calloc(quad_buf_width * quad_buf_height, sizeof(uint8_t)); if (!sample_buf || !block_states) { ret = AVERROR(ENOMEM); goto free; } if ((ret = jpeg2000_decode_ht_cleanup_segment(s, cblk, t1, &mel_state, &mel, &vlc, - &mag_sgn, Dcup, Lcup, Pcup, pLSB, width, - height, sample_buf, block_states)) < 0) { + &mag_sgn, Dcup, Lcup, Pcup, pLSB, width, + height, quad_buf_width, sample_buf, block_states)) < 0) { av_log(s->avctx, AV_LOG_ERROR, "Bad HT cleanup segment\n"); goto free; } if (cblk->npasses > 1) - jpeg2000_decode_sigprop_segment(cblk, width, height, Dref, Lref, - pLSB - 1, sample_buf, block_states); + jpeg2000_decode_sigprop_segment(cblk, width, height, quad_buf_width, Dref, Lref, + pLSB - 1, sample_buf, block_states); if (cblk->npasses > 2) { @@ -1286,7 +1288,7 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c ret = AVERROR_INVALIDDATA; goto free; } - if ((ret = jpeg2000_decode_magref_segment(width, height, Dref, Lref, + if ((ret = jpeg2000_decode_magref_segment(width, height, quad_buf_width, Dref, Lref, pLSB - 1, sample_buf, block_states)) < 0) goto free; } @@ -1297,7 +1299,7 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *c for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { n = x + (y * t1->stride); - val = sample_buf[x + (y * width)]; + val = sample_buf[x + (y * quad_buf_width)]; /* Convert sign-magnitude to two's complement. */ val = val >> 31 ? 0x80000000 - val : val; val >>= (pLSB - 1); diff --git a/src/ExtLib/ffmpeg/libavcodec/packet.h b/src/ExtLib/ffmpeg/libavcodec/packet.h index a9a41576da..f05deb7950 100644 --- a/src/ExtLib/ffmpeg/libavcodec/packet.h +++ b/src/ExtLib/ffmpeg/libavcodec/packet.h @@ -59,10 +59,6 @@ enum AVPacketSideDataType { * An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows: * @code * u32le param_flags - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) - * s32le channel_count - * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) - * u64le channel_layout * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE) * s32le sample_rate * if (param_flags & AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS) diff --git a/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c b/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c index 57d8fde1fe..27b9dd299d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c @@ -371,4 +371,10 @@ const attribute_visibility_hidden DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sb {Q31( 0.14130051758487f), Q31(-0.95090983575689f)}, {Q31(-0.47005496701697f), Q31(-0.37340549728647f)}, {Q31( 0.80705063769351f), Q31( 0.29653668284408f)}, {Q31(-0.38981478896926f), Q31( 0.89572605717087f)}, {Q31(-0.01053049862020f), Q31(-0.66959058036166f)}, {Q31(-0.91266367957293f), Q31(-0.11522938140034f)}, +#if ARCH_RISCV +{Q31( 0.54840422910309f), Q31( 0.75221367176302f)}, {Q31( 0.40009252867955f), Q31(-0.98929400334421f)}, +{Q31(-0.99867974711855f), Q31(-0.88147068645358f)}, {Q31(-0.95531076805040f), Q31( 0.90908757154593f)}, +{Q31(-0.45725933317144f), Q31(-0.56716323646760f)}, {Q31(-0.72929675029275f), Q31(-0.98008272727324f)}, +{Q31( 0.75622801399036f), Q31( 0.20950329995549f)}, {Q31( 0.07069442601050f), Q31(-0.78247898470706f)}, +#endif }; diff --git a/src/ExtLib/ffmpeg/libavcodec/vc1_block.c b/src/ExtLib/ffmpeg/libavcodec/vc1_block.c index a6ee4922f9..322acebfe5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vc1_block.c +++ b/src/ExtLib/ffmpeg/libavcodec/vc1_block.c @@ -1607,10 +1607,6 @@ static int vc1_decode_p_mb_intfr(VC1Context *v) if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY)) continue; v->vc1dsp.vc1_inv_trans_8x8(v->block[v->cur_blk_idx][block_map[i]]); - if (i < 4) - off = (fieldtx) ? ((i & 1) * 8) + ((i & 2) >> 1) * s->linesize : (i & 1) * 8 + 4 * (i & 2) * s->linesize; - else - off = 0; block_cbp |= 0xf << (i << 2); } @@ -1775,7 +1771,6 @@ static int vc1_decode_p_mb_intfi(VC1Context *v) if (CONFIG_GRAY && (i > 3) && (s->avctx->flags & AV_CODEC_FLAG_GRAY)) continue; v->vc1dsp.vc1_inv_trans_8x8(v->block[v->cur_blk_idx][block_map[i]]); - off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize); block_cbp |= 0xf << (i << 2); } } else { diff --git a/src/ExtLib/ffmpeg/libavcodec/vlc.c b/src/ExtLib/ffmpeg/libavcodec/vlc.c index ee09d96fd6..f46ecbb55e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vlc.c +++ b/src/ExtLib/ffmpeg/libavcodec/vlc.c @@ -529,7 +529,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int multi->table = av_malloc(sizeof(*multi->table) << nb_bits); if (!multi->table) - return AVERROR(ENOMEM); + goto fail; j = code = 0; for (int i = 0; i < nb_codes; i++, lens += lens_wrap) { diff --git a/src/ExtLib/ffmpeg/libavcodec/vp8dsp.c b/src/ExtLib/ffmpeg/libavcodec/vp8dsp.c index 8624c3ae15..88bb67f78d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vp8dsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/vp8dsp.c @@ -712,6 +712,10 @@ av_cold void ff_vp7dsp_init(VP8DSPContext *dsp) dsp->vp8_v_loop_filter_simple = vp7_v_loop_filter_simple_c; dsp->vp8_h_loop_filter_simple = vp7_h_loop_filter_simple_c; + +#if ARCH_RISCV + ff_vp7dsp_init_riscv(dsp); +#endif } #endif /* CONFIG_VP7_DECODER */ diff --git a/src/ExtLib/ffmpeg/libavcodec/vp8dsp.h b/src/ExtLib/ffmpeg/libavcodec/vp8dsp.h index 3bf12b6b45..e3de2e0494 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vp8dsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/vp8dsp.h @@ -90,6 +90,8 @@ void ff_vp78dsp_init_ppc(VP8DSPContext *c); void ff_vp78dsp_init_riscv(VP8DSPContext *c); void ff_vp78dsp_init_x86(VP8DSPContext *c); +void ff_vp7dsp_init_riscv(VP8DSPContext *c); + void ff_vp8dsp_init(VP8DSPContext *c); void ff_vp8dsp_init_aarch64(VP8DSPContext *c); void ff_vp8dsp_init_arm(VP8DSPContext *c); diff --git a/src/ExtLib/ffmpeg/libavcodec/vp9.c b/src/ExtLib/ffmpeg/libavcodec/vp9.c index 8b2a1160af..0c039d4e70 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vp9.c +++ b/src/ExtLib/ffmpeg/libavcodec/vp9.c @@ -709,6 +709,12 @@ static int decode_frame_header(AVCodecContext *avctx, s->s.h.segmentation.feat[i].skip_enabled = get_bits1(&s->gb); } } + } else { + // Reset fields under segmentation switch if segmentation is disabled. + // This is necessary because some hwaccels don't ignore these fields + // if segmentation is disabled. + s->s.h.segmentation.temporal = 0; + s->s.h.segmentation.update_map = 0; } // set qmul[] based on Y/UV, AC/DC and segmentation Q idx deltas diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c b/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c index fb42963034..8b7ba639a3 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/refs.c @@ -506,9 +506,14 @@ int ff_vvc_slice_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc) return ret; } } - if ((!rsh->sh_collocated_from_l0_flag) == lx && - rsh->sh_collocated_ref_idx < rpl->nb_refs) - fc->ref->collocated_ref = rpl->refs[rsh->sh_collocated_ref_idx].ref; + if (ph->r->ph_temporal_mvp_enabled_flag && + (!rsh->sh_collocated_from_l0_flag) == lx && + rsh->sh_collocated_ref_idx < rpl->nb_refs) { + const VVCRefPic *refp = rpl->refs + rsh->sh_collocated_ref_idx; + if (refp->is_scaled || refp->ref->sps->ctb_log2_size_y != sps->ctb_log2_size_y) + return AVERROR_INVALIDDATA; + fc->ref->collocated_ref = refp->ref; + } } return 0; } diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm index 71e821c27b..b35dd9b0e9 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm +++ b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_alf.asm @@ -356,7 +356,8 @@ SECTION .text FILTER_VB xq - paddw m0, m2 + ; sum += curr + paddsw m0, m2 ; clip to pixel CLIPW m0, m14, m15 @@ -408,7 +409,7 @@ cglobal vvc_alf_filter_%2_%1bpc, 11, 15, 16, 0-0x28, dst, dst_stride, src, src_s .loop: push srcq push dstq - xor xd, xd + xor xq, xq .loop_w: LOAD_PARAMS @@ -416,8 +417,8 @@ cglobal vvc_alf_filter_%2_%1bpc, 11, 15, 16, 0-0x28, dst, dst_stride, src, src_s add srcq, 16 * ps add dstq, 16 * ps - add xd, 16 - cmp xd, widthd + add xq, 16 + cmp xq, widthq jl .loop_w pop dstq @@ -426,7 +427,7 @@ cglobal vvc_alf_filter_%2_%1bpc, 11, 15, 16, 0-0x28, dst, dst_stride, src, src_s lea dstq, [dstq + 4 * dst_strideq] lea filterq, [filterq + 2 * strideq] - lea clipq, [clipq + 2 * strideq] + lea clipq, [clipq + 2 * strideq] sub vb_posq, 4 sub heightq, 4 diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm index b468d89ac2..982951a370 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm +++ b/src/ExtLib/ffmpeg/libavcodec/x86/vvc/vvc_sad.asm @@ -29,6 +29,7 @@ SECTION_RODATA pw_1: times 2 dw 1 ; DMVR SAD is only calculated on even rows to reduce complexity +; Additionally the only valid sizes are 8x16, 16x8, and 16x16 SECTION .text %macro MIN_MAX_SAD 3 @@ -77,7 +78,7 @@ cglobal vvc_sad, 6, 9, 5, src1, src2, dx, dy, block_w, block_h, off1, off2, row_ vpbroadcastd m4, [pw_1] cmp block_wd, 16 - jge vvc_sad_16_128 + je vvc_sad_16 vvc_sad_8: .loop_height: @@ -100,7 +101,7 @@ cglobal vvc_sad, 6, 9, 5, src1, src2, dx, dy, block_w, block_h, off1, off2, row_ movd eax, xm0 RET - vvc_sad_16_128: + vvc_sad_16: sar block_wd, 4 .loop_height: mov off1q, src1q diff --git a/src/ExtLib/ffmpeg/libavutil/random_seed.c b/src/ExtLib/ffmpeg/libavutil/random_seed.c index 77bd9cc4ea..abe04a9d3a 100644 --- a/src/ExtLib/ffmpeg/libavutil/random_seed.c +++ b/src/ExtLib/ffmpeg/libavutil/random_seed.c @@ -158,10 +158,10 @@ int av_random_bytes(uint8_t* buf, size_t len) #elif CONFIG_OPENSSL if (RAND_bytes(buf, len) == 1) return 0; - err = AVERROR_EXTERNAL; -#endif - + return AVERROR_EXTERNAL; +#else return err; +#endif } uint32_t av_get_random_seed(void) diff --git a/src/ExtLib/ffmpeg/libswscale/x86/swscale.c b/src/ExtLib/ffmpeg/libswscale/x86/swscale.c index ff16398988..fff8bb4396 100644 --- a/src/ExtLib/ffmpeg/libswscale/x86/swscale.c +++ b/src/ExtLib/ffmpeg/libswscale/x86/swscale.c @@ -649,7 +649,7 @@ switch(c->dstBpc){ \ } -#define INPUT_PLANER_RGB_A_FUNC_CASE(fmt, name, opt) \ +#define INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(fmt, name, opt) \ case fmt: \ c->readAlpPlanar = ff_planar_##name##_to_a_##opt; @@ -672,15 +672,15 @@ switch(c->dstBpc){ \ break; #define INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE, name##le, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE, name##be, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGBAXX_UVA_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##LE, name##le, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##LE, name##le, opt) \ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##LE, name##le, opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE(rgba_fmt##BE, name##be, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(rgba_fmt##BE, name##be, opt) \ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGBAXX_YUV_FUNC_CASE(rgb_fmt, rgba_fmt, name, opt) \ @@ -696,7 +696,7 @@ switch(c->dstBpc){ \ INPUT_PLANER_RGB_UV_FUNC_CASE(rgb_fmt##BE, name##be, opt) #define INPUT_PLANER_RGB_YUVA_ALL_CASES(opt) \ - INPUT_PLANER_RGB_A_FUNC_CASE( AV_PIX_FMT_GBRAP, rgb, opt) \ + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, opt) \ INPUT_PLANER_RGB_YUV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, opt) \ INPUT_PLANER_RGBXX_YUV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, opt) \ INPUT_PLANER_RGBAXX_YUVA_FUNC_CASE(AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, opt) \ @@ -708,7 +708,7 @@ switch(c->dstBpc){ \ if (EXTERNAL_SSE2(cpu_flags)) { switch (c->srcFormat) { - INPUT_PLANER_RGB_A_FUNC_CASE( AV_PIX_FMT_GBRAP, rgb, sse2); + INPUT_PLANER_RGB_A_FUNC_CASE_NOBREAK(AV_PIX_FMT_GBRAP, rgb, sse2); INPUT_PLANER_RGB_UV_FUNC_CASE( AV_PIX_FMT_GBRP, rgb, sse2); INPUT_PLANER_RGBXX_UV_FUNC_CASE( AV_PIX_FMT_GBRP9, rgb9, sse2); INPUT_PLANER_RGBAXX_UVA_FUNC_CASE( AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10, rgb10, sse2); diff --git a/src/ExtLib/ffmpeg/libswscale/yuv2rgb.c b/src/ExtLib/ffmpeg/libswscale/yuv2rgb.c index 2b2358d2cc..c1d6236f37 100644 --- a/src/ExtLib/ffmpeg/libswscale/yuv2rgb.c +++ b/src/ExtLib/ffmpeg/libswscale/yuv2rgb.c @@ -830,7 +830,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], cbu = (cbu * contrast * saturation) >> 32; cgu = (cgu * contrast * saturation) >> 32; cgv = (cgv * contrast * saturation) >> 32; - oy -= 256 * brightness; + oy -= 256LL * brightness; c->uOffset = 0x0400040004000400LL; c->vOffset = 0x0400040004000400LL; From 58431f188d578dd045842cbcb263d2a2906d809e Mon Sep 17 00:00:00 2001 From: cumhur Date: Sat, 1 Jun 2024 17:33:32 +0300 Subject: [PATCH 23/57] Update mplayerc.tr.rc.txt --- src/apps/mpcresources/text/mplayerc.tr.rc.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/mpcresources/text/mplayerc.tr.rc.txt b/src/apps/mpcresources/text/mplayerc.tr.rc.txt index 2a0691fa6f..9d193686b8 100644 --- a/src/apps/mpcresources/text/mplayerc.tr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tr.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Atlama zamanını göster" 38 "Disk Açma özelliğini devre dışı bırak" 39 "İşlem önceliğini normalden yüksek tut" -40 "Network timeouts" -41 "Connection:" +40 "Ağ zaman aşımları" +41 "Bağlantı:" 44 "sn." -45 "Receiving data:" -48 "sec." +45 "Veri alma:" +48 "sn." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From 5479086612d31fcc48399a0b8b4335066707bd4d Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 19:22:50 +0300 Subject: [PATCH 24/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=82=D1=83=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=20cmhrky).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.tr.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.tr.rc b/src/apps/mpcresources/mplayerc.tr.rc index 308468d191..db6f6423e7 100644 --- a/src/apps/mpcresources/mplayerc.tr.rc +++ b/src/apps/mpcresources/mplayerc.tr.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "Atlama zamanını göster",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Disk Açma özelliğini devre dışı bırak",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "İşlem önceliğini normalden yüksek tut",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Ağ zaman aşımları",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Bağlantı:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "sn.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Veri alma:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "sn.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 From f4601e3f6a947fb9f116a65765241724331bb6ca Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 1 Jun 2024 21:43:57 +0300 Subject: [PATCH 25/57] =?UTF-8?q?=D0=9F=D1=80=D0=B8=20=D1=81=D0=BE=D1=85?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B7=D0=B2=D1=83=D0=BA=D0=B0=20Opus=20?= =?UTF-8?q?=D1=81=20=D0=AE=D1=82=D1=83=D0=B1=D0=B0=20=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5=D0=BC=20=D0=BA=20=D0=B0=D1=83?= =?UTF-8?q?=D0=B4=D0=B8=D0=BE=D1=84=D0=B0=D0=B9=D0=BB=D1=83=20=D0=BE=D0=B1?= =?UTF-8?q?=D0=BB=D0=BE=D0=B6=D0=BA=D1=83=20=D1=81=20=D0=BF=D0=BE=D0=BC?= =?UTF-8?q?=D0=BE=D1=89=D1=8C=D1=8E=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF?= =?UTF-8?q?=D0=BD=D0=BE=D0=B3=D0=BE=20FFmpeg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/MainFrm.cpp | 2 +- src/apps/mplayerc/PlayerYouTube.h | 8 ++++---- src/apps/mplayerc/SaveTaskDlg.cpp | 19 +++++++++++++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/apps/mplayerc/MainFrm.cpp b/src/apps/mplayerc/MainFrm.cpp index ba3251f195..20b920876a 100644 --- a/src/apps/mplayerc/MainFrm.cpp +++ b/src/apps/mplayerc/MainFrm.cpp @@ -6056,7 +6056,7 @@ void CMainFrame::OnFileSaveAs() if (m_youtubeFields.fname.GetLength()) { if (m_bAudioOnly) { saveItems.emplace_back('a', in, GetAltFileName(), ""); - if (ext == L".m4a") { + if (ext == L".m4a" || ext == L".mka") { auto thumbnail_ext = m_youtubeFields.thumbnailUrl.Mid(m_youtubeFields.thumbnailUrl.ReverseFind('.')).MakeLower(); if (thumbnail_ext == L".jpg" || thumbnail_ext == L".webp") { saveItems.emplace_back('t', m_youtubeFields.thumbnailUrl, thumbnail_ext, ""); diff --git a/src/apps/mplayerc/PlayerYouTube.h b/src/apps/mplayerc/PlayerYouTube.h index e69384f785..8b62aa20d3 100644 --- a/src/apps/mplayerc/PlayerYouTube.h +++ b/src/apps/mplayerc/PlayerYouTube.h @@ -1,5 +1,5 @@ /* - * (C) 2012-2023 see Authors.txt + * (C) 2012-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -133,9 +133,9 @@ namespace Youtube {140, y_mp4_aac, y_audio, 128, L"m4a"}, {139, y_mp4_aac, y_audio, 48, L"m4a"}, // may be outdated and no longer supported // Opus - {251, y_webm_aud, y_audio, 160, L"webm"}, - {250, y_webm_aud, y_audio, 70, L"webm"}, - {249, y_webm_aud, y_audio, 50, L"webm"}, + {251, y_webm_aud, y_audio, 160, L"mka"}, + {250, y_webm_aud, y_audio, 70, L"mka"}, + {249, y_webm_aud, y_audio, 50, L"mka"}, // Vorbis //{249, y_webm_aud, y_audio, 128, L"webm", false, false}, // AC3 diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index 5dbc78c1d1..d4f228c176 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -389,6 +389,10 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) const CPathW finalfile(m_dstPaths.front()); const CStringW finalext = finalfile.GetExtension().Mid(1).MakeLower(); const CStringW tmpfile = finalfile + L".tmp"; + const CStringW format = + (finalext == L"m4a") ? L"mp4" : + (finalext == L"mka") ? L"matroska" : + finalext; CStringW strArgs = L"-y"; CStringW mapping; @@ -398,8 +402,15 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) for (unsigned i = 0; i < m_saveItems.size(); ++i) { const auto& item = m_saveItems[i]; - strArgs.AppendFormat(LR"( -i "%s")", m_dstPaths[i]); - mapping.AppendFormat(L" -map %u", i); + if (item.type == 't' && finalext == L"mka" && item.title == L".jpg") { + strArgs.AppendFormat(LR"( -attach "%s")", m_dstPaths[i]); + metadata.Append(L" -metadata:s:t mimetype=image/jpeg -metadata:s:t:0 filename=cover.jpg"); + } + else { + strArgs.AppendFormat(LR"( -i "%s")", m_dstPaths[i]); + mapping.AppendFormat(L" -map %u", i); + } + if (item.type == 's') { LPCSTR lang = ISO6391To6392(item.lang); if (lang[0]) { @@ -428,10 +439,10 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) } strArgs.Append(L" -disposition:v:0 attached_pic"); } - if (finalext == L"mp4" || finalext == L"m4a") { + if (format == L"mp4") { strArgs.Append(L" -movflags +faststart"); } - strArgs.AppendFormat(LR"( -f %s "%s")", (finalext == L"m4a") ? L"mp4" : finalext, tmpfile); + strArgs.AppendFormat(LR"( -f %s "%s")", format, tmpfile); SHELLEXECUTEINFOW execinfo = { sizeof(execinfo) }; execinfo.lpFile = m_ffmpegPath.GetString(); From 9771640625354ae9adc42678568d1c825949635d Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 07:45:52 +0300 Subject: [PATCH 26/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B2=D0=B5=D0=BD=D0=B3=D0=B5=D1=80=D1=81=D0=BA?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(?= =?UTF-8?q?=D0=B0=D0=B2=D1=82=D0=BE=D1=80=20mickey).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.hu.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.hu.rc.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.hu.rc b/src/apps/mpcresources/mplayerc.hu.rc index d4edf04098..f1a80431dc 100644 --- a/src/apps/mpcresources/mplayerc.hu.rc +++ b/src/apps/mpcresources/mplayerc.hu.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "Keresési idő megjelenítése",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Kikapcsolja az 'Open Disc' menüt",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "A lejátszó prioritása normál érték felett",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Hálózati időtúllépések",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Kapcsolat:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "mp.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Adatok fogadása:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "mp.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.hu.rc.txt b/src/apps/mpcresources/text/mplayerc.hu.rc.txt index 3647a00325..f16600be11 100644 --- a/src/apps/mpcresources/text/mplayerc.hu.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.hu.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Keresési idő megjelenítése" 38 "Kikapcsolja az 'Open Disc' menüt" 39 "A lejátszó prioritása normál érték felett" -40 "Network timeouts" -41 "Connection:" +40 "Hálózati időtúllépések" +41 "Kapcsolat:" 44 "mp." -45 "Receiving data:" -48 "sec." +45 "Adatok fogadása:" +48 "mp." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From 3762b74ba8b915c076c4c22fd604e3fffc49ec5a Mon Sep 17 00:00:00 2001 From: mapi68 <41143572+mapi68@users.noreply.github.com> Date: Sun, 2 Jun 2024 03:15:42 +0200 Subject: [PATCH 27/57] Update mplayerc.it.rc.txt --- src/apps/mpcresources/text/mplayerc.it.rc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/mpcresources/text/mplayerc.it.rc.txt b/src/apps/mpcresources/text/mplayerc.it.rc.txt index 2fd1f5cc71..93a0fb1663 100644 --- a/src/apps/mpcresources/text/mplayerc.it.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.it.rc.txt @@ -434,10 +434,10 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Mostra tempo di ricerca" 38 "Disabilita il menu ""Apri disco""" 39 "Priorità del processo superiore al normale" -40 "Network timeouts" -41 "Connection:" +40 "Timeout rete" +41 "Connessione:" 44 "sec." -45 "Receiving data:" +45 "Ricezione dati:" 48 "sec." END From b0b1110a655ab9b754ced0b8038ecf9c1f1dc2d9 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 07:48:32 +0300 Subject: [PATCH 28/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B8=D1=82=D0=B0=D0=BB=D1=8C=D1=8F=D0=BD=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4?= =?UTF-8?q?=20(=D0=B0=D0=B2=D1=82=D0=BE=D1=80=20mapi68).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.it.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.it.rc b/src/apps/mpcresources/mplayerc.it.rc index ed7bb8ab53..db606fc574 100644 --- a/src/apps/mpcresources/mplayerc.it.rc +++ b/src/apps/mpcresources/mplayerc.it.rc @@ -293,12 +293,12 @@ BEGIN CONTROL "Mostra tempo di ricerca",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Disabilita il menu ""Apri disco""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Priorità del processo superiore al normale",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Timeout rete",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Connessione:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "sec.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Ricezione dati:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 LTEXT "sec.",IDC_STATIC,263,249,26,8 From 0754afe030e9de3ebca4f0bdff49f86f428c4473 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 08:15:18 +0300 Subject: [PATCH 29/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B8=D1=81=D0=BF=D0=B0=D0=BD=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D1=80=20IPeluchito).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.es.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.es.rc.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.es.rc b/src/apps/mpcresources/mplayerc.es.rc index ea10d52db3..001078d7be 100644 --- a/src/apps/mpcresources/mplayerc.es.rc +++ b/src/apps/mpcresources/mplayerc.es.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "Mostrar tiempo de búsqueda",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Deshabilitar menú 'Abrir Disco'",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Mayor prioridad para el proceso",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Tiempo de espera de red",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Conexión:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "seg.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Recibiendo datos:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "seg.",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.es.rc.txt b/src/apps/mpcresources/text/mplayerc.es.rc.txt index a16c145ec3..a6036c813a 100644 --- a/src/apps/mpcresources/text/mplayerc.es.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.es.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Mostrar tiempo de búsqueda" 38 "Deshabilitar menú 'Abrir Disco'" 39 "Mayor prioridad para el proceso" -40 "Network timeouts" -41 "Connection:" +40 "Tiempo de espera de red" +41 "Conexión:" 44 "seg." -45 "Receiving data:" -48 "sec." +45 "Recibiendo datos:" +48 "seg." END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From ca05bdff8be3dfeef31cf7d04129ba56997326b0 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 08:21:23 +0300 Subject: [PATCH 30/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20ffmpeg=20git-n7.1-dev-1050-g2c38ca3?= =?UTF-8?q?d37.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c | 44 +++--- src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c | 36 ++--- src/ExtLib/ffmpeg/libavcodec/hevc_filter.c | 8 +- src/ExtLib/ffmpeg/libavcodec/hevc_parser.c | 2 +- src/ExtLib/ffmpeg/libavcodec/hevc_ps.c | 146 +++++++++--------- src/ExtLib/ffmpeg/libavcodec/hevc_ps.h | 91 +++++------ src/ExtLib/ffmpeg/libavcodec/hevc_refs.c | 6 +- src/ExtLib/ffmpeg/libavcodec/hevcdec.c | 82 +++++----- src/ExtLib/ffmpeg/libavcodec/hevcdec.h | 8 +- .../ffmpeg/libavcodec/hevcpred_template.c | 4 +- src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c | 42 ++--- .../ffmpeg/libavcodec/sbrdsp_template.c | 8 + src/ExtLib/ffmpeg/libavutil/float_dsp.c | 12 ++ src/ExtLib/ffmpeg/libavutil/float_dsp.h | 31 +++- src/ExtLib/ffmpeg/libavutil/lls.c | 13 +- src/ExtLib/ffmpeg/libavutil/lls.h | 1 + 18 files changed, 301 insertions(+), 237 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 885b686505..2447c26805 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -6,7 +6,7 @@ MPCVideoDec Декодирование VVC сделано с помощью vvdec (https://github.com/fraunhoferhhi/vvdec). Обновлены библиотеки: - ffmpeg git-n7.1-dev-1020-ge0db1f51d6; + ffmpeg git-n7.1-dev-1050-g2c38ca3d37; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 29649fffe3..8e1b98e8b3 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -6,7 +6,7 @@ MPCVideoDec VVC decoding is done using vvdec (https://github.com/fraunhoferhhi/vvdec). Updated libraries: - ffmpeg git-n7.1-dev-1020-ge0db1f51d6; + ffmpeg git-n7.1-dev-1050-g2c38ca3d37; vvdec git-v2.3.0-5-gffe3010. diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c index aedc82b1e6..6e03e849a7 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c @@ -82,16 +82,16 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo pp->PicHeightInMinCbsY = sps->min_cb_height; // ==> Start patch MPC - if (sps->sps_range_extension_flag) { - ppext->dwRangeExtensionFlags |= (sps->transform_skip_rotation_enabled_flag << 0) | - (sps->transform_skip_context_enabled_flag << 1) | - (sps->implicit_rdpcm_enabled_flag << 2) | - (sps->explicit_rdpcm_enabled_flag << 3) | - (sps->extended_precision_processing_flag << 4) | - (sps->intra_smoothing_disabled_flag << 5) | - (sps->high_precision_offsets_enabled_flag << 6) | - (sps->persistent_rice_adaptation_enabled_flag << 7) | - (sps->cabac_bypass_alignment_enabled_flag << 8); + if (sps->range_extension) { + ppext->dwRangeExtensionFlags |= (sps->transform_skip_rotation_enabled << 0) | + (sps->transform_skip_context_enabled << 1) | + (sps->implicit_rdpcm_enabled << 2) | + (sps->explicit_rdpcm_enabled << 3) | + (sps->extended_precision_processing << 4) | + (sps->intra_smoothing_disabled << 5) | + (sps->high_precision_offsets_enabled << 6) | + (sps->persistent_rice_adaptation_enabled << 7) | + (sps->cabac_bypass_alignment_enabled << 8); } if (pps->pps_range_extensions_flag) { ppext->dwRangeExtensionFlags |= (pps->cross_component_prediction_enabled_flag << 9) | @@ -113,7 +113,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo // ==> End patch MPC pp->wFormatAndSequenceInfoFlags = (sps->chroma_format_idc << 0) | - (sps->separate_colour_plane_flag << 2) | + (sps->separate_colour_plane << 2) | ((sps->bit_depth - 8) << 3) | ((sps->bit_depth - 8) << 6) | ((sps->log2_max_poc_lsb - 4) << 9) | @@ -140,18 +140,18 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo pp->wNumBitsForShortTermRPSInSlice = h->sh.short_term_ref_pic_set_size; } - pp->dwCodingParamToolFlags = (sps->scaling_list_enable_flag << 0) | - (sps->amp_enabled_flag << 1) | + pp->dwCodingParamToolFlags = (sps->scaling_list_enabled << 0) | + (sps->amp_enabled << 1) | (sps->sao_enabled << 2) | - (sps->pcm_enabled_flag << 3) | - ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth - 1) : 0) << 4) | - ((sps->pcm_enabled_flag ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | - ((sps->pcm_enabled_flag ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | - ((sps->pcm_enabled_flag ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | - (sps->pcm.loop_filter_disable_flag << 16) | - (sps->long_term_ref_pics_present_flag << 17) | - (sps->sps_temporal_mvp_enabled_flag << 18) | - (sps->sps_strong_intra_smoothing_enable_flag << 19) | + (sps->pcm_enabled << 3) | + ((sps->pcm_enabled ? (sps->pcm.bit_depth - 1) : 0) << 4) | + ((sps->pcm_enabled ? (sps->pcm.bit_depth_chroma - 1) : 0) << 8) | + ((sps->pcm_enabled ? (sps->pcm.log2_min_pcm_cb_size - 3) : 0) << 12) | + ((sps->pcm_enabled ? (sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size) : 0) << 14) | + (sps->pcm_loop_filter_disabled << 16) | + (sps->long_term_ref_pics_present << 17) | + (sps->temporal_mvp_enabled << 18) | + (sps->strong_intra_smoothing_enabled << 19) | (pps->dependent_slice_segments_enabled_flag << 20) | (pps->output_flag_present_flag << 21) | (pps->num_extra_slice_header_bits << 22) | diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c b/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c index 63ffb3d37c..2e639a7e41 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c @@ -408,7 +408,7 @@ void ff_hevc_save_states(HEVCLocalContext *lc, int ctb_addr_ts) (s->ps.sps->ctb_width == 2 && ctb_addr_ts % s->ps.sps->ctb_width == 0))) { memcpy(lc->common_cabac_state->state, lc->cabac_state, HEVC_CONTEXTS); - if (s->ps.sps->persistent_rice_adaptation_enabled_flag) { + if (s->ps.sps->persistent_rice_adaptation_enabled) { memcpy(lc->common_cabac_state->stat_coeff, lc->stat_coeff, HEVC_STAT_COEFFS); } } @@ -417,7 +417,7 @@ void ff_hevc_save_states(HEVCLocalContext *lc, int ctb_addr_ts) static void load_states(HEVCLocalContext *lc, const HEVCContext *s) { memcpy(lc->cabac_state, lc->common_cabac_state->state, HEVC_CONTEXTS); - if (s->ps.sps->persistent_rice_adaptation_enabled_flag) { + if (s->ps.sps->persistent_rice_adaptation_enabled) { memcpy(lc->stat_coeff, lc->common_cabac_state->stat_coeff, HEVC_STAT_COEFFS); } } @@ -683,7 +683,7 @@ int ff_hevc_part_mode_decode(HEVCLocalContext *lc, int log2_cb_size) return PART_NxN; // 000 } - if (!lc->parent->ps.sps->amp_enabled_flag) { + if (!lc->parent->ps.sps->amp_enabled) { if (GET_CABAC(PART_MODE_OFFSET + 1)) // 01 return PART_2NxN; return PART_Nx2N; @@ -1091,7 +1091,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, scale_m = 16; // default when no custom scaling lists. dc_scale = 16; - if (s->ps.sps->scaling_list_enable_flag && !(transform_skip_flag && log2_trafo_size > 2)) { + if (s->ps.sps->scaling_list_enabled && !(transform_skip_flag && log2_trafo_size > 2)) { const ScalingList *sl = s->ps.pps->scaling_list_data_present_flag ? &s->ps.pps->scaling_list : &s->ps.sps->scaling_list; int matrix_id = lc->cu.pred_mode != MODE_INTRA; @@ -1109,7 +1109,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, dc_scale = 0; } - if (lc->cu.pred_mode == MODE_INTER && s->ps.sps->explicit_rdpcm_enabled_flag && + if (lc->cu.pred_mode == MODE_INTER && s->ps.sps->explicit_rdpcm_enabled && (transform_skip_flag || lc->cu.cu_transquant_bypass_flag)) { explicit_rdpcm_flag = explicit_rdpcm_flag_decode(lc, c_idx); if (explicit_rdpcm_flag) { @@ -1240,7 +1240,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, }; const uint8_t *ctx_idx_map_p; int scf_offset = 0; - if (s->ps.sps->transform_skip_context_enabled_flag && + if (s->ps.sps->transform_skip_context_enabled && (transform_skip_flag || lc->cu.cu_transquant_bypass_flag)) { ctx_idx_map_p = &ctx_idx_map[4 * 16]; if (c_idx == 0) { @@ -1281,7 +1281,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, } } if (implicit_non_zero_coeff == 0) { - if (s->ps.sps->transform_skip_context_enabled_flag && + if (s->ps.sps->transform_skip_context_enabled && (transform_skip_flag || lc->cu.cu_transquant_bypass_flag)) { if (c_idx == 0) { scf_offset = 42; @@ -1326,7 +1326,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, // initialize first elem of coeff_bas_level_greater1_flag int ctx_set = (i > 0 && c_idx == 0) ? 2 : 0; - if (s->ps.sps->persistent_rice_adaptation_enabled_flag) { + if (s->ps.sps->persistent_rice_adaptation_enabled) { if (!transform_skip_flag && !lc->cu.cu_transquant_bypass_flag) sb_type = 2 * (c_idx == 0 ? 1 : 0); else @@ -1355,7 +1355,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, if (lc->cu.cu_transquant_bypass_flag || (lc->cu.pred_mode == MODE_INTRA && - s->ps.sps->implicit_rdpcm_enabled_flag && transform_skip_flag && + s->ps.sps->implicit_rdpcm_enabled && transform_skip_flag && (pred_mode_intra == 10 || pred_mode_intra == 26 )) || explicit_rdpcm_flag) sign_hidden = 0; @@ -1381,8 +1381,8 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, trans_coeff_level += last_coeff_abs_level_remaining; if (trans_coeff_level > (3 << c_rice_param)) - c_rice_param = s->ps.sps->persistent_rice_adaptation_enabled_flag ? c_rice_param + 1 : FFMIN(c_rice_param + 1, 4); - if (s->ps.sps->persistent_rice_adaptation_enabled_flag && !rice_init) { + c_rice_param = s->ps.sps->persistent_rice_adaptation_enabled ? c_rice_param + 1 : FFMIN(c_rice_param + 1, 4); + if (s->ps.sps->persistent_rice_adaptation_enabled && !rice_init) { int c_rice_p_init = lc->stat_coeff[sb_type] / 4; if (last_coeff_abs_level_remaining >= (3 << c_rice_p_init)) lc->stat_coeff[sb_type]++; @@ -1397,8 +1397,8 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, trans_coeff_level = 1 + last_coeff_abs_level_remaining; if (trans_coeff_level > (3 << c_rice_param)) - c_rice_param = s->ps.sps->persistent_rice_adaptation_enabled_flag ? c_rice_param + 1 : FFMIN(c_rice_param + 1, 4); - if (s->ps.sps->persistent_rice_adaptation_enabled_flag && !rice_init) { + c_rice_param = s->ps.sps->persistent_rice_adaptation_enabled ? c_rice_param + 1 : FFMIN(c_rice_param + 1, 4); + if (s->ps.sps->persistent_rice_adaptation_enabled && !rice_init) { int c_rice_p_init = lc->stat_coeff[sb_type] / 4; if (last_coeff_abs_level_remaining >= (3 << c_rice_p_init)) lc->stat_coeff[sb_type]++; @@ -1417,7 +1417,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, trans_coeff_level = -trans_coeff_level; coeff_sign_flag <<= 1; if(!lc->cu.cu_transquant_bypass_flag) { - if (s->ps.sps->scaling_list_enable_flag && !(transform_skip_flag && log2_trafo_size > 2)) { + if (s->ps.sps->scaling_list_enabled && !(transform_skip_flag && log2_trafo_size > 2)) { if(y_c || x_c || log2_trafo_size < 4) { switch(log2_trafo_size) { case 3: pos = (y_c << 3) + x_c; break; @@ -1445,15 +1445,15 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, } if (lc->cu.cu_transquant_bypass_flag) { - if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag && + if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled && (pred_mode_intra == 10 || pred_mode_intra == 26))) { - int mode = s->ps.sps->implicit_rdpcm_enabled_flag ? (pred_mode_intra == 26) : explicit_rdpcm_dir_flag; + int mode = s->ps.sps->implicit_rdpcm_enabled ? (pred_mode_intra == 26) : explicit_rdpcm_dir_flag; s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode); } } else { if (transform_skip_flag) { - int rot = s->ps.sps->transform_skip_rotation_enabled_flag && + int rot = s->ps.sps->transform_skip_rotation_enabled && log2_trafo_size == 2 && lc->cu.pred_mode == MODE_INTRA; if (rot) { @@ -1463,7 +1463,7 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, s->hevcdsp.dequant(coeffs, log2_trafo_size); - if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag && + if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled && lc->cu.pred_mode == MODE_INTRA && (pred_mode_intra == 10 || pred_mode_intra == 26))) { int mode = explicit_rdpcm_flag ? explicit_rdpcm_dir_flag : (pred_mode_intra == 26); diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c b/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c index b1e2ea7a66..6bc3019147 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c @@ -224,7 +224,7 @@ static void restore_tqb_pixels(const HEVCContext *s, int x0, int y0, int width, int height, int c_idx) { if ( s->ps.pps->transquant_bypass_enable_flag || - (s->ps.sps->pcm.loop_filter_disable_flag && s->ps.sps->pcm_enabled_flag)) { + (s->ps.sps->pcm_loop_filter_disabled && s->ps.sps->pcm_enabled)) { int x, y; int min_pu_size = 1 << s->ps.sps->log2_min_pu_size; int hshift = s->ps.sps->hshift[c_idx]; @@ -330,7 +330,7 @@ static void sao_filter_CTB(HEVCLocalContext *lc, const HEVCContext *s, int x, in copy_CTB_to_hv(s, src, stride_src, x0, y0, width, height, c_idx, x_ctb, y_ctb); if (s->ps.pps->transquant_bypass_enable_flag || - (s->ps.sps->pcm.loop_filter_disable_flag && s->ps.sps->pcm_enabled_flag)) { + (s->ps.sps->pcm_loop_filter_disabled && s->ps.sps->pcm_enabled)) { dst = lc->edge_emu_buffer; stride_dst = 2*MAX_PB_SIZE; copy_CTB(dst, src, width << s->ps.sps->pixel_shift, height, stride_dst, stride_src); @@ -500,8 +500,8 @@ static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) int cur_beta_offset = s->deblock[ctb].beta_offset; int left_tc_offset, left_beta_offset; int tc_offset, beta_offset; - int pcmf = (s->ps.sps->pcm_enabled_flag && - s->ps.sps->pcm.loop_filter_disable_flag) || + int pcmf = (s->ps.sps->pcm_enabled && + s->ps.sps->pcm_loop_filter_disabled) || s->ps.pps->transquant_bypass_enable_flag; if (x0) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c b/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c index fed1128c49..512a58549f 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c @@ -150,7 +150,7 @@ static int hevc_parse_slice_header(AVCodecParserContext *s, H2645NAL *nal, if (ps->pps->output_flag_present_flag) skip_bits1(gb); // pic_output_flag - if (ps->sps->separate_colour_plane_flag) + if (ps->sps->separate_colour_plane) skip_bits(gb, 2); // colour_plane_id if (!IS_IDR_NAL(nal)) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c b/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c index 62113d56bc..9107cfba7a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c @@ -107,6 +107,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, int k = 0; int i; + rps->used = 0; rps->rps_predict = 0; if (rps != sps->st_rps && sps->nb_st_rps) @@ -114,6 +115,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, if (rps->rps_predict) { const ShortTermRPS *rps_ridx; + uint8_t used[32] = { 0 }; int delta_rps; if (is_slice_header) { @@ -139,13 +141,13 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, } delta_rps = (1 - (rps->delta_rps_sign << 1)) * rps->abs_delta_rps; for (i = 0; i <= rps_ridx->num_delta_pocs; i++) { - int used = rps->used[k] = get_bits1(gb); + used[k] = get_bits1(gb); - rps->use_delta_flag = 0; - if (!used) - rps->use_delta_flag = get_bits1(gb); + rps->use_delta = 0; + if (!used[k]) + rps->use_delta = get_bits1(gb); - if (used || rps->use_delta_flag) { + if (used[k] || rps->use_delta) { if (i < rps_ridx->num_delta_pocs) delta_poc = delta_rps + rps_ridx->delta_poc[i]; else @@ -157,7 +159,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, } } - if (k >= FF_ARRAY_ELEMS(rps->used)) { + if (k >= FF_ARRAY_ELEMS(used)) { av_log(avctx, AV_LOG_ERROR, "Invalid num_delta_pocs: %d\n", k); return AVERROR_INVALIDDATA; @@ -167,37 +169,41 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, rps->num_negative_pics = k0; // sort in increasing order (smallest first) if (rps->num_delta_pocs != 0) { - int used, tmp; + int u, tmp; for (i = 1; i < rps->num_delta_pocs; i++) { delta_poc = rps->delta_poc[i]; - used = rps->used[i]; + u = used[i]; for (k = i - 1; k >= 0; k--) { tmp = rps->delta_poc[k]; if (delta_poc < tmp) { rps->delta_poc[k + 1] = tmp; - rps->used[k + 1] = rps->used[k]; + used[k + 1] = used[k]; rps->delta_poc[k] = delta_poc; - rps->used[k] = used; + used[k] = u; } } } } if ((rps->num_negative_pics >> 1) != 0) { - int used; + int u; k = rps->num_negative_pics - 1; // flip the negative values to largest first for (i = 0; i < rps->num_negative_pics >> 1; i++) { delta_poc = rps->delta_poc[i]; - used = rps->used[i]; + u = used[i]; rps->delta_poc[i] = rps->delta_poc[k]; - rps->used[i] = rps->used[k]; + used[i] = used[k]; rps->delta_poc[k] = delta_poc; - rps->used[k] = used; + used[k] = u; k--; } } + + for (unsigned i = 0; i < FF_ARRAY_ELEMS(used); i++) + rps->used |= (uint32_t)used[i] << i; } else { - unsigned int prev, nb_positive_pics; + unsigned int nb_positive_pics; + rps->num_negative_pics = get_ue_golomb_long(gb); nb_positive_pics = get_ue_golomb_long(gb); @@ -209,9 +215,10 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, rps->num_delta_pocs = rps->num_negative_pics + nb_positive_pics; if (rps->num_delta_pocs) { - prev = 0; + int prev = 0; + for (i = 0; i < rps->num_negative_pics; i++) { - delta_poc = rps->delta_poc_s0[i] = get_ue_golomb_long(gb) + 1; + delta_poc = get_ue_golomb_long(gb) + 1; if (delta_poc < 1 || delta_poc > 32768) { av_log(avctx, AV_LOG_ERROR, "Invalid value of delta_poc: %d\n", @@ -220,11 +227,11 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, } prev -= delta_poc; rps->delta_poc[i] = prev; - rps->used[i] = get_bits1(gb); + rps->used |= get_bits1(gb) * (1 << i); } prev = 0; for (i = 0; i < nb_positive_pics; i++) { - delta_poc = rps->delta_poc_s1[i] = get_ue_golomb_long(gb) + 1; + delta_poc = get_ue_golomb_long(gb) + 1; if (delta_poc < 1 || delta_poc > 32768) { av_log(avctx, AV_LOG_ERROR, "Invalid value of delta_poc: %d\n", @@ -233,7 +240,7 @@ int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, } prev += delta_poc; rps->delta_poc[rps->num_negative_pics + i] = prev; - rps->used[rps->num_negative_pics + i] = get_bits1(gb); + rps->used |= get_bits1(gb) * (1 << (rps->num_negative_pics + i)); } } } @@ -895,7 +902,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, return AVERROR_INVALIDDATA; } - sps->temporal_id_nesting_flag = get_bits(gb, 1); + sps->temporal_id_nesting = get_bits(gb, 1); if ((ret = parse_ptl(gb, avctx, &sps->ptl, sps->max_sub_layers)) < 0) return ret; @@ -913,9 +920,9 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, } if (sps->chroma_format_idc == 3) - sps->separate_colour_plane_flag = get_bits1(gb); + sps->separate_colour_plane = get_bits1(gb); - if (sps->separate_colour_plane_flag) + if (sps->separate_colour_plane) sps->chroma_format_idc = 0; sps->width = get_ue_golomb_long(gb); @@ -924,8 +931,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->height, 0, avctx)) < 0) return ret; - sps->conformance_window_flag = get_bits1(gb); - if (sps->conformance_window_flag) { + sps->conformance_window = get_bits1(gb); + if (sps->conformance_window) { int vert_mult = hevc_sub_height_c[sps->chroma_format_idc]; int horiz_mult = hevc_sub_width_c[sps->chroma_format_idc]; sps->pic_conf_win.left_offset = get_ue_golomb_long(gb) * horiz_mult; @@ -982,8 +989,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, return AVERROR_INVALIDDATA; } - sps->sublayer_ordering_info_flag = get_bits1(gb); - start = sps->sublayer_ordering_info_flag ? 0 : sps->max_sub_layers - 1; + sps->sublayer_ordering_info = get_bits1(gb); + start = sps->sublayer_ordering_info ? 0 : sps->max_sub_layers - 1; for (i = start; i < sps->max_sub_layers; i++) { sps->temporal_layer[i].max_dec_pic_buffering = get_ue_golomb_long(gb) + 1; sps->temporal_layer[i].num_reorder_pics = get_ue_golomb_long(gb); @@ -1004,7 +1011,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, } } - if (!sps->sublayer_ordering_info_flag) { + if (!sps->sublayer_ordering_info) { for (i = 0; i < start; i++) { sps->temporal_layer[i].max_dec_pic_buffering = sps->temporal_layer[start].max_dec_pic_buffering; sps->temporal_layer[i].num_reorder_pics = sps->temporal_layer[start].num_reorder_pics; @@ -1043,8 +1050,8 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, sps->max_transform_hierarchy_depth_inter = get_ue_golomb_long(gb); sps->max_transform_hierarchy_depth_intra = get_ue_golomb_long(gb); - sps->scaling_list_enable_flag = get_bits1(gb); - if (sps->scaling_list_enable_flag) { + sps->scaling_list_enabled = get_bits1(gb); + if (sps->scaling_list_enabled) { set_default_scaling_list_data(&sps->scaling_list); if (get_bits1(gb)) { @@ -1054,11 +1061,11 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, } } - sps->amp_enabled_flag = get_bits1(gb); - sps->sao_enabled = get_bits1(gb); + sps->amp_enabled = get_bits1(gb); + sps->sao_enabled = get_bits1(gb); - sps->pcm_enabled_flag = get_bits1(gb); - if (sps->pcm_enabled_flag) { + sps->pcm_enabled = get_bits1(gb); + if (sps->pcm_enabled) { sps->pcm.bit_depth = get_bits(gb, 4) + 1; sps->pcm.bit_depth_chroma = get_bits(gb, 4) + 1; sps->pcm.log2_min_pcm_cb_size = get_ue_golomb_long(gb) + 3; @@ -1071,7 +1078,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, return AVERROR_INVALIDDATA; } - sps->pcm.loop_filter_disable_flag = get_bits1(gb); + sps->pcm_loop_filter_disabled = get_bits1(gb); } sps->nb_st_rps = get_ue_golomb_long(gb); @@ -1086,68 +1093,69 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, return ret; } - sps->long_term_ref_pics_present_flag = get_bits1(gb); - if (sps->long_term_ref_pics_present_flag) { + sps->long_term_ref_pics_present = get_bits1(gb); + if (sps->long_term_ref_pics_present) { sps->num_long_term_ref_pics_sps = get_ue_golomb_long(gb); if (sps->num_long_term_ref_pics_sps > HEVC_MAX_LONG_TERM_REF_PICS) { av_log(avctx, AV_LOG_ERROR, "Too many long term ref pics: %d.\n", sps->num_long_term_ref_pics_sps); return AVERROR_INVALIDDATA; } + + sps->used_by_curr_pic_lt = 0; for (i = 0; i < sps->num_long_term_ref_pics_sps; i++) { sps->lt_ref_pic_poc_lsb_sps[i] = get_bits(gb, sps->log2_max_poc_lsb); - sps->used_by_curr_pic_lt_sps_flag[i] = get_bits1(gb); + sps->used_by_curr_pic_lt |= get_bits1(gb) * (1 << i); } } - sps->sps_temporal_mvp_enabled_flag = get_bits1(gb); - sps->sps_strong_intra_smoothing_enable_flag = get_bits1(gb); + sps->temporal_mvp_enabled = get_bits1(gb); + sps->strong_intra_smoothing_enabled = get_bits1(gb); sps->vui.common.sar = (AVRational){0, 1}; sps->vui_present = get_bits1(gb); if (sps->vui_present) decode_vui(gb, avctx, apply_defdispwin, sps); - sps->sps_extension_present_flag = get_bits1(gb); - if (sps->sps_extension_present_flag) { - sps->sps_range_extension_flag = get_bits1(gb); - sps->sps_multilayer_extension_flag = get_bits1(gb); - sps->sps_3d_extension_flag = get_bits1(gb); - sps->sps_scc_extension_flag = get_bits1(gb); + sps->extension_present = get_bits1(gb); + if (sps->extension_present) { + sps->range_extension = get_bits1(gb); + sps->multilayer_extension = get_bits1(gb); + sps->sps_3d_extension = get_bits1(gb); + sps->scc_extension = get_bits1(gb); skip_bits(gb, 4); // sps_extension_4bits - if (sps->sps_range_extension_flag) { - sps->transform_skip_rotation_enabled_flag = get_bits1(gb); - sps->transform_skip_context_enabled_flag = get_bits1(gb); - sps->implicit_rdpcm_enabled_flag = get_bits1(gb); - - sps->explicit_rdpcm_enabled_flag = get_bits1(gb); + if (sps->range_extension) { + sps->transform_skip_rotation_enabled = get_bits1(gb); + sps->transform_skip_context_enabled = get_bits1(gb); + sps->implicit_rdpcm_enabled = get_bits1(gb); + sps->explicit_rdpcm_enabled = get_bits1(gb); - sps->extended_precision_processing_flag = get_bits1(gb); - if (sps->extended_precision_processing_flag) + sps->extended_precision_processing = get_bits1(gb); + if (sps->extended_precision_processing) av_log(avctx, AV_LOG_WARNING, "extended_precision_processing_flag not yet implemented\n"); - sps->intra_smoothing_disabled_flag = get_bits1(gb); - sps->high_precision_offsets_enabled_flag = get_bits1(gb); - if (sps->high_precision_offsets_enabled_flag) + sps->intra_smoothing_disabled = get_bits1(gb); + sps->high_precision_offsets_enabled = get_bits1(gb); + if (sps->high_precision_offsets_enabled) av_log(avctx, AV_LOG_WARNING, "high_precision_offsets_enabled_flag not yet implemented\n"); - sps->persistent_rice_adaptation_enabled_flag = get_bits1(gb); + sps->persistent_rice_adaptation_enabled = get_bits1(gb); - sps->cabac_bypass_alignment_enabled_flag = get_bits1(gb); - if (sps->cabac_bypass_alignment_enabled_flag) + sps->cabac_bypass_alignment_enabled = get_bits1(gb); + if (sps->cabac_bypass_alignment_enabled) av_log(avctx, AV_LOG_WARNING, "cabac_bypass_alignment_enabled_flag not yet implemented\n"); } - if (sps->sps_multilayer_extension_flag) { + if (sps->multilayer_extension) { skip_bits1(gb); // inter_view_mv_vert_constraint_flag av_log(avctx, AV_LOG_WARNING, "sps_multilayer_extension_flag not yet implemented\n"); } - if (sps->sps_3d_extension_flag) { + if (sps->sps_3d_extension) { for (i = 0; i <= 1; i++) { skip_bits1(gb); // iv_di_mc_enabled_flag skip_bits1(gb); // iv_mv_scal_enabled_flag @@ -1171,15 +1179,15 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, "sps_3d_extension_flag not yet implemented\n"); } - if (sps->sps_scc_extension_flag) { - sps->sps_curr_pic_ref_enabled_flag = get_bits1(gb); - sps->palette_mode_enabled_flag = get_bits1(gb); - if (sps->palette_mode_enabled_flag) { + if (sps->scc_extension) { + sps->curr_pic_ref_enabled = get_bits1(gb); + sps->palette_mode_enabled = get_bits1(gb); + if (sps->palette_mode_enabled) { sps->palette_max_size = get_ue_golomb(gb); sps->delta_palette_max_predictor_size = get_ue_golomb(gb); - sps->sps_palette_predictor_initializers_present_flag = get_bits1(gb); + sps->palette_predictor_initializers_present = get_bits1(gb); - if (sps->sps_palette_predictor_initializers_present_flag) { + if (sps->palette_predictor_initializers_present) { sps->sps_num_palette_predictor_initializers = get_ue_golomb(gb) + 1; if (sps->sps_num_palette_predictor_initializers > HEVC_MAX_PALETTE_PREDICTOR_SIZE) { av_log(avctx, AV_LOG_ERROR, @@ -1196,7 +1204,7 @@ int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, } } sps->motion_vector_resolution_control_idc = get_bits(gb, 2); - sps->intra_boundary_filtering_disabled_flag = get_bits1(gb); + sps->intra_boundary_filtering_disabled = get_bits1(gb); } } if (apply_defdispwin) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h b/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h index 24c2dc192b..c1794256ed 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h @@ -70,18 +70,19 @@ typedef struct HEVCHdrParams { } HEVCHdrParams; typedef struct ShortTermRPS { - uint8_t rps_predict; - unsigned int delta_idx; - uint8_t use_delta_flag; - uint8_t delta_rps_sign; - unsigned int abs_delta_rps; - unsigned int num_negative_pics; - int num_delta_pocs; - int rps_idx_num_delta_pocs; - int32_t delta_poc_s0[32]; - int32_t delta_poc_s1[32]; int32_t delta_poc[32]; - uint8_t used[32]; + uint32_t used; + + uint8_t delta_idx; + uint8_t num_negative_pics; + uint8_t num_delta_pocs; + uint8_t rps_idx_num_delta_pocs; + + uint16_t abs_delta_rps; + unsigned delta_rps_sign:1; + + unsigned rps_predict:1; + unsigned use_delta:1; } ShortTermRPS; typedef struct HEVCWindow { @@ -188,11 +189,9 @@ typedef struct ScalingList { typedef struct HEVCSPS { unsigned vps_id; int chroma_format_idc; - uint8_t separate_colour_plane_flag; HEVCWindow output_window; - uint8_t conformance_window_flag; HEVCWindow pic_conf_win; HEVCHdrParams hdr; @@ -203,34 +202,25 @@ typedef struct HEVCSPS { enum AVPixelFormat pix_fmt; unsigned int log2_max_poc_lsb; - int pcm_enabled_flag; - uint8_t sublayer_ordering_info_flag; int max_sub_layers; struct { int max_dec_pic_buffering; int num_reorder_pics; int max_latency_increase; } temporal_layer[HEVC_MAX_SUB_LAYERS]; - uint8_t temporal_id_nesting_flag; int vui_present; VUI vui; PTL ptl; - uint8_t sps_extension_present_flag; - uint8_t scaling_list_enable_flag; ScalingList scaling_list; unsigned int nb_st_rps; ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]; - uint8_t amp_enabled_flag; - uint8_t sao_enabled; - - uint8_t long_term_ref_pics_present_flag; uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]; - uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]; + uint32_t used_by_curr_pic_lt; uint8_t num_long_term_ref_pics_sps; struct { @@ -238,10 +228,7 @@ typedef struct HEVCSPS { uint8_t bit_depth_chroma; unsigned int log2_min_pcm_cb_size; unsigned int log2_max_pcm_cb_size; - uint8_t loop_filter_disable_flag; } pcm; - uint8_t sps_temporal_mvp_enabled_flag; - uint8_t sps_strong_intra_smoothing_enable_flag; unsigned int log2_min_cb_size; unsigned int log2_diff_max_min_coding_block_size; @@ -254,30 +241,44 @@ typedef struct HEVCSPS { int max_transform_hierarchy_depth_inter; int max_transform_hierarchy_depth_intra; - int sps_range_extension_flag; - int transform_skip_rotation_enabled_flag; - int transform_skip_context_enabled_flag; - int implicit_rdpcm_enabled_flag; - int explicit_rdpcm_enabled_flag; - int extended_precision_processing_flag; - int intra_smoothing_disabled_flag; - int high_precision_offsets_enabled_flag; - int persistent_rice_adaptation_enabled_flag; - int cabac_bypass_alignment_enabled_flag; - - int sps_multilayer_extension_flag; - int sps_3d_extension_flag; - - int sps_scc_extension_flag; - int sps_curr_pic_ref_enabled_flag; - int palette_mode_enabled_flag; + uint8_t separate_colour_plane; + uint8_t conformance_window; + uint8_t pcm_enabled; + uint8_t pcm_loop_filter_disabled; + uint8_t sublayer_ordering_info; + uint8_t temporal_id_nesting; + uint8_t extension_present; + uint8_t scaling_list_enabled; + uint8_t amp_enabled; + uint8_t sao_enabled; + uint8_t long_term_ref_pics_present; + uint8_t temporal_mvp_enabled; + uint8_t strong_intra_smoothing_enabled; + uint8_t range_extension; + uint8_t transform_skip_rotation_enabled; + uint8_t transform_skip_context_enabled; + uint8_t implicit_rdpcm_enabled; + uint8_t explicit_rdpcm_enabled; + uint8_t extended_precision_processing; + uint8_t intra_smoothing_disabled; + uint8_t high_precision_offsets_enabled; + uint8_t persistent_rice_adaptation_enabled; + uint8_t cabac_bypass_alignment_enabled; + + uint8_t multilayer_extension; + uint8_t sps_3d_extension; + + uint8_t scc_extension; + uint8_t curr_pic_ref_enabled; + uint8_t palette_mode_enabled; + uint8_t palette_predictor_initializers_present; + uint8_t intra_boundary_filtering_disabled; + int palette_max_size; int delta_palette_max_predictor_size; - int sps_palette_predictor_initializers_present_flag; int sps_num_palette_predictor_initializers; int sps_palette_predictor_initializer[3][HEVC_MAX_PALETTE_PREDICTOR_SIZE]; int motion_vector_resolution_control_idc; - int intra_boundary_filtering_disabled_flag; ///< coded frame dimension in various units int width; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c b/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c index 8da9ec982a..d6dc2f9e0a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c @@ -497,7 +497,7 @@ int ff_hevc_frame_rps(HEVCContext *s) int poc = s->poc + short_rps->delta_poc[i]; int list; - if (!short_rps->used[i]) + if (!(short_rps->used & (1 << i))) list = ST_FOLL; else if (i < short_rps->num_negative_pics) list = ST_CURR_BEF; @@ -536,9 +536,9 @@ int ff_hevc_frame_nb_refs(const HEVCContext *s) if (rps) { for (i = 0; i < rps->num_negative_pics; i++) - ret += !!rps->used[i]; + ret += !!(rps->used & (1 << i)); for (; i < rps->num_delta_pocs; i++) - ret += !!rps->used[i]; + ret += !!(rps->used & (1 << i)); } if (long_rps) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c b/src/ExtLib/ffmpeg/libavcodec/hevcdec.c index a4f4b09b04..a230421bc0 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevcdec.c @@ -272,7 +272,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb) int i; rps->nb_refs = 0; - if (!sps->long_term_ref_pics_present_flag) + if (!sps->long_term_ref_pics_present) return 0; if (sps->num_long_term_ref_pics_sps > 0) @@ -295,7 +295,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb) lt_idx_sps = get_bits(gb, av_ceil_log2(sps->num_long_term_ref_pics_sps)); rps->poc[i] = sps->lt_ref_pic_poc_lsb_sps[lt_idx_sps]; - rps->used[i] = sps->used_by_curr_pic_lt_sps_flag[lt_idx_sps]; + rps->used[i] = !!(sps->used_by_curr_pic_lt & (1 << lt_idx_sps)); } else { rps->poc[i] = get_bits(gb, sps->log2_max_poc_lsb); rps->used[i] = get_bits1(gb); @@ -729,7 +729,7 @@ static int hls_slice_header(HEVCContext *s) if (s->ps.pps->output_flag_present_flag) sh->pic_output_flag = get_bits1(gb); - if (s->ps.sps->separate_colour_plane_flag) + if (s->ps.sps->separate_colour_plane) sh->colour_plane_id = get_bits(gb, 2); if (!IS_IDR(s)) { @@ -777,7 +777,7 @@ static int hls_slice_header(HEVCContext *s) } sh->long_term_ref_pic_set_size = pos - get_bits_left(gb); - if (s->ps.sps->sps_temporal_mvp_enabled_flag) + if (s->ps.sps->temporal_mvp_enabled) sh->slice_temporal_mvp_enabled_flag = get_bits1(gb); else sh->slice_temporal_mvp_enabled_flag = 0; @@ -2318,7 +2318,7 @@ static int hls_coding_unit(HEVCLocalContext *lc, const HEVCContext *s, int x0, i } if (lc->cu.pred_mode == MODE_INTRA) { - if (lc->cu.part_mode == PART_2Nx2N && s->ps.sps->pcm_enabled_flag && + if (lc->cu.part_mode == PART_2Nx2N && s->ps.sps->pcm_enabled && log2_cb_size >= s->ps.sps->pcm.log2_min_pcm_cb_size && log2_cb_size <= s->ps.sps->pcm.log2_max_pcm_cb_size) { pcm_flag = ff_hevc_pcm_flag_decode(lc); @@ -2326,7 +2326,7 @@ static int hls_coding_unit(HEVCLocalContext *lc, const HEVCContext *s, int x0, i if (pcm_flag) { intra_prediction_unit_default_value(lc, x0, y0, log2_cb_size); ret = hls_pcm_sample(lc, x0, y0, log2_cb_size); - if (s->ps.sps->pcm.loop_filter_disable_flag) + if (s->ps.sps->pcm_loop_filter_disabled) set_deblocking_bypass(s, x0, y0, log2_cb_size); if (ret < 0) @@ -2550,9 +2550,8 @@ static void hls_decode_neighbour(HEVCLocalContext *lc, int x_ctb, int y_ctb, lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->ps.sps->ctb_width]])); } -static int hls_decode_entry(AVCodecContext *avctxt, void *arg) +static int hls_decode_entry(HEVCContext *s) { - HEVCContext *s = avctxt->priv_data; HEVCLocalContext *const lc = s->HEVClc; int ctb_size = 1 << s->ps.sps->log2_ctb_size; int more_data = 1; @@ -2612,17 +2611,10 @@ static int hls_decode_entry(AVCodecContext *avctxt, void *arg) return ctb_addr_ts; } -static int hls_slice_data(HEVCContext *s) -{ - int ret = 0; - - s->avctx->execute(s->avctx, hls_decode_entry, NULL, &ret , 1, 0); - return ret; -} static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, int job, int self_id) { - HEVCLocalContext *lc = ((HEVCLocalContext**)hevc_lclist)[self_id]; + HEVCLocalContext *lc = &((HEVCLocalContext*)hevc_lclist)[self_id]; const HEVCContext *const s = lc->parent; int ctb_size = 1 << s->ps.sps->log2_ctb_size; int more_data = 1; @@ -2706,7 +2698,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) { const uint8_t *data = nal->data; int length = nal->size; - HEVCLocalContext *lc = s->HEVClc; + HEVCLocalContext *lc; int *ret; int64_t offset; int64_t startheader, cmpt = 0; @@ -2720,17 +2712,31 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) return AVERROR_INVALIDDATA; } - for (i = 1; i < s->threads_number; i++) { - if (s->HEVClcList[i]) - continue; - s->HEVClcList[i] = av_mallocz(sizeof(HEVCLocalContext)); - if (!s->HEVClcList[i]) + if (s->threads_number > s->nb_local_ctx) { + HEVCLocalContext *tmp = av_malloc_array(s->threads_number, sizeof(*s->local_ctx)); + + if (!tmp) return AVERROR(ENOMEM); - s->HEVClcList[i]->logctx = s->avctx; - s->HEVClcList[i]->parent = s; - s->HEVClcList[i]->common_cabac_state = &s->cabac; + + memcpy(tmp, s->local_ctx, sizeof(*s->local_ctx) * s->nb_local_ctx); + av_free(s->local_ctx); + s->local_ctx = tmp; + s->HEVClc = &s->local_ctx[0]; + + for (unsigned i = s->nb_local_ctx; i < s->threads_number; i++) { + tmp = &s->local_ctx[i]; + + memset(tmp, 0, sizeof(*tmp)); + + tmp->logctx = s->avctx; + tmp->parent = s; + tmp->common_cabac_state = &s->cabac; + } + + s->nb_local_ctx = s->threads_number; } + lc = &s->local_ctx[0]; offset = (lc->gb.index >> 3); for (j = 0, cmpt = 0, startheader = offset + s->sh.entry_point_offset[0]; j < nal->skipped_bytes; j++) { @@ -2766,8 +2772,8 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) s->data = data; for (i = 1; i < s->threads_number; i++) { - s->HEVClcList[i]->first_qp_group = 1; - s->HEVClcList[i]->qp_y = s->HEVClc->qp_y; + s->local_ctx[i].first_qp_group = 1; + s->local_ctx[i].qp_y = s->HEVClc->qp_y; } atomic_store(&s->wpp_err, 0); @@ -2780,7 +2786,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) return AVERROR(ENOMEM); if (s->ps.pps->entropy_coding_sync_enabled_flag) - s->avctx->execute2(s->avctx, hls_decode_entry_wpp, s->HEVClcList, ret, s->sh.num_entry_point_offsets + 1); + s->avctx->execute2(s->avctx, hls_decode_entry_wpp, s->local_ctx, ret, s->sh.num_entry_point_offsets + 1); for (i = 0; i <= s->sh.num_entry_point_offsets; i++) res += ret[i]; @@ -3151,7 +3157,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (s->threads_number > 1 && s->sh.num_entry_point_offsets > 0) ctb_addr_ts = hls_slice_data_wpp(s, nal); else - ctb_addr_ts = hls_slice_data(s); + ctb_addr_ts = hls_decode_entry(s); if (ctb_addr_ts >= (s->ps.sps->ctb_width * s->ps.sps->ctb_height)) { ret = hevc_frame_end(s); if (ret < 0) @@ -3504,13 +3510,7 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) av_freep(&s->sh.offset); av_freep(&s->sh.size); - if (s->HEVClcList) { - for (i = 1; i < s->threads_number; i++) { - av_freep(&s->HEVClcList[i]); - } - } - av_freep(&s->HEVClc); - av_freep(&s->HEVClcList); + av_freep(&s->local_ctx); ff_h2645_packet_uninit(&s->pkt); @@ -3526,14 +3526,16 @@ static av_cold int hevc_init_context(AVCodecContext *avctx) s->avctx = avctx; - s->HEVClc = av_mallocz(sizeof(HEVCLocalContext)); - s->HEVClcList = av_mallocz(sizeof(HEVCLocalContext*) * s->threads_number); - if (!s->HEVClc || !s->HEVClcList) + s->local_ctx = av_mallocz(sizeof(*s->local_ctx)); + if (!s->local_ctx) return AVERROR(ENOMEM); + s->nb_local_ctx = 1; + + s->HEVClc = &s->local_ctx[0]; + s->HEVClc->parent = s; s->HEVClc->logctx = avctx; s->HEVClc->common_cabac_state = &s->cabac; - s->HEVClcList[0] = s->HEVClc; s->output_frame = av_frame_alloc(); if (!s->output_frame) diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h b/src/ExtLib/ffmpeg/libavcodec/hevcdec.h index e82daf6679..5aa3d40450 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevcdec.h @@ -439,13 +439,19 @@ typedef struct HEVCLocalContext { /* properties of the boundary of the current CTB for the purposes * of the deblocking filter */ int boundary_flags; + + // an array of these structs is used for per-thread state - pad its size + // to avoid false sharing + char padding[128]; } HEVCLocalContext; typedef struct HEVCContext { const AVClass *c; // needed by private avoptions AVCodecContext *avctx; - HEVCLocalContext **HEVClcList; + HEVCLocalContext *local_ctx; + unsigned nb_local_ctx; + HEVCLocalContext *HEVClc; uint8_t threads_type; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c b/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c index b58be1e3cc..43ac991570 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c @@ -285,14 +285,14 @@ do { \ top[-1] = left[-1]; // Filtering process - if (!s->ps.sps->intra_smoothing_disabled_flag && (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) { + if (!s->ps.sps->intra_smoothing_disabled && (c_idx == 0 || s->ps.sps->chroma_format_idc == 3)) { if (mode != INTRA_DC && size != 4){ int intra_hor_ver_dist_thresh[] = { 7, 1, 0 }; int min_dist_vert_hor = FFMIN(FFABS((int)(mode - 26U)), FFABS((int)(mode - 10U))); if (min_dist_vert_hor > intra_hor_ver_dist_thresh[log2_size - 3]) { int threshold = 1 << (BIT_DEPTH - 5); - if (s->ps.sps->sps_strong_intra_smoothing_enable_flag && c_idx == 0 && + if (s->ps.sps->strong_intra_smoothing_enabled && c_idx == 0 && log2_size == 5 && FFABS(top[-1] + top[63] - 2 * top[31]) < threshold && FFABS(left[-1] + left[63] - 2 * left[31]) < threshold) { diff --git a/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c b/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c index f26ced71ef..3d704666d0 100644 --- a/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c @@ -105,44 +105,44 @@ static int nvdec_hevc_start_frame(AVCodecContext *avctx, .log2_diff_max_min_luma_coding_block_size = sps->log2_diff_max_min_coding_block_size, .log2_min_transform_block_size_minus2 = sps->log2_min_tb_size - 2, .log2_diff_max_min_transform_block_size = sps->log2_max_trafo_size - sps->log2_min_tb_size, - .pcm_enabled_flag = sps->pcm_enabled_flag, - .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm_enabled_flag ? sps->pcm.log2_min_pcm_cb_size - 3 : 0, + .pcm_enabled_flag = sps->pcm_enabled, + .log2_min_pcm_luma_coding_block_size_minus3 = sps->pcm_enabled ? sps->pcm.log2_min_pcm_cb_size - 3 : 0, .log2_diff_max_min_pcm_luma_coding_block_size = sps->pcm.log2_max_pcm_cb_size - sps->pcm.log2_min_pcm_cb_size, - .pcm_sample_bit_depth_luma_minus1 = sps->pcm_enabled_flag ? sps->pcm.bit_depth - 1 : 0, - .pcm_sample_bit_depth_chroma_minus1 = sps->pcm_enabled_flag ? sps->pcm.bit_depth_chroma - 1 : 0, + .pcm_sample_bit_depth_luma_minus1 = sps->pcm_enabled ? sps->pcm.bit_depth - 1 : 0, + .pcm_sample_bit_depth_chroma_minus1 = sps->pcm_enabled ? sps->pcm.bit_depth_chroma - 1 : 0, #if NVDECAPI_CHECK_VERSION(8, 1) .log2_max_transform_skip_block_size_minus2 = pps->log2_max_transform_skip_block_size - 2, .log2_sao_offset_scale_luma = pps->log2_sao_offset_scale_luma, .log2_sao_offset_scale_chroma = pps->log2_sao_offset_scale_chroma, - .high_precision_offsets_enabled_flag = sps->high_precision_offsets_enabled_flag, + .high_precision_offsets_enabled_flag = sps->high_precision_offsets_enabled, #endif - .pcm_loop_filter_disabled_flag = sps->pcm.loop_filter_disable_flag, - .strong_intra_smoothing_enabled_flag = sps->sps_strong_intra_smoothing_enable_flag, + .pcm_loop_filter_disabled_flag = sps->pcm_loop_filter_disabled, + .strong_intra_smoothing_enabled_flag = sps->strong_intra_smoothing_enabled, .max_transform_hierarchy_depth_intra = sps->max_transform_hierarchy_depth_intra, .max_transform_hierarchy_depth_inter = sps->max_transform_hierarchy_depth_inter, - .amp_enabled_flag = sps->amp_enabled_flag, - .separate_colour_plane_flag = sps->separate_colour_plane_flag, + .amp_enabled_flag = sps->amp_enabled, + .separate_colour_plane_flag = sps->separate_colour_plane, .log2_max_pic_order_cnt_lsb_minus4 = sps->log2_max_poc_lsb - 4, .num_short_term_ref_pic_sets = sps->nb_st_rps, - .long_term_ref_pics_present_flag = sps->long_term_ref_pics_present_flag, + .long_term_ref_pics_present_flag = sps->long_term_ref_pics_present, .num_long_term_ref_pics_sps = sps->num_long_term_ref_pics_sps, - .sps_temporal_mvp_enabled_flag = sps->sps_temporal_mvp_enabled_flag, + .sps_temporal_mvp_enabled_flag = sps->temporal_mvp_enabled, .sample_adaptive_offset_enabled_flag = sps->sao_enabled, - .scaling_list_enable_flag = sps->scaling_list_enable_flag, + .scaling_list_enable_flag = sps->scaling_list_enabled, .IrapPicFlag = IS_IRAP(s), .IdrPicFlag = IS_IDR(s), .bit_depth_luma_minus8 = sps->bit_depth - 8, .bit_depth_chroma_minus8 = sps->bit_depth - 8, #if NVDECAPI_CHECK_VERSION(9, 0) - .sps_range_extension_flag = sps->sps_range_extension_flag, - .transform_skip_rotation_enabled_flag = sps->transform_skip_rotation_enabled_flag, - .transform_skip_context_enabled_flag = sps->transform_skip_context_enabled_flag, - .implicit_rdpcm_enabled_flag = sps->implicit_rdpcm_enabled_flag, - .explicit_rdpcm_enabled_flag = sps->explicit_rdpcm_enabled_flag, - .extended_precision_processing_flag = sps->extended_precision_processing_flag, - .intra_smoothing_disabled_flag = sps->intra_smoothing_disabled_flag, - .persistent_rice_adaptation_enabled_flag = sps->persistent_rice_adaptation_enabled_flag, - .cabac_bypass_alignment_enabled_flag = sps->cabac_bypass_alignment_enabled_flag, + .sps_range_extension_flag = sps->range_extension, + .transform_skip_rotation_enabled_flag = sps->transform_skip_rotation_enabled, + .transform_skip_context_enabled_flag = sps->transform_skip_context_enabled, + .implicit_rdpcm_enabled_flag = sps->implicit_rdpcm_enabled, + .explicit_rdpcm_enabled_flag = sps->explicit_rdpcm_enabled, + .extended_precision_processing_flag = sps->extended_precision_processing, + .intra_smoothing_disabled_flag = sps->intra_smoothing_disabled, + .persistent_rice_adaptation_enabled_flag = sps->persistent_rice_adaptation_enabled, + .cabac_bypass_alignment_enabled_flag = sps->cabac_bypass_alignment_enabled, #endif .dependent_slice_segments_enabled_flag = pps->dependent_slice_segments_enabled_flag, diff --git a/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c b/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c index 27b9dd299d..191b3adbe4 100644 --- a/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/sbrdsp_template.c @@ -376,5 +376,13 @@ const attribute_visibility_hidden DECLARE_ALIGNED(16, INTFLOAT, AAC_RENAME(ff_sb {Q31(-0.99867974711855f), Q31(-0.88147068645358f)}, {Q31(-0.95531076805040f), Q31( 0.90908757154593f)}, {Q31(-0.45725933317144f), Q31(-0.56716323646760f)}, {Q31(-0.72929675029275f), Q31(-0.98008272727324f)}, {Q31( 0.75622801399036f), Q31( 0.20950329995549f)}, {Q31( 0.07069442601050f), Q31(-0.78247898470706f)}, +{Q31( 0.74496252926055f), Q31(-0.91169004445807f)}, {Q31(-0.96440182703856f), Q31(-0.94739918296622f)}, +{Q31( 0.30424629369539f), Q31(-0.49438267012479f)}, {Q31( 0.66565033746925f), Q31( 0.64652935542491f)}, +{Q31( 0.91697008020594f), Q31( 0.17514097332009f)}, {Q31(-0.70774918760427f), Q31( 0.52548653416543f)}, +{Q31(-0.70051415345560f), Q31(-0.45340028808763f)}, {Q31(-0.99496513054797f), Q31(-0.90071908066973f)}, +{Q31( 0.98164490790123f), Q31(-0.77463155528697f)}, {Q31(-0.54671580548181f), Q31(-0.02570928536004f)}, +{Q31(-0.01689629065389f), Q31( 0.00287506445732f)}, {Q31(-0.86110349531986f), Q31( 0.42548583726477f)}, +{Q31(-0.98892980586032f), Q31(-0.87881132267556f)}, {Q31( 0.51756627678691f), Q31( 0.66926784710139f)}, +{Q31(-0.99635026409640f), Q31(-0.58107730574765f)}, {Q31(-0.99969370862163f), Q31( 0.98369989360250f)}, #endif }; diff --git a/src/ExtLib/ffmpeg/libavutil/float_dsp.c b/src/ExtLib/ffmpeg/libavutil/float_dsp.c index 9913921205..bc783fc4d4 100644 --- a/src/ExtLib/ffmpeg/libavutil/float_dsp.c +++ b/src/ExtLib/ffmpeg/libavutil/float_dsp.c @@ -132,6 +132,17 @@ float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len) return p; } +double ff_scalarproduct_double_c(const double *v1, const double *v2, + size_t len) +{ + double p = 0.0; + + for (size_t i = 0; i < len; i++) + p += v1[i] * v2[i]; + + return p; +} + av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact) { AVFloatDSPContext *fdsp = av_mallocz(sizeof(AVFloatDSPContext)); @@ -149,6 +160,7 @@ av_cold AVFloatDSPContext *avpriv_float_dsp_alloc(int bit_exact) fdsp->vector_fmul_reverse = vector_fmul_reverse_c; fdsp->butterflies_float = butterflies_float_c; fdsp->scalarproduct_float = avpriv_scalarproduct_float_c; + fdsp->scalarproduct_double = ff_scalarproduct_double_c; #if ARCH_AARCH64 ff_float_dsp_init_aarch64(fdsp); diff --git a/src/ExtLib/ffmpeg/libavutil/float_dsp.h b/src/ExtLib/ffmpeg/libavutil/float_dsp.h index fda5be4daf..dd45d58222 100644 --- a/src/ExtLib/ffmpeg/libavutil/float_dsp.h +++ b/src/ExtLib/ffmpeg/libavutil/float_dsp.h @@ -19,6 +19,8 @@ #ifndef AVUTIL_FLOAT_DSP_H #define AVUTIL_FLOAT_DSP_H +#include + typedef struct AVFloatDSPContext { /** * Calculate the entry wise product of two vectors of floats and store the result in @@ -187,10 +189,25 @@ typedef struct AVFloatDSPContext { */ void (*vector_dmul)(double *dst, const double *src0, const double *src1, int len); + + /** + * Calculate the scalar product of two vectors of doubles. + * + * @param v1 first vector + * constraints: 32-byte aligned + * @param v2 second vector + * constraints: 32-byte aligned + * @param len length of vectors + * constraints: multiple of 16 + * + * @return inner product of the vectors + */ + double (*scalarproduct_double)(const double *v1, const double *v2, + size_t len); } AVFloatDSPContext; /** - * Return the scalar product of two vectors. + * Return the scalar product of two vectors of floats. * * @param v1 first input vector * @param v2 first input vector @@ -200,6 +217,18 @@ typedef struct AVFloatDSPContext { */ float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len); +/** + * Return the scalar product of two vectors of doubles. + * + * @param v1 first input vector + * @param v2 first input vector + * @param len number of elements + * + * @return inner product of the vectors + */ +double ff_scalarproduct_double_c(const double *v1, const double *v2, + size_t len); + void ff_float_dsp_init_aarch64(AVFloatDSPContext *fdsp); void ff_float_dsp_init_arm(AVFloatDSPContext *fdsp); void ff_float_dsp_init_ppc(AVFloatDSPContext *fdsp, int strict); diff --git a/src/ExtLib/ffmpeg/libavutil/lls.c b/src/ExtLib/ffmpeg/libavutil/lls.c index ec830a7848..bb9b1c2255 100644 --- a/src/ExtLib/ffmpeg/libavutil/lls.c +++ b/src/ExtLib/ffmpeg/libavutil/lls.c @@ -30,6 +30,7 @@ #include "config.h" #include "attributes.h" +#include "float_dsp.h" #include "lls.h" static void update_lls(LLSModel *m, const double *var) @@ -102,13 +103,7 @@ void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order) static double evaluate_lls(LLSModel *m, const double *param, int order) { - int i; - double out = 0; - - for (i = 0; i <= order; i++) - out += param[i] * m->coeff[order][i]; - - return out; + return ff_scalarproduct_double_c(m->coeff[order], param, order + 1); } av_cold void avpriv_init_lls(LLSModel *m, int indep_count) @@ -117,7 +112,9 @@ av_cold void avpriv_init_lls(LLSModel *m, int indep_count) m->indep_count = indep_count; m->update_lls = update_lls; m->evaluate_lls = evaluate_lls; -#if ARCH_X86 +#if ARCH_RISCV + ff_init_lls_riscv(m); +#elif ARCH_X86 ff_init_lls_x86(m); #endif } diff --git a/src/ExtLib/ffmpeg/libavutil/lls.h b/src/ExtLib/ffmpeg/libavutil/lls.h index 53c38b1342..87e9aa02bf 100644 --- a/src/ExtLib/ffmpeg/libavutil/lls.h +++ b/src/ExtLib/ffmpeg/libavutil/lls.h @@ -57,6 +57,7 @@ typedef struct LLSModel { } LLSModel; void avpriv_init_lls(LLSModel *m, int indep_count); +void ff_init_lls_riscv(LLSModel *m); void ff_init_lls_x86(LLSModel *m); void avpriv_solve_lls(LLSModel *m, double threshold, unsigned short min_order); From 3d96b1db98025a7b6a84d22d7d52bcf274ea0891 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 08:48:20 +0300 Subject: [PATCH 31/57] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D0=B1=D0=BB=D0=BE=D0=B6=D0=B5=D0=BA=20?= =?UTF-8?q?=D0=B2=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B5=20WebP=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D0=B2=20MKA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/SaveTaskDlg.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index d4f228c176..69b09df055 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -402,9 +402,14 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) for (unsigned i = 0; i < m_saveItems.size(); ++i) { const auto& item = m_saveItems[i]; - if (item.type == 't' && finalext == L"mka" && item.title == L".jpg") { + if (item.type == 't' && finalext == L"mka") { strArgs.AppendFormat(LR"( -attach "%s")", m_dstPaths[i]); - metadata.Append(L" -metadata:s:t mimetype=image/jpeg -metadata:s:t:0 filename=cover.jpg"); + if (item.title == L".jpg") { + metadata.Append(L" -metadata:s:t mimetype=image/jpeg -metadata:s:t:0 filename=cover.jpg"); + } + else if (item.title == L".webp") { + metadata.Append(L" -metadata:s:t mimetype=image/webp -metadata:s:t:0 filename=cover.webp"); + } } else { strArgs.AppendFormat(LR"( -i "%s")", m_dstPaths[i]); From 8ad3e6715d5fbd7a19444b8e5b18f27a09237843 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 17:21:02 +0300 Subject: [PATCH 32/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20Changelog.Rus.txt=20=D0=B8=20Changelog.txt?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 25 ++++++++++++++++++++++++- docs/Changelog.txt | 25 ++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 2447c26805..731d3b4b5e 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -2,8 +2,31 @@ 1.7.1.x dev ============================= +AudioSplitter +Исправлено чтения картинок из ID3v2.3. + +FLVSplitter +Исправлено определение размера видеокадра для некоторых файлов FLV. + MPCVideoDec -Декодирование VVC сделано с помощью vvdec (https://github.com/fraunhoferhhi/vvdec). +Для декодирования VVC теперь используется декодер VVdeC (https://github.com/fraunhoferhhi/vvdec). +Исправлена работа настройки "Отключить DXVA для SD видео (H.264)" для вертикальных видео. +Исправлены декодирование некоторых VP9 видео. +Исправлены декодирование некоторых интерлейсных H.264 видео. +Добавлена ​​проверка метаданных HDR. +Добавлена поддержка видео HEVC получаемого от WM ASF Reader. + +Плеер +Скорость воспроизведения теперь можно менять с шагом 1%. +При сохранении только звука с YouTube добавляем к аудиофайлу обложку с помощью доступного FFmpeg. +Добалена настройка времени тайм-аута при подучении данных из сети. + +Обновлен венгерский перевод (автор mickey). +Обновлен китайский (Simplified) перевод (автор wushantao). +Обновлен немецкий перевод (автор Klaus1189). +Обновлен турецкий перевод (автор cmhrky). +Обновлен итальянский перевод (автор mapi68). +Обновлен испанский перевод (автор IPeluchito). Обновлены библиотеки: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 8e1b98e8b3..9e5d074d23 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -2,8 +2,31 @@ 1.7.1.x dev ============================= +AudioSplitter +Fixed reading pictures from ID3v2.3. + +FLVSplitter +Fixed video frame size detection for some FLV files. + MPCVideoDec -VVC decoding is done using vvdec (https://github.com/fraunhoferhhi/vvdec). +VVC decoding now uses the VVdeC decoder (https://github.com/fraunhoferhhi/vvdec). +The "Disable DXVA for SD (H.264)" setting for vertical videos has been fixed. +Fixed decoding of some VP9 videos. +Fixed decoding of some interlaced H.264 videos. +Added validation of HDR metadata. +Added support for HEVC video received from WM ASF Reader. + +Player +Playback speed can now be changed in 1% increments. +When saving only audio from YouTube, add cover art to the audio file using the available FFmpeg. +Added timeout time setting when receiving data from the network. + +Updated Hungarian translation (by mickey). +Updated Chinese (Simplified) translation (by wushantao). +Updated German translation (by Klaus1189). +Updated Turkish translation (by cmhrky). +Updated Italian translation (by mapi68). +Updated Spanish translation (by IPeluchito). Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; From 9c555e107f80301a5545a21abac2070de7ea87d0 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 2 Jun 2024 22:24:58 +0300 Subject: [PATCH 33/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BD=D0=B5=D0=BC=D0=B5=D1=86=D0=BA=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=20Klaus1189).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.de.rc | 2 +- src/apps/mpcresources/text/mplayerc.de.rc.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.de.rc b/src/apps/mpcresources/mplayerc.de.rc index 734b82e223..f410366995 100644 --- a/src/apps/mpcresources/mplayerc.de.rc +++ b/src/apps/mpcresources/mplayerc.de.rc @@ -293,7 +293,7 @@ BEGIN CONTROL "Verstrichene/Verbleibende Zeit / Gesamtzeit",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Disc-Wiedergabe deaktivieren",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "&Prozesspriorität höher als normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Netzwerk-Zeitüberschreitungen:",IDC_STATIC,124,222,167,41,WS_GROUP + GROUPBOX "Netzwerk-Zeitüberschreitungen",IDC_STATIC,124,222,167,41,WS_GROUP LTEXT "Verbindung:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 diff --git a/src/apps/mpcresources/text/mplayerc.de.rc.txt b/src/apps/mpcresources/text/mplayerc.de.rc.txt index a860f32013..9394ffc3bf 100644 --- a/src/apps/mpcresources/text/mplayerc.de.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.de.rc.txt @@ -434,7 +434,7 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Verstrichene/Verbleibende Zeit / Gesamtzeit" 38 "Disc-Wiedergabe deaktivieren" 39 "&Prozesspriorität höher als normal" -40 "Netzwerk-Zeitüberschreitungen:" +40 "Netzwerk-Zeitüberschreitungen" 41 "Verbindung:" 44 "Sek." 45 "Datenempfang:" From 7da1a831e1d385bb04ee8a62d4360c4527065354 Mon Sep 17 00:00:00 2001 From: v0lt Date: Mon, 3 Jun 2024 18:06:43 +0300 Subject: [PATCH 34/57] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82?= =?UTF-8?q?=D0=BA=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 731d3b4b5e..3ee7b4f0a0 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -19,7 +19,7 @@ MPCVideoDec Плеер Скорость воспроизведения теперь можно менять с шагом 1%. При сохранении только звука с YouTube добавляем к аудиофайлу обложку с помощью доступного FFmpeg. -Добалена настройка времени тайм-аута при подучении данных из сети. +Добавлена настройка времени тайм-аута при получении данных из сети. Обновлен венгерский перевод (автор mickey). Обновлен китайский (Simplified) перевод (автор wushantao). From ac800fbbebd6bae754e3a7e6e411e2250912dc4f Mon Sep 17 00:00:00 2001 From: v0lt Date: Mon, 3 Jun 2024 18:12:03 +0300 Subject: [PATCH 35/57] =?UTF-8?q?=D0=91=D0=BE=D0=BB=D0=B5=D0=B5=20=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BD=D0=B0=D1=8F=20=D0=BD=D0=B0=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=B9=D0=BA=D0=B0=20=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B2=20FFmpeg.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mplayerc/SaveTaskDlg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mplayerc/SaveTaskDlg.cpp b/src/apps/mplayerc/SaveTaskDlg.cpp index 69b09df055..a114dd85cb 100644 --- a/src/apps/mplayerc/SaveTaskDlg.cpp +++ b/src/apps/mplayerc/SaveTaskDlg.cpp @@ -438,7 +438,7 @@ void CSaveTaskDlg::SaveHTTP(const int iSubLangDefault) if (iSubLangDefault >= 0) { strArgs.AppendFormat(L" -disposition:s:%d default", iSubLangDefault); } - if (m_saveItems.back().type == 't') { + if (m_saveItems.back().type == 't' && finalext == L"m4a") { if (EndsWith(m_dstPaths.back(), L".webp")) { strArgs.Append(L" -c:v:0 mjpeg"); } From 82b656dcb85f92519947315e591bcf469b13b507 Mon Sep 17 00:00:00 2001 From: alexins Date: Tue, 4 Jun 2024 13:57:57 +0200 Subject: [PATCH 36/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20MediaInfo=20git-v24.05-gd9ba2b6c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 1 + docs/Changelog.txt | 1 + src/ExtLib/MediaInfo/Language/it.csv | 12 +- .../MediaInfo/MediaInfo/Audio/File_Aac.h | 1 - .../MediaInfo/Audio/File_Aac_GeneralAudio.cpp | 2 + .../MediaInfo/MediaInfo/Audio/File_Ac3.cpp | 153 +- .../MediaInfo/MediaInfo/Audio/File_Ac3.h | 8 + .../MediaInfo/MediaInfo/Audio/File_Ac4.cpp | 2 +- .../MediaInfo/MediaInfo/Audio/File_Adm.cpp | 2086 ++++++++++------- .../Audio/File_DolbyAudioMetadata.cpp | 4 + .../MediaInfo/MediaInfo/Audio/File_DolbyE.cpp | 182 +- .../MediaInfo/MediaInfo/Audio/File_Dsdiff.cpp | 14 +- .../MediaInfo/MediaInfo/Audio/File_Dsf.cpp | 6 +- .../MediaInfo/MediaInfo/Audio/File_Dts.cpp | 2 +- .../MediaInfo/MediaInfo/Audio/File_DtsUhd.cpp | 2 +- .../MediaInfo/MediaInfo/Audio/File_Mpega.cpp | 9 +- .../MediaInfo/MediaInfo/Audio/File_Mpega.h | 1 - .../MediaInfo/Audio/File_SmpteSt0337.cpp | 19 +- .../MediaInfo/MediaInfo/Audio/File_Wvpk.cpp | 89 +- .../MediaInfo/MediaInfo/Audio/File_Wvpk.h | 8 +- .../MediaInfo/MediaInfo/File__Analyze.cpp | 639 ++++- .../MediaInfo/MediaInfo/File__Analyze.h | 32 + .../MediaInfo/File__Analyze_MinimizeSize.h | 25 + .../MediaInfo/File__Analyze_Streams.cpp | 5 +- .../File__Analyze_Streams_Finish.cpp | 2 +- .../MediaInfo/File__MultipleParsing.cpp | 82 +- .../MediaInfo/File__MultipleParsing.h | 3 - .../MediaInfo/MediaInfo/Image/File_Bmp.cpp | 80 +- .../MediaInfo/MediaInfo/Image/File_Jpeg.cpp | 19 + .../MediaInfo/MediaInfo/Image/File_Jpeg.h | 1 + .../MediaInfo/MediaInfo/Image/File_Tga.cpp | 63 +- .../MediaInfo/MediaInfo/Image/File_Tga.h | 1 + .../MediaInfo/MediaInfo/Image/File_Tiff.cpp | 31 + .../MediaInfo/MediaInfo/Image/File_Tiff.h | 1 + .../MediaInfo/MediaInfo/MediaInfo_Config.cpp | 5 +- .../MediaInfo/MediaInfo_Config_Automatic.cpp | 18 +- .../MediaInfo/MediaInfo_Config_MediaInfo.cpp | 216 +- .../MediaInfo/MediaInfo_Config_MediaInfo.h | 23 + .../MediaInfo/MediaInfo/MediaInfo_File.cpp | 6 +- .../MediaInfo/MediaInfo/MediaInfo_Inform.cpp | 4 +- .../MediaInfo/Multiple/File_DvDif.cpp | 1 - .../MediaInfo/MediaInfo/Multiple/File_DvDif.h | 1 - .../MediaInfo/MediaInfo/Multiple/File_Flv.cpp | 148 +- .../MediaInfo/MediaInfo/Multiple/File_Flv.h | 4 +- .../MediaInfo/MediaInfo/Multiple/File_Gxf.cpp | 1 - .../MediaInfo/MediaInfo/Multiple/File_Ivf.cpp | 3 +- .../MediaInfo/MediaInfo/Multiple/File_Mk.cpp | 2 +- .../MediaInfo/Multiple/File_Mpeg4.cpp | 32 +- .../MediaInfo/MediaInfo/Multiple/File_Mpeg4.h | 33 +- .../Multiple/File_Mpeg4_Elements.cpp | 103 +- .../MediaInfo/Multiple/File_MpegPs.cpp | 20 +- .../MediaInfo/Multiple/File_MpegTs.cpp | 23 +- .../MediaInfo/MediaInfo/Multiple/File_Mxf.cpp | 429 ++-- .../MediaInfo/MediaInfo/Multiple/File_Mxf.h | 18 +- .../MediaInfo/MediaInfo/Multiple/File_Nsv.cpp | 2 +- .../MediaInfo/MediaInfo/Multiple/File_Ogg.cpp | 1 - .../MediaInfo/Multiple/File_Riff.cpp | 29 +- .../MediaInfo/MediaInfo/Multiple/File_Riff.h | 5 + .../MediaInfo/Multiple/File_Riff_Elements.cpp | 15 +- .../MediaInfo/MediaInfo/Multiple/File_Swf.cpp | 5 +- .../MediaInfo/MediaInfo/Multiple/File_Vbi.cpp | 564 ++++- .../MediaInfo/MediaInfo/Multiple/File_Vbi.h | 38 +- .../MediaInfo/MediaInfo/Tag/File_Id3v2.cpp | 48 +- .../MediaInfo/MediaInfo/Tag/File_Id3v2.h | 1 + .../MediaInfo/Tag/File_VorbisCom.cpp | 35 +- .../MediaInfo/MediaInfo/Text/File_Cdp.cpp | 3 +- .../MediaInfo/MediaInfo/Text/File_Eia608.cpp | 25 +- .../MediaInfo/MediaInfo/Text/File_Eia708.cpp | 2 +- .../MediaInfo/Text/File_Teletext.cpp | 1 + src/ExtLib/MediaInfo/MediaInfo/TimeCode.h | 6 +- .../MediaInfo/MediaInfo/Video/File_Av1.cpp | 16 +- .../MediaInfo/MediaInfo/Video/File_Av1.h | 1 - .../MediaInfo/MediaInfo/Video/File_Avc.cpp | 23 +- .../MediaInfo/MediaInfo/Video/File_Avc.h | 1 - .../MediaInfo/MediaInfo/Video/File_AvsV.cpp | 1 - .../MediaInfo/MediaInfo/Video/File_AvsV.h | 1 - .../MediaInfo/MediaInfo/Video/File_Dirac.cpp | 1 - .../MediaInfo/MediaInfo/Video/File_Ffv1.cpp | 62 +- .../MediaInfo/MediaInfo/Video/File_Ffv1.h | 7 + .../MediaInfo/MediaInfo/Video/File_H263.cpp | 72 +- .../MediaInfo/MediaInfo/Video/File_H263.h | 1 - .../MediaInfo/MediaInfo/Video/File_Hevc.cpp | 30 +- .../MediaInfo/MediaInfo/Video/File_Hevc.h | 1 - .../MediaInfo/MediaInfo/Video/File_Mpeg4v.cpp | 1 - .../MediaInfo/MediaInfo/Video/File_Mpeg4v.h | 1 - .../MediaInfo/MediaInfo/Video/File_Mpegv.cpp | 1 - .../MediaInfo/MediaInfo/Video/File_Mpegv.h | 1 - .../MediaInfo/MediaInfo/Video/File_Vc1.cpp | 1 - .../MediaInfo/MediaInfo/Video/File_Vc1.h | 1 - 89 files changed, 4208 insertions(+), 1471 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 3ee7b4f0a0..57be707903 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -30,6 +30,7 @@ MPCVideoDec Обновлены библиотеки: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; + MediaInfo git-v24.05-gd9ba2b6c; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 9e5d074d23..aba9b48e52 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -30,6 +30,7 @@ Updated Spanish translation (by IPeluchito). Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; + MediaInfo git-v24.05-gd9ba2b6c; vvdec git-v2.3.0-5-gffe3010. diff --git a/src/ExtLib/MediaInfo/Language/it.csv b/src/ExtLib/MediaInfo/Language/it.csv index d6ab192739..d2202377bd 100644 --- a/src/ExtLib/MediaInfo/Language/it.csv +++ b/src/ExtLib/MediaInfo/Language/it.csv @@ -127,9 +127,9 @@ second1; secondo second2; secondi second3; secondi - slice per frame1; - slice per frame2; - slice per frame3; + slice per frame1;segmento per frame1 + slice per frame2;segmento per frame2 + slice per frame3;segmento per frame 3 text stream1; sottotitolo text stream2; sottotitoli text stream3; sottotitoli @@ -466,7 +466,7 @@ Format_Settings_QPel;Impostazioni formato, QPel Format_Settings_RefFrames;Impostazioni formato, ReFrames Format_Settings_SBR;Impostazioni formato, SBR Format_Settings_Sign;Impostazioni formato, Firma -Format_Settings_SliceCount; +Format_Settings_SliceCount;Impostazione numero segmenti Format_Settings_Wrapping;Impostazioni formato, modo a capo automatico Format_Tier;Livello formato Format_Url;Sito web formato @@ -787,7 +787,7 @@ Language_eu;basco Language_fa;Persiano Language_ff;Fula Language_fi;Finnico -Language_fil; +Language_fil;Filippino Language_fj;Fijian Language_fo;Faroese Language_fr;Francese @@ -1030,7 +1030,7 @@ ms;ms MSDI;MSDI MultipleStream;Tracce multiple MusicBy;Composto da -MultiView_Count; +MultiView_Count;N. viste multiple MuxingMode;Modo muxing MuxingMode_MoreInfo;Informazioni aggiuntive modo muxing MuxingMode_PackedBitstream;Packet Bitstream diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac.h b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac.h index 539f70a20a..0029254516 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac.h @@ -89,7 +89,6 @@ class File_Aac : public File_Usac, public File__Tags_Helper public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; enum mode { Mode_Unknown, diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp index 47d28a7178..9667585852 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Aac_GeneralAudio.cpp @@ -3202,6 +3202,8 @@ void File_Aac::raw_data_block() if (ChannelCount_Temp && ChannelPos_Temp!=ChannelCount_Temp) Fill(Stream_Audio, 0, "Errors", "Incoherent count of channels"); } + if (IsSub && Mode==Mode_payload && (!Trusted_Get() || !HasEnd)) + RanOutOfData("AAC"); Element_End0(); } diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.cpp index 7cec1d1b98..a2881a0794 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.cpp @@ -21,10 +21,11 @@ //*************************************************************************** //--------------------------------------------------------------------------- -#if defined(MEDIAINFO_AC3_YES) || defined(MEDIAINFO_DVDV_YES) || defined(MEDIAINFO_MPEG4_YES) || defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MIXML_YES) +#if defined(MEDIAINFO_AC3_YES) || defined(MEDIAINFO_DOLBYE_YES) || defined(MEDIAINFO_DVDV_YES) || defined(MEDIAINFO_MPEG4_YES) || defined(MEDIAINFO_MPEGPS_YES) || defined(MEDIAINFO_MPEGTS_YES) || defined(MEDIAINFO_MIXML_YES) //--------------------------------------------------------------------------- #include "ZenLib/Conf.h" +#include using namespace ZenLib; namespace MediaInfoLib @@ -101,6 +102,24 @@ extern const int16u AC3_BitRate[]= extern const int8u AC3_Channels[]= {2, 1, 2, 3, 3, 4, 4, 5}; +//--------------------------------------------------------------------------- +static const char* AC3_dynrngprof[]= +{ + "Film Standard", + "Film Light", + "Music Standard", + "Music Light", + "Speech", +}; +extern std::string AC3_dynrngprof_Get(int8u Value) +{ + if (!Value) + return {}; + if (Value>sizeof(AC3_dynrngprof)/sizeof(AC3_dynrngprof[0])) + return std::to_string(Value); + return AC3_dynrngprof[Value - 1]; +} + //--------------------------------------------------------------------------- } //NameSpace @@ -192,6 +211,39 @@ const char* AC3_ChannelLayout_lfeon[]= "L R C LFE Ls Rs", }; +//--------------------------------------------------------------------------- +extern const char* AC3_roomtyp[]= +{ + "Large", + "Small", + "3", +}; + +//--------------------------------------------------------------------------- +extern const char* AC3_dmixmod[]= +{ + "Lt/Rt", + "Lo/Ro", + "3", +}; + +//--------------------------------------------------------------------------- +extern string AC3_Level_Value(int8u Index, float Start, float Multiplier) +{ + return Index == 7 ? string("-inf") : Ztring::ToZtring((Start - (int)Index * Multiplier), 1).To_UTF8(); +} + +//--------------------------------------------------------------------------- +extern void AC3_Level_Fill(File__Analyze* A, size_t StreamPos, int8u Index, float Start, float Multiplier, const char* Name) +{ + string Value = AC3_Level_Value(Index, Start, Multiplier); + A->Fill(Stream_Audio, StreamPos, Name, Value); + A->Fill_SetOptions(Stream_Audio, StreamPos, Name, "N NT"); + string Name_String = string(Name) + "/String"; + A->Fill(Stream_Audio, StreamPos, Name_String.c_str(), Value + " dB"); + A->Fill_SetOptions(Stream_Audio, StreamPos, Name_String.c_str(), "Y NTN"); +} + //--------------------------------------------------------------------------- int16u AC3_acmod2chanmap[]= { @@ -974,7 +1026,7 @@ File_Ac3::File_Ac3() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; Buffer_TotalBytes_Fill_Max=1024*1024; PTS_DTS_Needed=true; StreamSource=IsStream; @@ -1009,6 +1061,8 @@ File_Ac3::File_Ac3() bsmod_Max[Pos][Pos2]=0; cmixlev_Max[Pos][Pos2]=(int8u)-1; surmixlev_Max[Pos][Pos2]=(int8u)-1; + roomtyp_Max[Pos][Pos2]=(int8u)-1; + dmixmod_Max[Pos][Pos2]=(int8u)-1; dsurmod_Max[Pos][Pos2]=0; chanmape_Max[Pos][Pos2]=false; chanmap_Max[Pos][Pos2]=0; @@ -1344,14 +1398,18 @@ void File_Ac3::Streams_Fill() Fill(Stream_Audio, 0, "dialnorm", FirstFrame_Dolby.dialnorm==0?-31:-FirstFrame_Dolby.dialnorm); Fill_SetOptions(Stream_Audio, 0, "dialnorm", "N NT"); Fill(Stream_Audio, 0, "dialnorm/String", Ztring::ToZtring(FirstFrame_Dolby.dialnorm==0?-31:-FirstFrame_Dolby.dialnorm)+__T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "dialnorm/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dialnorm/String", "Y NTN"); if (FirstFrame_Dolby.compre) { - float64 Value=AC3_compr[FirstFrame_Dolby.compr>>4]+20*std::log10(((float)(0x10+(FirstFrame_Dolby.compr&0x0F)))/32); + float64 Value; + if (FirstFrame_Dolby.compr ==0) + Value=0; //Special case in the formula + else + Value=AC3_compr[FirstFrame_Dolby.compr>>4]+20*std::log10(((float)(0x10+(FirstFrame_Dolby.compr&0x0F)))/32); Fill(Stream_Audio, 0, "compr", Value, 2); Fill_SetOptions(Stream_Audio, 0, "compr", "N NT"); Fill(Stream_Audio, 0, "compr/String", Ztring::ToZtring(Value, 2)+__T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "compr/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "compr/String", "Y NTN"); } if (FirstFrame_Dolby.dynrnge) { @@ -1363,7 +1421,7 @@ void File_Ac3::Streams_Fill() Fill(Stream_Audio, 0, "dynrng", Value, 2); Fill_SetOptions(Stream_Audio, 0, "dynrng", "N NT"); Fill(Stream_Audio, 0, "dynrng/String", Ztring::ToZtring(Value, 2)+__T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "dynrng/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dynrng/String", "Y NTN"); } for (int8u Pos=0; Pos<8; Pos++) @@ -1378,7 +1436,7 @@ void File_Ac3::Streams_Fill() Fill(Stream_Audio, 0, "dsurmod", dsurmod_Max[Pos][Pos2]); Fill_SetOptions(Stream_Audio, 0, "dsurmod", "N NT"); Fill(Stream_Audio, 0, "dsurmod/String", AC3_Surround[dsurmod_Max[Pos][Pos2]]); - Fill_SetOptions(Stream_Audio, 0, "dsurmod/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dsurmod/String", "Y NTN"); } Fill_SetOptions(Stream_Audio, 0, "bsid", "N NT"); Fill(Stream_Audio, 0, "acmod", acmod_Max[Pos][Pos2]); @@ -1474,11 +1532,48 @@ void File_Ac3::Streams_Fill() // Other metadata if (cmixlev_Max[0][0]<=2) { - Fill(Stream_Audio, 0, "AC3_metadata cmixlev/String", Ztring::ToZtring(-3 - ((float)cmixlev_Max[0][0]) * 1.5, 1).To_UTF8() + " dB"); + string Value = Ztring::ToZtring(-3 - ((float)cmixlev_Max[0][0]) * 1.5, 1).To_UTF8(); + Fill(Stream_Audio, 0, "cmixlev", Value); + Fill_SetOptions(Stream_Audio, 0, "cmixlev", "N NT"); + Fill(Stream_Audio, 0, "cmixlev/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, 0, "cmixlev/String", "Y NTN"); } if (surmixlev_Max[0][0]<=2) { - Fill(Stream_Audio, 0, "AC3_metadata surmixlev/String", (surmixlev_Max[0][0]==2?string("-inf"):to_string(-3 - (int)surmixlev_Max[0][0] * 3)) + " dB"); + string Value = (surmixlev_Max[0][0] == 2 ? string("-inf") : to_string(-3 - (int)surmixlev_Max[0][0] * 3)); + Fill(Stream_Audio, 0, "surmixlev", Value + " dB"); + Fill_SetOptions(Stream_Audio, 0, "surmixlev", "N NT"); + Fill(Stream_Audio, 0, "surmixlev/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, 0, "surmixlev/String", "Y NTN"); + } + if (roomtyp_Max[0][0]!=(int8u)-1) + { + string Value = to_string(80 + mixlevel_Max[0][0]); + Fill(Stream_Audio, 0, "mixlevel", Value); + Fill_SetOptions(Stream_Audio, 0, "mixlevel", "N NT"); + Fill(Stream_Audio, 0, "mixlevel/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, 0, "mixlevel/String", "Y NTN"); + if (roomtyp_Max[0][0]) { + Fill(Stream_Audio, 0, "roomtyp", AC3_roomtyp[roomtyp_Max[0][0] - 1]); + Fill_SetOptions(Stream_Audio, 0, "roomtyp", "Y NTY"); + } + } + if (dmixmod_Max[0][0]!=(int8u)-1) + { + if (dmixmod_Max[0][0]) + { + Fill(Stream_Audio, 0, "dmixmod", AC3_dmixmod[dmixmod_Max[0][0] - 1]); + Fill_SetOptions(Stream_Audio, 0, "dmixmod", "Y NTY"); + } + AC3_Level_Fill(this, 0, ltrtcmixlev_Max[0][0], 3, 1.5, "ltrtcmixlev"); + AC3_Level_Fill(this, 0, ltrtsurmixlev_Max[0][0], 3, 1.5, "ltrtsurmixlev"); + AC3_Level_Fill(this, 0, lorocmixlev_Max[0][0], 3, 1.5, "lorocmixlev"); + AC3_Level_Fill(this, 0, lorosurmixlev_Max[0][0], 3, 1.5, "lorosurmixlev"); + if (adconvtyp_Max[0][0]) + { + Fill(Stream_Audio, 0, "adconvtyp", "HDCD"); + Fill_SetOptions(Stream_Audio, 0, "adconvtyp", "Y NTY"); + } } } @@ -1508,15 +1603,15 @@ void File_Ac3::Streams_Finish() Fill(Stream_Audio, 0, "dialnorm_Average", Average_dB, 0); Fill_SetOptions(Stream_Audio, 0, "dialnorm_Average", "N NT"); Fill(Stream_Audio, 0, "dialnorm_Average/String", Ztring::ToZtring(Average_dB, 0) + __T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "dialnorm_Average/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dialnorm_Average/String", "Y NTN"); Fill(Stream_Audio, 0, "dialnorm_Minimum", -Minimum_Raw); Fill_SetOptions(Stream_Audio, 0, "dialnorm_Minimum", "N NT"); Fill(Stream_Audio, 0, "dialnorm_Minimum/String", Ztring::ToZtring(-Minimum_Raw) + __T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "dialnorm_Minimum/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dialnorm_Minimum/String", "Y NTN"); Fill(Stream_Audio, 0, "dialnorm_Maximum", -Maximum_Raw); Fill_SetOptions(Stream_Audio, 0, "dialnorm_Maximum", "N NTN"); Fill(Stream_Audio, 0, "dialnorm_Maximum/String", Ztring::ToZtring(-Maximum_Raw) + __T(" dB")); - Fill_SetOptions(Stream_Audio, 0, "dialnorm_Maximum/String", "N NTN"); + Fill_SetOptions(Stream_Audio, 0, "dialnorm_Maximum/String", "Y NTN"); Fill(Stream_Audio, 0, "dialnorm_Count", Count); Fill_SetOptions(Stream_Audio, 0, "dialnorm_Count", "N NTN"); } @@ -2283,11 +2378,11 @@ void File_Ac3::Core_Frame() //Parsing int16u frmsiz=0, chanmap=0; - int8u dialnorm=(int8u)-1, dialnorm2=(int8u)-1, compr=(int8u)-1, compr2=(int8u)-1, dynrng=(int8u)-1, dynrng2=(int8u)-1, cmixlev=(int8u)-1, surmixlev=(int8u)-1; + int8u dialnorm=(int8u)-1, dialnorm2=(int8u)-1, compr=(int8u)-1, compr2=(int8u)-1, dynrng=(int8u)-1, dynrng2=(int8u)-1, cmixlev=(int8u)-1, surmixlev=(int8u)-1, mixlevel=(int8u)-1, roomtyp=(int8u)-1, dmixmod=(int8u)-1, ltrtcmixlev=(int8u)-1, ltrtsurmixlev=(int8u)-1, lorocmixlev=(int8u)-1, lorosurmixlev=(int8u)-1; int8u strmtyp=0, substreamid=0, acmod=0, bsmod=0, dsurmod=0; bool compre=false, compr2e=false, dynrnge=false, dynrng2e=false; bool lfeon=false, chanmape=false; - bool addbsie=false; + bool addbsie=false, adconvtyp=false; if (bsid<=0x09) { @@ -2318,8 +2413,8 @@ void File_Ac3::Core_Frame() Skip_S1(8, "langcod - Language Code"); TEST_SB_END(); TEST_SB_SKIP( "audprodie - Audio Production Information Exists"); - Skip_S1(8, "mixlevel - Mixing Level"); - Skip_S1(2, "roomtyp - Room Type"); + Get_S1 (8, mixlevel, "mixlevel - Mixing Level"); + Get_S1 (2, roomtyp, "roomtyp - Room Type"); TEST_SB_END(); if (acmod==0) //1+1 mode { @@ -2340,16 +2435,16 @@ void File_Ac3::Core_Frame() if (bsid==0x06) { TEST_SB_SKIP( "xbsi1e"); - Skip_S1(2, "dmixmod"); - Skip_S1(3, "ltrtcmixlev"); - Skip_S1(3, "ltrtsurmixlev"); - Skip_S1(3, "lorocmixlev"); - Skip_S1(3, "lorosurmixlev"); + Get_S1 (2, dmixmod, "dmixmod"); + Get_S1 (3, ltrtcmixlev, "ltrtcmixlev"); + Get_S1 (3, ltrtsurmixlev, "ltrtsurmixlev"); + Get_S1 (3, lorocmixlev, "lorocmixlev"); + Get_S1 (3, lorosurmixlev, "lorosurmixlev"); TEST_SB_END(); TEST_SB_SKIP( "xbsi2e"); Get_S1 (2, dsurexmod, "dsurexmod"); Get_S1 (2, dheadphonmod, "dheadphonmod"); - Skip_SB( "adconvtyp"); + Get_SB ( adconvtyp, "adconvtyp"); Skip_S1(8, "xbsi2"); Skip_SB( "encinfo"); TEST_SB_END(); @@ -2469,7 +2564,7 @@ void File_Ac3::Core_Frame() TEST_SB_END(); } TEST_SB_SKIP( "mixmdate"); - int8u dmixmod, ltrtcmixlev, lorocmixlev, ltrtsurmixlev, lorosurmixlev, mixdef; + int8u mixdef; if(acmod > 0x2) Get_S1 (2, dmixmod, "dmixmod"); if((acmod&0x1) && (acmod>0x2)) @@ -2611,8 +2706,8 @@ void File_Ac3::Core_Frame() if (acmod>=0x6) Get_S1 (2, dsurexmod, "dsurexmod"); TEST_SB_SKIP( "audprodie"); - Skip_S1(5, "mixlevel"); - Skip_S1(2, "roomtyp"); + Get_S1 (5, mixlevel, "mixlevel"); + Get_S1 (2, roomtyp, "roomtyp"); Skip_S1(1, "adconvtyp"); TEST_SB_END(); if (acmod==0x0) @@ -3813,6 +3908,14 @@ void File_Ac3::Core_Frame() bsmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=bsmod; cmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=cmixlev; surmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=surmixlev; + mixlevel_Max[substreamid_Independant_Current][strmtyp+substreamid]=mixlevel; + roomtyp_Max[substreamid_Independant_Current][strmtyp+substreamid]=roomtyp; + dmixmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=dmixmod; + ltrtcmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=ltrtcmixlev; + ltrtsurmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=ltrtsurmixlev; + lorocmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=lorocmixlev; + lorosurmixlev_Max[substreamid_Independant_Current][strmtyp+substreamid]=lorosurmixlev; + adconvtyp_Max[substreamid_Independant_Current][strmtyp+substreamid]=adconvtyp; dsurmod_Max[substreamid_Independant_Current][strmtyp+substreamid]=dsurmod; chanmape_Max[substreamid_Independant_Current][strmtyp+substreamid]=chanmape; chanmap_Max[substreamid_Independant_Current][strmtyp+substreamid]=chanmap; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.h b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.h index 19e817e2d7..1b88cd978a 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac3.h @@ -156,7 +156,15 @@ private : int8u acmod_Max[8][9]; int8u cmixlev_Max[8][9]; int8u surmixlev_Max[8][9]; + int8u mixlevel_Max[8][9]; + int8u roomtyp_Max[8][9]; int8u dsurmod_Max[8][9]; + int8u dmixmod_Max[8][9]; + int8u ltrtcmixlev_Max[8][9]; + int8u ltrtsurmixlev_Max[8][9]; + int8u lorocmixlev_Max[8][9]; + int8u lorosurmixlev_Max[8][9]; + bool adconvtyp_Max[8][9]; int8u numblkscod; int8u dsurexmod; int8u dheadphonmod; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac4.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac4.cpp index efefce6cc4..6ef5a7e5e3 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac4.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Ac4.cpp @@ -1116,7 +1116,7 @@ File_Ac4::File_Ac4() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; Buffer_TotalBytes_Fill_Max=1024*1024; PTS_DTS_Needed=true; StreamSource=IsStream; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Adm.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Adm.cpp index cb40642715..6b25caf4b5 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Adm.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Adm.cpp @@ -45,6 +45,20 @@ #include using namespace ZenLib; using namespace std; +#if __cplusplus > 202002L || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSVC_LANG > 202002L) + #define constexpr23 constexpr +#else + #define constexpr23 +#endif +#if __cplusplus >= 202002L || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSVC_LANG >= 202002L) +#else + #define consteval constexpr +#endif +#if __cplusplus >= 201703 || _MSC_VER >= 1900 +#else + template + inline constexpr size_t size(const T(&)[N]) noexcept { return N; } +#endif //--------------------------------------------------------------------------- namespace MediaInfoLib @@ -246,6 +260,7 @@ static bool IsHexaDigit(const string& Value, size_t pos, size_t len) enum check_flags_items { Count0, + Count1, Count2, Dolby0, Dolby1, @@ -253,7 +268,6 @@ enum check_flags_items { AdvSSE0, AdvSSE1, AdvSSE2, - Reserved8, Reserved9, Version_Max0, Version_Max1, @@ -265,9 +279,9 @@ enum check_flags_items { }; class check_flags : public bitset { public: - constexpr check_flags(unsigned long val) : bitset(val) {} - constexpr check_flags(unsigned long min, unsigned long max, unsigned long val0, unsigned long val1, unsigned long val2, unsigned long val3, unsigned long val4, unsigned long val5, unsigned long val6, unsigned long val7) - : check_flags((val0 << 0) | (val1 << 1) | (val2 << 2) | (val3 << 3) | (val4 << 4) | (val5 << 5) | (val6 << 6) | (val7 << 7) | (min << Version_Min0) | (max << Version_Max0)) {} + consteval check_flags(unsigned long val) : bitset(val) {} + consteval check_flags(unsigned long min, unsigned long max, unsigned long val0, unsigned long val1, unsigned long val2, unsigned long val3, unsigned long val4, unsigned long val5, unsigned long val6, unsigned long val7, unsigned long val8) + : check_flags((val0 << 0) | (val1 << 1) | (val2 << 2) | (val3 << 3) | (val4 << 4) | (val5 << 5) | (val6 << 6) | (val7 << 7) | (val8 << 8) | (min << Version_Min0) | (max << Version_Max0)) {} }; struct attribute_item { @@ -283,12 +297,15 @@ struct attribute_item { typedef attribute_item attribute_items[]; struct element_item { - const char* Name; - check_flags Flags; - unsigned long Min() const { + const char* const Name; + const check_flags Flags; + const uint8_t LinkedItem; + constexpr element_item(const char* const Name, const check_flags Flags, const uint8_t LinkedItem = 0) + : Name(Name), Flags(Flags), LinkedItem(LinkedItem) {} + constexpr23 unsigned long Min() const noexcept { return (Flags.to_ulong() >> Version_Min0); } - unsigned long Max() const { + constexpr23 unsigned long Max() const noexcept { return (Flags.to_ulong() >> Version_Max0) & 0x7; } }; @@ -815,15 +832,14 @@ enum audioBlockFormat_Attribute { enum audioBlockFormat_Element { audioBlockFormat_gain, audioBlockFormat_importance, + audioBlockFormat_jumpPosition, audioBlockFormat_headLocked, audioBlockFormat_headphoneVirtualise, audioBlockFormat_speakerLabel, audioBlockFormat_position, audioBlockFormat_outputChannelFormatIDRef, audioBlockFormat_outputChannelIDRef, - audioBlockFormat_jumpPosition, audioBlockFormat_matrix, - audioBlockFormat_coefficient, audioBlockFormat_width, audioBlockFormat_height, audioBlockFormat_depth, @@ -1002,6 +1018,7 @@ enum tagGroup_Element { enum error_Type { Error, Warning, + Information, error_Type_Max, }; @@ -1023,7 +1040,9 @@ static_assert(sizeof(Source_Strings) / sizeof(Source_Strings[0]) == source_Max, static const char* error_Type_String[] = { "Errors", "Warnings", + "Infos", }; +static_assert(sizeof(error_Type_String) / sizeof(error_Type_String[0]) == error_Type_Max, IncoherencyMessage); enum schema { Schema_Unknown, @@ -1042,583 +1061,669 @@ static_assert(schema_String_Size + 1 == Schema_Max, IncoherencyMessage); // Ver |Count|Atmos |AdvSS-E // m M |0 2+|0 1 2+|0 1 2+ -static element_items root_Elements = +static constexpr element_items root_Elements = { - { "frameHeader" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "audioFormatExtended" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, + { "frameHeader" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_frameHeader }, + { "audioFormatExtended" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 }, item_audioFormatExtended }, }; static_assert(sizeof(root_Elements) / sizeof(element_item) == root_Element_Max, IncoherencyMessage); static element_items audioFormatExtended_Elements = { - { "audioProgramme" , { 0, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, - { "audioContent" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 1 } }, - { "audioObject" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 1 } }, - { "audioPackFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, - { "audioChannelFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, - { "audioTrackUID" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 1 } }, - { "audioTrackFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 0 } }, - { "audioStreamFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 0 } }, - { "profileList" , { 3, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "tagList" , { 3, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "audioProgramme" , { 0, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 }, item_audioProgramme }, + { "audioContent" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 1, 1 }, item_audioContent }, + { "audioObject" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 1, 1 }, item_audioObject }, + { "audioPackFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_audioPackFormat }, + { "audioChannelFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_audioChannelFormat }, + { "audioTrackUID" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 1, 1 }, item_audioTrackUID }, + { "audioTrackFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, item_audioTrackFormat }, + { "audioStreamFormat" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 0, 0 }, item_audioStreamFormat }, + { "profileList" , { 3, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 }, item_profileList }, + { "tagList" , { 3, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_tagList }, }; static_assert(sizeof(audioFormatExtended_Elements) / sizeof(element_item) == audioFormatExtended_Element_Max, IncoherencyMessage); static attribute_items audioProgramme_Attributes = { - { "audioProgrammeID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioProgrammeName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioProgrammeLanguage" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "start" , { 0, 7, 1, 0, 0, 1, 0, 1, 0, 0 } }, - { "end" , { 0, 7, 1, 0, 0, 1, 0, 1, 0, 0 } }, - { "typeLabel" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "typeDefinition" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "typeLink" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "typeLanguage" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "formatLabel" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "formatDefinition" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "formatLink" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "formatLanguage" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "maxDuckingDepth" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "audioProgrammeID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioProgrammeName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioProgrammeLanguage" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "start" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 0, 0 } }, + { "end" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 0, 0 } }, + { "typeLabel" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "typeDefinition" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "typeLink" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "typeLanguage" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "formatLabel" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "formatDefinition" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "formatLink" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "formatLanguage" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "maxDuckingDepth" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(audioProgramme_Attributes) / sizeof(attribute_item) == audioProgramme_Attribute_Max, IncoherencyMessage); static element_items audioProgramme_Elements = { - { "audioProgrammeLabel" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "audioContentIDRef" , { 0, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, - { "loudnessMetadata" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0 } }, - { "audioProgrammeReferenceScreen" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "authoringInformation" , { 2, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "alternativeValueSetIDRef" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, + { "audioProgrammeLabel" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_audioProgrammeLabel }, + { "audioContentIDRef" , { 0, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 } }, + { "loudnessMetadata" , { 0, 7, 1, 1, 1, 1, 1, 0, 0, 1, 0 }, item_loudnessMetadata }, + { "audioProgrammeReferenceScreen" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 }, item_audioProgrammeReferenceScreen }, + { "authoringInformation" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 }, item_authoringInformation }, + { "alternativeValueSetIDRef" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 } }, }; static_assert(sizeof(audioProgramme_Elements) / sizeof(element_item) == audioProgramme_Element_Max, IncoherencyMessage); static attribute_items audioContent_Attributes = { - { "audioContentID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioContentName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioContentLanguage" , { 0, 7, 1, 0, 1, 0, 0, 0, 1, 0 } }, - { "typeLabel" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO + { "audioContentID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioContentName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioContentLanguage" , { 0, 7, 1, 1, 0, 1, 0, 0, 0, 1, 0 } }, + { "typeLabel" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO }; static_assert(sizeof(audioContent_Attributes) / sizeof(attribute_item) == audioContent_Attribute_Max, IncoherencyMessage); static element_items audioContent_Elements = { - { "audioContentLabel" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "audioObjectIDRef" , { 0, 7, 0, 1, 0, 1, 1, 0, 1, 0 } }, - { "loudnessMetadata" , { 0, 7, 1, 1, 1, 0, 0, 0, 1, 0 } }, - { "dialogue" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "alternativeValueSetIDRef" , { 2, 7, 1, 1, 1, 0, 0, 1, 0, 1 } }, + { "audioContentLabel" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_audioContentLabel }, + { "audioObjectIDRef" , { 0, 7, 0, 1, 1, 0, 1, 1, 0, 1, 0 } }, + { "loudnessMetadata" , { 0, 7, 1, 1, 1, 1, 0, 0, 0, 1, 0 }, item_loudnessMetadata }, + { "dialogue" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "alternativeValueSetIDRef" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 0, 1 } }, }; static_assert(sizeof(audioContent_Elements) / sizeof(element_item) == audioContent_Element_Max, IncoherencyMessage); static attribute_items audioObject_Attributes = { - { "audioObjectID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioObjectName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "start" , { 1, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "startTime" , { 0, 0, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "duration" , { 0, 7, 1, 0, 0, 1, 0, 1, 0, 0 } }, - { "dialogue" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "importance" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "interact" , { 0, 7, 1, 0, 1, 0, 0, 0, 1, 0 } }, - { "disableDucking" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "typeLabel" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO + { "audioObjectID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioObjectName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "start" , { 1, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "startTime" , { 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "duration" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 0, 0 } }, + { "dialogue" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "importance" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "interact" , { 0, 7, 1, 1, 0, 1, 0, 0, 0, 1, 0 } }, + { "disableDucking" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "typeLabel" , { 0, 0, 1,1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO }; static_assert(sizeof(audioObject_Attributes) / sizeof(attribute_item) == audioObject_Attribute_Max, IncoherencyMessage); static element_items audioObject_Elements = { - { "audioPackFormatIDRef" , { 0, 7, 1, 1, 0, 1, 0, 1, 1, 0 } }, - { "audioObjectIDRef" , { 0, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "audioObjectLabel" , { 2, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "audioComplementaryObjectGroupLabel" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "audioComplementaryObjectIDRef" , { 0, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "audioTrackUIDRef" , { 0, 7, 1, 1, 0, 1, 1, 1, 1, 1 } }, - { "audioObjectInteraction" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "gain" , { 2, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "headLocked" , { 2, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "positionOffset" , { 2, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "mute" , { 2, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "alternativeValueSet" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, + { "audioPackFormatIDRef" , { 0, 7, 1, 1, 1, 0, 1, 0, 1, 1, 0 } }, + { "audioObjectIDRef" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 } }, + { "audioObjectLabel" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 }, item_audioObjectLabel }, + { "audioComplementaryObjectGroupLabel" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_audioComplementaryObjectGroupLabel }, + { "audioComplementaryObjectIDRef" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 } }, + { "audioTrackUIDRef" , { 0, 7, 1, 1, 1, 0, 1, 1, 1, 1, 1 } }, + { "audioObjectInteraction" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 }, item_audioObjectInteraction }, + { "gain" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 }, item_gain }, + { "headLocked" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "positionOffset" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 }, item_positionOffset }, + { "mute" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "alternativeValueSet" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_alternativeValueSet }, }; static_assert(sizeof(audioObject_Elements) / sizeof(element_item) == audioObject_Element_Max, IncoherencyMessage); static attribute_items audioPackFormat_Attributes = { - { "audioPackFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioPackFormatName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeDefinition" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLabel" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLink" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "typeLanguage" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "importance" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "audioPackFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioPackFormatName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeDefinition" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLabel" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLink" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "typeLanguage" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "importance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, }; static_assert(sizeof(audioPackFormat_Attributes) / sizeof(attribute_item) == audioPackFormat_Attribute_Max, IncoherencyMessage); static element_items audioPackFormat_Elements = { - { "audioChannelFormatIDRef" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1 } }, - { "audioPackFormatIDRef" , { 0, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "absoluteDistance" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "encodePackFormatIDRef" , { 1, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "decodePackFormatIDRef" , { 1, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "inputPackFormatIDRef" , { 1, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "outputPackFormatIDRef" , { 1, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "normalization" , { 1, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "nfcRefDist" , { 1, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "screenRef" , { 1, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "audioChannelFormatIDRef" , { 0, 7, 1, 1, 1, 0, 1, 1, 0, 1, 1 } }, + { "audioPackFormatIDRef" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "absoluteDistance" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "encodePackFormatIDRef" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "decodePackFormatIDRef" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "inputPackFormatIDRef" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "outputPackFormatIDRef" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "normalization" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "nfcRefDist" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "screenRef" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(audioPackFormat_Elements) / sizeof(element_item) == audioPackFormat_Element_Max, IncoherencyMessage); static attribute_items audioChannelFormat_Attributes = { - { "audioChannelFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioChannelFormatName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeDefinition" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLabel" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLink" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "typeLanguage" , { 0, 0, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "audioChannelFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioChannelFormatName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeDefinition" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLabel" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLink" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "typeLanguage" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(audioChannelFormat_Attributes) / sizeof(attribute_item) == audioChannelFormat_Attribute_Max, IncoherencyMessage); static element_items audioChannelFormat_Elements = { - { "audioBlockFormat" , { 0, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, - { "frequency" , { 0, 7, 1, 1, 1, 1, 1, 1, 0, 1 } }, + { "audioBlockFormat" , { 0, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 }, item_audioBlockFormat }, + { "frequency" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 0, 1 }, item_frequency }, }; static_assert(sizeof(audioChannelFormat_Elements) / sizeof(element_item) == audioChannelFormat_Element_Max, IncoherencyMessage); static attribute_items audioTrackUID_Attributes = { - { "UID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "sampleRate" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "bitDepth" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "typeLabel" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO + { "UID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "sampleRate" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "bitDepth" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "typeLabel" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, // TODO }; static_assert(sizeof(audioTrackUID_Attributes) / sizeof(attribute_item) == audioTrackUID_Attribute_Max, IncoherencyMessage); static element_items audioTrackUID_Elements = { - { "audioMXFLookUp" , { 0, 2, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "audioTrackFormatIDRef" , { 0, 7, 1, 0, 0, 1, 0, 1, 0, 0 } }, - { "audioChannelFormatIDRef" , { 2, 7, 1, 0, 1, 0, 0, 0, 1, 0 } }, - { "audioPackFormatIDRef" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioMXFLookUp" , { 0, 2, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "audioTrackFormatIDRef" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 0, 0 } }, + { "audioChannelFormatIDRef" , { 2, 7, 1, 1, 0, 1, 0, 0, 0, 1, 0 } }, + { "audioPackFormatIDRef" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(audioTrackUID_Elements) / sizeof(element_item) == audioTrackUID_Element_Max, IncoherencyMessage); static attribute_items audioTrackFormat_Attributes = { - { "audioTrackFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioTrackFormatName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLabel" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files - { "typeDefinition" , { 7, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files - { "formatLabel" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "formatDefinition" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "formatLink" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "formatLanguage" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "audioTrackFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioTrackFormatName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLabel" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files + { "typeDefinition" , { 7, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files + { "formatLabel" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "formatDefinition" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "formatLink" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "formatLanguage" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioTrackFormat_Attributes) / sizeof(attribute_item) == audioTrackFormat_Attribute_Max, IncoherencyMessage); static element_items audioTrackFormat_Elements = { - { "audioStreamFormatIDRef" , { 0, 7, 0, 0, 0, 1, 0, 1, 1, 0 } }, + { "audioStreamFormatIDRef" , { 0, 7, 0, 1, 0, 0, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioTrackFormat_Elements) / sizeof(attribute_item) == audioTrackFormat_Element_Max, IncoherencyMessage); static attribute_items audioStreamFormat_Attributes = { - { "audioStreamFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "audioStreamFormatName" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "typeLabel" , { 0, 0, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files - { "typeDefinition" , { 0, 0, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files - { "formatLabel" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "formatDefinition" , { 0, 0, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "formatLink" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "formatLanguage" , { 0, 0, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "audioStreamFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "audioStreamFormatName" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "typeLabel" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files + { "typeDefinition" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, // TODO: present in some Atmos files + { "formatLabel" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "formatDefinition" , { 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "formatLink" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "formatLanguage" , { 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioStreamFormat_Attributes) / sizeof(attribute_item) == audioStreamFormat_Attribute_Max, IncoherencyMessage); static element_items audioStreamFormat_Elements = { - { "audioChannelFormatIDRef" , { 0, 7, 1, 1, 0, 1, 0, 1, 1, 1 } }, - { "audioPackFormatIDRef" , { 0, 7, 1, 1, 0, 1, 0, 1, 1, 1 } }, - { "audioTrackFormatIDRef" , { 0, 7, 1, 1, 0, 1, 0, 1, 1, 1 } }, + { "audioChannelFormatIDRef" , { 0, 7, 1, 1, 1, 0, 1, 0, 1, 1, 1 } }, + { "audioPackFormatIDRef" , { 0, 7, 1, 1, 1, 0, 1, 0, 1, 1, 1 } }, + { "audioTrackFormatIDRef" , { 0, 7, 1, 1, 1, 0, 1, 0, 1, 1, 1 } }, }; static_assert(sizeof(audioStreamFormat_Elements) / sizeof(element_item) == audioStreamFormat_Element_Max, IncoherencyMessage); static element_items profileList_Elements = { - { "profile" , { 3, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, + { "profile" , { 3, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 } }, }; static_assert(sizeof(profileList_Elements) / sizeof(element_item) == profileList_Element_Max, IncoherencyMessage); static element_items tagList_Elements = { - { "tagGroup" , { 3, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, + { "tagGroup" , { 3, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 } }, }; static_assert(sizeof(tagList_Elements) / sizeof(element_item) == tagList_Element_Max, IncoherencyMessage); static element_items frameHeader_Elements = { - { "profileList" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "frameFormat" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "transportTrackFormat" , { 0, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, + { "profileList" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 }, item_profileList }, + { "frameFormat" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 }, item_frameFormat }, + { "transportTrackFormat" , { 0, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 }, item_transportTrackFormat }, }; static_assert(sizeof(frameHeader_Elements) / sizeof(element_item) == frameHeader_Element_Max, IncoherencyMessage); static attribute_items frameFormat_Attributes = { - { "frameFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "start" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "duration" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "type" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "timeReference" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "flowID" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "countToFull" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "numMetadataChunks" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "countToSameChunk" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "frameFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "start" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "duration" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "type" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "timeReference" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "flowID" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "countToFull" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "numMetadataChunks" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "countToSameChunk" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(frameFormat_Attributes) / sizeof(attribute_item) == frameFormat_Attribute_Max, IncoherencyMessage); static element_items frameFormat_Elements = { - { "changedIDs" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "chunkAdmElement" , { 0, 7, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "changedIDs" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "chunkAdmElement" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, }; static_assert(sizeof(frameFormat_Elements) / sizeof(element_item) == frameFormat_Element_Max, IncoherencyMessage); static attribute_items transportTrackFormat_Attributes = { - { "transportID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "transportName" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "numTracks" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "numIDs" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "transportID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "transportName" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "numTracks" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "numIDs" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(transportTrackFormat_Attributes) / sizeof(attribute_item) == transportTrackFormat_Attribute_Max, IncoherencyMessage); static element_items transportTrackFormat_Elements = { - { "audioTrack" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "audioTrack" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_audioTrack }, }; static_assert(sizeof(transportTrackFormat_Elements) / sizeof(element_item) == transportTrackFormat_Element_Max, IncoherencyMessage); static attribute_items audioTrack_Attributes = { - { "trackID" , { 0, 7, 0, 0, 1, 0, 0, 0, 1, 0 } }, - { "formatLabel" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, - { "formatDefinition" , { 0, 7, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "trackID" , { 0, 7, 0, 1, 0, 1, 0, 0, 0, 1, 0 } }, + { "formatLabel" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, + { "formatDefinition" , { 0, 7, 1, 1, 0, 1, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(audioTrack_Attributes) / sizeof(attribute_item) == audioTrack_Attribute_Max, IncoherencyMessage); static element_items audioTrack_Elements = { - { "audioTrackUIDRef" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "audioTrackUIDRef" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, }; static_assert(sizeof(audioTrack_Elements) / sizeof(element_item) == audioTrack_Element_Max, IncoherencyMessage); static attribute_items audioProgrammeLabel_Attributes = { - { "language" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "language" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioProgrammeLabel_Attributes) / sizeof(attribute_item) == audioProgrammeLabel_Attribute_Max, IncoherencyMessage); static attribute_items loudnessMetadata_Attributes = { - { "loudnessMethod" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "loudnessRecType" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "loudnessCorrectionType" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "loudnessMethod" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "loudnessRecType" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "loudnessCorrectionType" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(loudnessMetadata_Attributes) / sizeof(attribute_item) == loudnessMetadata_Attribute_Max, IncoherencyMessage); static element_items loudnessMetadata_Elements = { - { "integratedLoudness" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "loudnessRange" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "maxTruePeak" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "maxMomentary" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "maxShortTerm" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "dialogueLoudness" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "renderer" , { 3, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "integratedLoudness" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "loudnessRange" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "maxTruePeak" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "maxMomentary" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "maxShortTerm" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "dialogueLoudness" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "renderer" , { 3, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 }, item_renderer }, }; static_assert(sizeof(loudnessMetadata_Elements) / sizeof(element_item) == loudnessMetadata_Element_Max, IncoherencyMessage); static attribute_items renderer_Attributes = { - { "uri" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "name" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "version" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, - { "coordinateMode" , { 3, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "uri" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "name" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "version" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "coordinateMode" , { 3, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(renderer_Attributes) / sizeof(attribute_item) == renderer_Attribute_Max, IncoherencyMessage); static element_items renderer_Elements = { - { "audioPackFormatIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 0 } }, - { "audioObjectIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "audioPackFormatIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 0 } }, + { "audioObjectIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, }; static_assert(sizeof(renderer_Elements) / sizeof(element_item) == renderer_Element_Max, IncoherencyMessage); static attribute_items audioProgrammeReferenceScreen_Attributes = { - { "aspectRatio" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "aspectRatio" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioProgrammeReferenceScreen_Attributes) / sizeof(attribute_item) == audioProgrammeReferenceScreen_Attribute_Max, IncoherencyMessage); static element_items audioProgrammeReferenceScreen_Elements = { - { "screenCentrePosition" , { 0, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "screenWidth" , { 0, 7, 1, 1, 1, 1, 0, 1, 1, 1 } }, + { "screenCentrePosition" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_screenCentrePosition }, + { "screenWidth" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 1, 1 }, item_screenWidth }, }; static_assert(sizeof(audioProgrammeReferenceScreen_Elements) / sizeof(element_item) == audioProgrammeReferenceScreen_Element_Max, IncoherencyMessage); static attribute_items screenCentrePosition_Attributes = { - { "coordinate" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, // TODO: clarify coordinate="X" or X= - { "azimuth" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "elevation" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "distance" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "X" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "Y" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "Z" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "coordinate" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, // TODO: clarify coordinate="X" or X= + { "azimuth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "elevation" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "distance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "X" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "Y" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "Z" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(screenCentrePosition_Attributes) / sizeof(attribute_item) == screenCentrePosition_Attribute_Max, IncoherencyMessage); static attribute_items screenWidth_Attributes = { - { "coordinate" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, // TODO: clarify coordinate="X" or X= - { "azimuth" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "X" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "coordinate" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, // TODO: clarify coordinate="X" or X= + { "azimuth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "X" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(screenWidth_Attributes) / sizeof(attribute_item) == screenWidth_Attribute_Max, IncoherencyMessage); static element_items authoringInformation_Elements = { - { "referenceLayout" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, - { "renderer" , { 2, 7, 1, 1, 1, 0, 0, 1, 1, 1 } }, + { "referenceLayout" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_referenceLayout }, + { "renderer" , { 2, 7, 1, 1, 1, 1, 0, 0, 1, 1, 1 }, item_renderer }, }; static_assert(sizeof(authoringInformation_Elements) / sizeof(element_item) == authoringInformation_Element_Max, IncoherencyMessage); static element_items referenceLayout_Elements = { - { "audioPackFormatIDRef" , { 2, 7, 0, 0, 1, 0, 0, 0, 1, 0 } }, + { "audioPackFormatIDRef" , { 2, 7, 0, 1, 0, 1, 0, 0, 0, 1, 0 } }, }; static_assert(sizeof(referenceLayout_Elements) / sizeof(element_item) == referenceLayout_Element_Max, IncoherencyMessage); static attribute_items audioContentLabel_Attributes = { - { "language" , { 0, 7, 1, 0, 0, 1, 0, 1, 1, 0 } }, + { "language" , { 0, 7, 1, 1, 0, 0, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioContentLabel_Attributes) / sizeof(attribute_item) == audioContentLabel_Attribute_Max, IncoherencyMessage); static attribute_items dialogue_Attributes = { - { "nonDialogueContentKind" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "dialogueContentKind" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "mixedContentKind" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "nonDialogueContentKind" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "dialogueContentKind" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "mixedContentKind" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(dialogue_Attributes) / sizeof(attribute_item) == dialogue_Attribute_Max, IncoherencyMessage); static attribute_items audioObjectLabel_Attributes = { - { "language" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "language" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioObjectLabel_Attributes) / sizeof(attribute_item) == audioObjectLabel_Attribute_Max, IncoherencyMessage); static attribute_items audioComplementaryObjectGroupLabel_Attributes = { - { "language" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "language" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioComplementaryObjectGroupLabel_Attributes) / sizeof(attribute_item) == audioComplementaryObjectGroupLabel_Attribute_Max, IncoherencyMessage); static attribute_items audioObjectInteraction_Attributes = { - { "onOffInteract" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "gainInteract" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "positionInteract" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "onOffInteract" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "gainInteract" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "positionInteract" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioObjectInteraction_Attributes) / sizeof(attribute_item) == audioObjectInteraction_Attribute_Max, IncoherencyMessage); static element_items audioObjectInteraction_Elements = { - { "gainInteractionRange" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, - { "positionInteractionRange" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "gainInteractionRange" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_gainInteractionRange }, + { "positionInteractionRange" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_positionInteractionRange }, }; static_assert(sizeof(audioObjectInteraction_Elements) / sizeof(element_item) == audioObjectInteraction_Element_Max, IncoherencyMessage); static attribute_items gainInteractionRange_Attributes = { - { "gainUnit" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "bound" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "gainUnit" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "bound" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(gainInteractionRange_Attributes) / sizeof(attribute_item) == gainInteractionRange_Attribute_Max, IncoherencyMessage); static attribute_items positionInteractionRange_Attributes = { - { "coordinate" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "bound" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "coordinate" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "bound" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(positionInteractionRange_Attributes) / sizeof(attribute_item) == positionInteractionRange_Attribute_Max, IncoherencyMessage); static attribute_items audioBlockFormat_Attributes = { - { "audioBlockFormatID" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "rtime" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "duration" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "lstart" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "lduration" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "initializeBlock" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "audioBlockFormatID" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "rtime" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "duration" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "lstart" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "lduration" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "initializeBlock" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, }; static_assert(sizeof(audioBlockFormat_Attributes) / sizeof(attribute_item) == audioBlockFormat_Attribute_Max, IncoherencyMessage); +static element_items audioBlockFormat_DirectSpeakers_Elements = +{ + { "gain" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_gain }, + { "importance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "jumpPosition" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "headLocked" , { 2, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "headphoneVirtualise" , { 2, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "speakerLabel" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "position" , { 0, 7, 0, 0, 1, 0, 0, 1, 0, 0, 1 }, item_position }, + { "outputChannelFormatIDRef" , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "outputChannelIDRef," , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "matrix" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "width" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "height" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "depth" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "cartesian" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "diffuse" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "channelLock" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "objectDivergence" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "zoneExclusion" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "equation" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "order" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "degree" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "normalization" , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "nfcRefDist" , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "screenRef" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, +}; +static_assert(sizeof(audioBlockFormat_DirectSpeakers_Elements) / sizeof(element_item) == audioBlockFormat_Element_Max, IncoherencyMessage); + +static element_items audioBlockFormat_Matrix_Elements = +{ + { "gain" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 }, item_gain }, + { "importance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "jumpPosition" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "headLocked" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "headphoneVirtualise" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 }, item_headphoneVirtualise }, + { "speakerLabel" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "position" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "outputChannelFormatIDRef" , { 1, 7, 1, 1, 0, 1, 0, 0, 0, 1, 0 } }, + { "outputChannelIDRef," , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "matrix" , { 0, 7, 0, 1, 1, 1, 0, 0, 0, 1, 0 }, item_matrix }, + { "width" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "height" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "depth" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "cartesian" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "diffuse" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "channelLock" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "objectDivergence" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "zoneExclusion" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "equation" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "order" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "degree" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "normalization" , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "nfcRefDist" , { 1, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "screenRef" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, +}; +static_assert(sizeof(audioBlockFormat_Matrix_Elements) / sizeof(element_item) == audioBlockFormat_Element_Max, IncoherencyMessage); + +static element_items audioBlockFormat_Object_Elements = +{ + { "gain" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_gain }, + { "importance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "jumpPosition" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_jumpPosition }, + { "headLocked" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "headphoneVirtualise" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 }, item_headphoneVirtualise }, + { "speakerLabel" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "position" , { 0, 7, 1, 1, 1, 0, 1, 1, 1, 1, 1 }, item_position }, + { "outputChannelFormatIDRef" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "outputChannelIDRef," , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "matrix" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0, 0 } }, + { "width" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "height" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "depth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "cartesian" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "diffuse" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "channelLock" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 }, item_channelLock }, + { "objectDivergence" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 }, item_objectDivergence }, + { "zoneExclusion" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 }, item_zoneExclusion }, + { "equation" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "order" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "degree" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "normalization" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "nfcRefDist" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "screenRef" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, +}; +static_assert(sizeof(audioBlockFormat_Object_Elements) / sizeof(element_item) == audioBlockFormat_Element_Max, IncoherencyMessage); + static element_items audioBlockFormat_Elements = { - { "gain" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "importance" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "headLocked" , { 2, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "headphoneVirtualise" , { 2, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "speakerLabel" , { 0, 7, 1, 1, 1, 1, 0, 1, 0, 0 } }, //TODO should be Dolby1 only for Objects only - { "position" , { 0, 7, 1, 1, 0, 1, 1, 1, 1, 1 } }, - { "outputChannelFormatIDRef" , { 1, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "outputChannelIDRef," , { 1, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "jumpPosition" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, //TODO should be Dolby1 only for Objects only - { "matrix" , { 0, 7, 1, 0, 1, 0, 0, 1, 1, 0 } }, - { "coefficient" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "width" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "height" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "depth" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, - { "cartesian" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "diffuse" , { 0, 7, 1, 1, 1, 1, 0, 1, 0, 0 } }, - { "channelLock" , { 0, 7, 1, 1, 1, 1, 0, 1, 0, 0 } }, - { "objectDivergence" , { 0, 7, 1, 1, 1, 0, 0, 1, 1, 0 } }, - { "zoneExclusion" , { 0, 7, 1, 1, 1, 1, 0, 1, 0, 0 } }, - { "equation" , { 0, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "order" , { 0, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "degree" , { 0, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "normalization" , { 1, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "nfcRefDist" , { 1, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, - { "screenRef" , { 0, 7, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "gain" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_gain }, + { "importance" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "jumpPosition" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 }, item_jumpPosition }, + { "headLocked" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "headphoneVirtualise" , { 2, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 }, item_headphoneVirtualise }, + { "speakerLabel" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "position" , { 0, 7, 1, 1, 1, 0, 1, 1, 1, 1, 1 }, item_position }, + { "outputChannelFormatIDRef" , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 } }, + { "outputChannelIDRef," , { 1, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "matrix" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 1, 0 }, item_matrix }, + { "width" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "height" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "depth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "cartesian" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "diffuse" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 } }, + { "channelLock" , { 0, 7, 1, 1, 1, 1, 1, 0, 1, 0, 0 }, item_channelLock }, + { "objectDivergence" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 1, 0 }, item_objectDivergence }, + { "zoneExclusion" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 }, item_zoneExclusion }, + { "equation" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "order" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "degree" , { 0, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "normalization" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "nfcRefDist" , { 1, 7, 1, 1, 1, 1, 0, 0, 1, 0, 0 } }, + { "screenRef" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(audioBlockFormat_Elements) / sizeof(element_item) == audioBlockFormat_Element_Max, IncoherencyMessage); static attribute_items gain_Attributes = { - { "gainUnit" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "gainUnit" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(gain_Attributes) / sizeof(attribute_item) == gain_Attribute_Max, IncoherencyMessage); static attribute_items headphoneVirtualise_Attributes = { - { "bypass" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "DRR" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "bypass" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "DRR" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(headphoneVirtualise_Attributes) / sizeof(attribute_item) == headphoneVirtualise_Attribute_Max, IncoherencyMessage); static attribute_items position_Attributes = { - { "coordinate" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, - { "bound" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, - { "screenEdgeLock" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "coordinate" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "bound" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "screenEdgeLock" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(position_Attributes) / sizeof(attribute_item) == position_Attribute_Max, IncoherencyMessage); static attribute_items positionOffset_Attributes = { - { "coordinate" , { 0, 7, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "coordinate" , { 0, 7, 1, 1, 0, 0, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(position_Attributes) / sizeof(attribute_item) == position_Attribute_Max, IncoherencyMessage); static attribute_items channelLock_Attributes = { - { "maxDistance" , { 0, 7, 1, 0, 1, 0, 0, 1, 0, 0 } }, + { "maxDistance" , { 0, 7, 1, 1, 0, 1, 0, 0, 1, 0, 0 } }, }; static_assert(sizeof(channelLock_Attributes) / sizeof(attribute_item) == channelLock_Attribute_Max, IncoherencyMessage); static attribute_items objectDivergence_Attributes = { - { "azimuthRange" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "positionRange" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "azimuthRange" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "positionRange" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(objectDivergence_Attributes) / sizeof(attribute_item) == objectDivergence_Attribute_Max, IncoherencyMessage); static attribute_items jumpPosition_Attributes = { - { "interpolationLength" , { 0, 7, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "interpolationLength" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, }; static_assert(sizeof(jumpPosition_Attributes) / sizeof(attribute_item) == jumpPosition_Attribute_Max, IncoherencyMessage); static element_items zoneExclusion_Elements = { - { "zone" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "zone" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_zone }, }; static_assert(sizeof(zoneExclusion_Elements) / sizeof(element_item) == zoneExclusion_Element_Max, IncoherencyMessage); static attribute_items zone_Attributes = { - { "minX" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "maxX" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "minY" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "maxY" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "minZ" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "maxZ" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "minElevation" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "maxElevation" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "minAzimuth" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "maxAzimuth" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "minX" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "maxX" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "minY" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "maxY" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "minZ" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "maxZ" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "minElevation" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "maxElevation" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "minAzimuth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "maxAzimuth" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(zone_Attributes) / sizeof(attribute_item) == zone_Attribute_Max, IncoherencyMessage); static element_items matrix_Elements = { - { "coefficient" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "coefficient" , { 0, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, item_coefficient }, }; static_assert(sizeof(matrix_Elements) / sizeof(element_item) == matrix_Element_Max, IncoherencyMessage); static attribute_items coefficient_Attributes = { - { "gainUnit" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "gain" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "gainVar" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "phase" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "phaseVar" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "delay" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, - { "delayVar" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "gainUnit" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "gain" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "gainVar" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "phase" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "phaseVar" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "delay" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, + { "delayVar" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 0, 0 } }, }; static_assert(sizeof(coefficient_Attributes) / sizeof(attribute_item) == coefficient_Attribute_Max, IncoherencyMessage); static attribute_items alternativeValueSet_Attributes = { - { "alternativeValueSetID" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "alternativeValueSetID" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(alternativeValueSet_Attributes) / sizeof(attribute_item) == alternativeValueSet_Attribute_Max, IncoherencyMessage); static attribute_items frequency_Attributes = { - { "typeDefinition" , { 0, 7, 1, 0, 1, 1, 0, 1, 1, 0 } }, + { "typeDefinition" , { 0, 7, 1, 1, 0, 1, 1, 0, 1, 1, 0 } }, }; static_assert(sizeof(frequency_Attributes) / sizeof(attribute_item) == frequency_Attribute_Max, IncoherencyMessage); static attribute_items profile_Attributes = { - { "profileName" , { 3, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "profileVersion" , { 3, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, - { "profileLevel" , { 3, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, + { "profileName" , { 3, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "profileVersion" , { 3, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, + { "profileLevel" , { 3, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(profile_Attributes) / sizeof(attribute_item) == profile_Attribute_Max, IncoherencyMessage); static element_items tagGroup_Elements = { - { "tag" , { 3, 7, 0, 1, 0, 1, 1, 0, 1, 1 } }, - { "audioProgrammeIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, - { "audioContentIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, - { "audioObjectIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "tag" , { 3, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1 } }, + { "audioProgrammeIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "audioContentIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, + { "audioObjectIDRef" , { 3, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1 } }, }; static_assert(sizeof(tagGroup_Elements) / sizeof(element_item) == tagGroup_Element_Max, IncoherencyMessage); static attribute_items tag_Attributes = { - { "class" , { 0, 7, 0, 0, 0, 1, 0, 0, 1, 0 } }, + { "class" , { 0, 7, 0, 1, 0, 0, 1, 0, 0, 1, 0 } }, }; static_assert(sizeof(tag_Attributes) / sizeof(attribute_item) == tag_Attribute_Max, IncoherencyMessage); @@ -1693,7 +1798,7 @@ static const item_infos item_Infos = { { nullptr, (element_items*)&frameHeader_Elements, "frameHeader", nullptr, 0, (int8u)-1, 0xFFF}, { (attribute_items*)&frameFormat_Attributes, (element_items*)&frameFormat_Elements, "frameFormat", "FF", F(ID_V), (int8u)-1, 0}, { (attribute_items*)&transportTrackFormat_Attributes, (element_items*)&transportTrackFormat_Elements, "transportTrackFormat", "TP", F(ID_W), (int8u)-1, 0}, - { (attribute_items*)&audioTrack_Attributes, (element_items*)&audioTrack_Elements, "TrackIndex", nullptr, 0, (int8u)-1, 0 }, + { (attribute_items*)&audioTrack_Attributes, (element_items*)&audioTrack_Elements, "Track", nullptr, 0, (int8u)-1, 0 }, { nullptr, nullptr, "changedIDs", nullptr, 0, (int8u)-1, 0 }, { (attribute_items*)&audioProgrammeLabel_Attributes, nullptr, "audioProgrammeLabel", nullptr, 0, (int8u)-1, 0}, { (attribute_items*)&loudnessMetadata_Attributes, (element_items*)&loudnessMetadata_Elements, "loudnessMetadata", nullptr, 0, (int8u)-1, 0}, @@ -1778,6 +1883,113 @@ static constexpr idrefs IDRefs = { { item_audioTrack, audioTrack_audioTrackUIDRef, item_audioTrackUID }, }; +// First value of each line is the line count +static const int8u audioPackFormat_2_audioChannelFormatIDRef_Table[] = { + 1, 0x03, + 2, 0x01, 0x02, + 6, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, + 10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x15, + 12, 0x03, 0x01, 0x02, 0x22, 0x23, 0x0A, 0x0B, 0x1C, 0x1D, 0x28, 0x20, 0x21, + 14, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, 0x22, 0x23, 0x1E, 0x1F, 0x24, 0x25, + 24, 0x18, 0x19, 0x03, 0x20, 0x1C, 0x1D, 0x01, 0x02, 0x09, 0x21, 0x0A, 0x0B, 0x22, 0x23, 0x0E, 0x0C, 0x1E, 0x1F, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 3, 0x01, 0x02, 0x03, + 4, 0x01, 0x02, 0x03, 0x09, + 5, 0x01, 0x02, 0x03, 0x05, 0x06, + 7, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x09, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x26, 0x27, + 8, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, + 22, 0x18, 0x19, 0x03, 0x1C, 0x1D, 0x01, 0x02, 0x09, 0x0A, 0x0B, 0x22, 0x23, 0x0E, 0x0C, 0x1E, 0x1F, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 19, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0A, 0x0B, 0x1A, 0x1B, 0x0D, 0x0F, 0x0E, 0x10, 0x12, 0x13, 0x14, 0x1E, 0x1F, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x24, 0x25, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x13, 0x14, + 10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x13, 0x14, 0x24, 0x25, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x24, 0x25, + 10, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, 0x13, 0x14, + 12, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, 0x22, 0x23, 0x1E, 0x1F, + 14, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, 0x18, 0x19, 0x22, 0x23, 0x1E, 0x1F, + 16, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x1C, 0x1D, 0x18, 0x19, 0x22, 0x23, 0x13, 0x14, 0x1E, 0x1F, + 24, 0x18, 0x19, 0x03, 0x20, 0x1C, 0x1D, 0x01, 0x02, 0x09, 0x21, 0x0A, 0x0B, 0x22, 0x23, 0x0E, 0x0C, 0x1E, 0x1F, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 7, 0x01, 0x02, 0x03, 0x0A, 0x0B, 0x1C, 0x1D, + 7, 0x01, 0x02, 0x03, 0x05, 0x06, 0x0D, 0x0F, + 7, 0x01, 0x02, 0x03, 0x05, 0x06, 0x13, 0x14, + 9, 0x01, 0x02, 0x03, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x0A, 0x0B, 0x1C, 0x1D, 0x22, 0x23, 0x1E, 0x1F, + 8, 0x01, 0x02, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x0C, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x0C, 0x0E, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x29, 0x2A, 0x0D, 0x0F, 0x10, 0x12, + 14, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x29, 0x2A, 0x0D, 0x0F, 0x10, 0x12, 0x0C, 0x0E, + 13, 0x03, 0x01, 0x02, 0x05, 0x06, 0x0E, 0x0D, 0x0F, 0x10, 0x12, 0x15, 0x2B, 0x2C, + 0 +}; +static const int8u audioPackFormat_2_audioChannelFormatIDRef_Table8[] = { + 1, 0x03, + 2, 0x01, 0x02, + 6, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, + 10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x15, + 12, 0x03, 0x01, 0x02, 0x0D, 0x0F, 0x0A, 0x0B, 0x05, 0x06, 0x28, 0x20, 0x21, + 14, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x24, 0x25, + 24, 0x01, 0x02, 0x03, 0x20, 0x05, 0x06, 0x07, 0x08, 0x09, 0x21, 0x0A, 0x0B, 0x0D, 0x0F, 0x0E, 0x0C, 0x10, 0x12, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 3, 0x01, 0x02, 0x03, + 4, 0x01, 0x02, 0x03, 0x09, + 5, 0x01, 0x02, 0x03, 0x05, 0x06, + 7, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x09, + 8, 0x07, 0x08, 0x03, 0x04, 0x05, 0x06, 0x01, 0x02, + 8, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, + 22, 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0D, 0x0F, 0x0E, 0x0C, 0x10, 0x12, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 1, 0x00, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x24, 0x25, + 8, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x13, 0x14, + 10, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x13, 0x14, 0x24, 0x25, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x24, 0x25, + 10, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, 0x13, 0x14, + 12, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 14, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, 0x18, 0x19, 0x0D, 0x0F, 0x10, 0x12, + 16, 0x01, 0x02, 0x03, 0x04, 0x0A, 0x0B, 0x05, 0x06, 0x18, 0x19, 0x0D, 0x0F, 0x13, 0x14, 0x10, 0x12, + 24, 0x18, 0x19, 0x03, 0x20, 0x05, 0x06, 0x01, 0x02, 0x09, 0x21, 0x0A, 0x0B, 0x0D, 0x0F, 0x0E, 0x0C, 0x10, 0x12, 0x13, 0x14, 0x11, 0x15, 0x16, 0x17, + 7, 0x01, 0x02, 0x03, 0x0A, 0x0B, 0x05, 0x06, + 7, 0x01, 0x02, 0x03, 0x05, 0x06, 0x0D, 0x0F, + 7, 0x01, 0x02, 0x03, 0x05, 0x06, 0x13, 0x14, + 9, 0x01, 0x02, 0x03, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x0A, 0x0B, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 8, 0x01, 0x02, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, + 11, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x0C, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x0D, 0x0F, 0x10, 0x12, 0x0C, 0x0E, + 12, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x29, 0x2A, 0x0D, 0x0F, 0x10, 0x12, + 14, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x29, 0x2A, 0x0D, 0x0F, 0x10, 0x12, 0x0C, 0x0E, + 13, 0x03, 0x01, 0x02, 0x05, 0x06, 0x0E, 0x0D, 0x0F, 0x10, 0x12, 0x15, 0x16, 0x17, + 0 +}; + +set audioPackFormatID_2_audioChannelFormatIDRef (int16u audioPackFormatID_yyyy) { + size_t Pos = 0; + size_t i = 0; + auto SearchedPos = audioPackFormatID_yyyy & 0xF7FF; // 0x8xx values + auto Table = audioPackFormatID_yyyy - SearchedPos ? audioPackFormat_2_audioChannelFormatIDRef_Table8 : audioPackFormat_2_audioChannelFormatIDRef_Table; + for (;;) { + const auto Count = Table[i++]; + if (!Count) { + return {}; + } + if (++Pos != SearchedPos) { + i += Count; + continue; + } + if (!Table[i]) { + return {}; + } + set Result; + for (int j = 0; j < Count; j++) { + Result.insert("AC_000100" + Hex2String(Table[i++], 2)); + } + return Result; + } +} + enum atmos_audioChannelFormatName { Atmos_L, Atmos_R, @@ -1911,8 +2123,8 @@ size_t Atmos_zone_Pos(const string& Name, float32* Values) { return (size_t)-1; } -string CraftName(const char* Name) { - return (Name && Name[0] < 'a' ? "audio" : "") + string(Name); +string CraftName(const char* Name, bool ID = false) { + return (ID && !strcmp(Name, "Track")) ? "track" : ((Name && Name[0] < 'a' ? "audio" : "") + string(Name)); } enum class E { @@ -2019,6 +2231,32 @@ static void Apply_SubStreams(File__Analyze& F, const string& P_And_LinkedTo, Ite break; } } + if (Pos == -1) { + // Trying case insensitive, this is permitted by specs + auto Start = ID.rfind('_'); + if (Start != string::npos) { + auto ID_Up = ID; + for (size_t i = Start; i < ID_Up.size(); i++) { + auto& Letter = ID_Up[i]; + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + for (size_t k = 0; k < Dest.Items.size(); k++) { + auto Target_Up = Dest.Items[k].Attributes[0]; + for (size_t i = Start; i < Target_Up.size(); i++) { + auto& Letter = Target_Up[i]; + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + if (Target_Up == ID_Up) { + Pos = k; + break; + } + } + } + } if (Pos == -1) { auto LinkedTo_Pos = P_And_LinkedTo.find(" LinkedTo_TrackUID_Pos"); auto HasTransport = !F.Retrieve_Const(Stream_Audio, 0, "Transport0").empty(); @@ -2068,6 +2306,7 @@ class tfsxml void Enter(); void Leave(); int Init(const void* const Buffer, size_t Buffer_Size); + int Resynch(const string& Value); int NextElement(); int Attribute(); int Value(); @@ -2091,6 +2330,22 @@ class tfsxml size_t* File_Buffer_Size_Hint_Pointer = {}; }; +enum cartesion_test : int8_t { + cartesian_unknown, + cartesian_alreadyincoherent, + cartesian_0, +}; + +struct channel_list { + size_t BlockPos; + vector List; +}; + +struct channel_outputChannelFormatIDRef { + size_t BlockPos; + string outputChannelFormatIDRef; +}; + class file_adm_private : public tfsxml { public: @@ -2108,10 +2363,12 @@ class file_adm_private : public tfsxml bool DolbyProfileCanNotBeVersion1 = false; bool IsPartial = false; bool IsLocalTimeReference = false; - bool CartesianIsTested = false; - bool CartesianPresent = false; - bool CartesianAlreadyNotCoherent = false; - string CartesianValue; + cartesion_test CartesianAlreadyNotCoherent = cartesian_unknown; + TimeCode LastBlockFormatEnd; + TimeCode LastBlockFormatEnd_S; + vector> ChannelFormat_Matrix_coefficients; + vector> ChannelFormat_Matrix_outputChannelFormatIDRefs; + vector coefficients; vector profileInfos; map More; float32 FrameRate_Sum = 0; @@ -2119,7 +2376,7 @@ class file_adm_private : public tfsxml vector loudnessMetadata_Source; vector ChannelFormat_BlockFormat_ReduceCount; string OldLocale; - vector Errors_Tips; + vector Errors_Tips[error_Type_Max][source_Max]; file_adm_private() { @@ -2148,6 +2405,7 @@ class file_adm_private : public tfsxml STRUCTS(frameFormat); STRUCTS(transportTrackFormat); STRUCTS(audioTrack); + STRUCTS(changedIDs); STRUCTS(audioProgrammeLabel); STRUCTS(loudnessMetadata); STRUCTS(renderer); @@ -2272,6 +2530,20 @@ int tfsxml::Init(const void* const Buffer, size_t Buffer_Size) { return 0; } +int tfsxml::Resynch(const string& Value) { + for (size_t i = 0; i < Level_Max; i++) { + if (Code[i] != Value) { + continue; + } + Level_Max = i + 1; + IsInit_ = false; + MustEnter = false; + ParsingAttr = false; + return 0; + } + return 1; +} + int tfsxml::NextElement() { IsInit_ = false; if (MustEnter && Level == Level_Max + ParsingAttr) { @@ -2338,11 +2610,58 @@ int tfsxml::Value() { //--------------------------------------------------------------------------- void Item_Struct::AddError(error_Type Error_Type, char AttEle, E Error_Value, file_adm_private* File_Adm_Private, const string& Opt0, source Source) { - auto Tips_Size = File_Adm_Private->Errors_Tips.size(); - bool Tips_Size_Big = Tips_Size >= 255; - AddError(Error_Type, AttEle, Error_Value, Tips_Size_Big ? 0 : (char)Tips_Size, Source); - if (!Tips_Size_Big) { - File_Adm_Private->Errors_Tips.push_back(Opt0); + auto& Tips = File_Adm_Private->Errors_Tips[Error_Type][Source]; + auto Tips_Size = Tips.size(); + if (Tips_Size < 255) { + Tips.push_back(Opt0); + } + else { + Tips_Size = 255; + Tips[255].clear(); + } + AddError(Error_Type, AttEle, Error_Value, (char)Tips_Size, Source); +} + +//--------------------------------------------------------------------------- +static void MoveErrors (file_adm_private* File_Adm_Private, item Up_Type) { + auto& Items = File_Adm_Private->Items; + auto& Ups = Items[Up_Type].Items; + auto& Up = Ups.back(); + size_t i = Ups.size() - 1; + const auto Up_Infos_Ptr = item_Infos[Up_Type].Element_Infos; + if (Up_Infos_Ptr) { + const auto& Up_Infos = *Up_Infos_Ptr; + for (size_t j = 0; j < Items[Up_Type].Elements_Size; j++) { + const auto& Up_Info = Up_Infos[j]; + if (!Up_Info.LinkedItem) { + continue; + } + const auto& Elements = Up.Elements[j]; + size_t Count = Elements.size(); + auto& Sources = Items[Up_Info.LinkedItem].Items; + const auto k_Start = Sources.size() - Count; + for (size_t k = k_Start; k < Sources.size(); k++) { + auto& Item = Sources[k]; + for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { + for (size_t Source = 0; Source < source_Max; Source++) { + for (const auto& Error : Item.Errors[Error_Type][Source]) { + if (!Error[0]) { + Up.AddError((error_Type)Error_Type, Error + (char)Up_Info.LinkedItem + (char)(k - k_Start), (source)Source); + } + else { + string Intermediate; + string Intermediate2 = ':' + CraftName(Up_Info.Name); + if (Error.rfind(Intermediate2, 0) || (Error.size() > Intermediate2.size() && !isdigit(Error[Intermediate2.size()]))) { + Intermediate = Intermediate2 + to_string(k - k_Start); + } + Up.AddError((error_Type)Error_Type, ':' + CraftName(item_Infos[Up_Type].Name) + to_string(i) + Intermediate + Error, (source)Source); + } + } + Item.Errors[Error_Type][Source].clear(); + } + } + } + } } } @@ -2450,7 +2769,7 @@ static void CheckErrors_ID_Additions(file_adm_private* File_Adm_Private, item it if (Flags[item_info::Flags_ID_YX]) { auto xxxx = ID.substr(strlen(item_Infos[item_Type].ID_Begin) + 5, 4); if (xxxx[0] == '0' || xxxx == "1000") { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID attribute xxxx value \"" + xxxx + "\" is not permitted, permitted values are \"1001\" to \"FFFF\"", Source_Atmos_1_0); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID attribute xxxx value \"" + xxxx + "\" is not permitted, permitted values are \"1001\" to \"FFFF\"", Source_Atmos_1_0); } } if (Flags[item_info::Flags_ID_W]) { @@ -2473,18 +2792,18 @@ static void CheckErrors_ID_Additions(file_adm_private* File_Adm_Private, item it auto min_int = strtoul(min, nullptr, 16); auto max_int = strtoul(max, nullptr, 16); if ((!i || i - 1 < max_int - min_int) && (wwww_int <= 0x1000 || wwww_int < min_int || wwww_int > max_int)) { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID attribute wwww value \"" + wwww + "\" is not permitted" + (min_int == 0x100b ? " due to the Objects typed object" : "") + ", permitted values are \"" + min + "\" to \"" + max + "\"", Source_Atmos_1_0); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID attribute wwww value \"" + wwww + "\" is not permitted" + (min_int == 0x100b ? " due to the Objects typed object" : "") + ", permitted values are \"" + min + "\" to \"" + max + "\"", Source_Atmos_1_0); } } if (Flags[item_info::Flags_ID_Z1] && !Flags[item_info::Flags_ID_Z2]) { if (ID[12] != '0' || ID[13] != '1') { // zz != 01 - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID attribute zz value \"" + ID.substr(12, 2) + "\" is not permitted, permitted value is \"01\"", Source_Atmos_1_0); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID attribute zz value \"" + ID.substr(12, 2) + "\" is not permitted, permitted value is \"01\"", Source_Atmos_1_0); } } if (Flags[item_info::Flags_ID_V]) { auto vvvvvvvv = ID.substr(strlen(item_Infos[item_Type].ID_Begin) + 1, 8); if (vvvvvvvv == "00000000") { - Item.AddError(Error, item_Type, i, ":" + (item_Type == item_audioTrackUID ? "U" : ("" + CraftName(item_Infos[item_Type].Name))) + "ID:" + (item_Type == item_audioTrackUID ? "U" : ("" + CraftName(item_Infos[item_Type].Name))) + "ID attribute vvvvvvvv value \"" + vvvvvvvv + "\" is not permitted, permitted values are \"00000001\" to \"FFFFFFFF\"", Source_Atmos_1_0); + Item.AddError(Error, item_Type, i, ":" + (item_Type == item_audioTrackUID ? "U" : ("" + CraftName(item_Infos[item_Type].Name, true))) + "ID:" + (item_Type == item_audioTrackUID ? "U" : ("" + CraftName(item_Infos[item_Type].Name))) + "ID attribute vvvvvvvv value \"" + vvvvvvvv + "\" is not permitted, permitted values are \"00000001\" to \"FFFFFFFF\"", Source_Atmos_1_0); } } } @@ -2551,7 +2870,7 @@ static void CheckErrors_formatLabelDefinition(file_adm_private* File_Adm_Private if (item_Infos[item_Type].ID_Flags[item_info::Flags_ID_YX] && !CheckErrors_ID(File_Adm_Private, Item_ID, item_Infos[item_Type])) { const auto Item_ID_yyyy = Item_ID.substr(strlen(item_Infos[item_Type].ID_Begin) + 1, 4); if ((Label_Present && Item_ID_yyyy != Label) || (Definition_Present && formatLabel_Int != strtoul(Item_ID_yyyy.c_str(), nullptr, 16))) { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID attribute yyyy value \"" + Item_ID_yyyy + "\" does not match " + (Label_Present ? ("formatLabel \"" + Label) : ("formatDefinition \"" + Definition)) + '\"'); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID attribute yyyy value \"" + Item_ID_yyyy + "\" does not match " + (Label_Present ? ("formatLabel \"" + Label) : ("formatDefinition \"" + Definition)) + '\"'); } } } @@ -2619,11 +2938,22 @@ static void CheckErrors_Attributes(file_adm_private* File_Adm_Private, item Item static void CheckErrors_Elements(file_adm_private* File_Adm_Private, item Item_Type) { auto& Items = File_Adm_Private->Items[Item_Type].Items; const auto& Item_Info = item_Infos[Item_Type]; - const auto Element_Infos_Ptr = Item_Info.Element_Infos; - const auto& Element_Infos = *Element_Infos_Ptr; auto& Item = Items.back(); size_t i = Items.size() - 1; auto& Elements = Item.Elements; + const element_items* Element_Infos_Ptr; + if (Item_Type == item_audioBlockFormat) { + static const element_items* audioBlockFormat_xxx_Elements[] = { (element_items*)audioBlockFormat_Elements, (element_items*)audioBlockFormat_DirectSpeakers_Elements, (element_items*)audioBlockFormat_Matrix_Elements, (element_items*)audioBlockFormat_Object_Elements }; + auto Type = GetType(File_Adm_Private, item_audioChannelFormat, File_Adm_Private->Items[item_audioChannelFormat].Items.size() - 1); + if (Type >= size(audioBlockFormat_xxx_Elements)) { + Type = Type_Unknown; + } + Element_Infos_Ptr = audioBlockFormat_xxx_Elements[Type]; + } + else { + Element_Infos_Ptr = Item_Info.Element_Infos; + } + const auto& Element_Infos = *Element_Infos_Ptr; for (size_t j = 0; j < Elements.size(); j++) { const auto& Element = Elements[j]; const auto& Info = Element_Infos[j]; @@ -2634,19 +2964,26 @@ static void CheckErrors_Elements(file_adm_private* File_Adm_Private, item Item_T Item.AddError(Error, j, E::Present0, 0); break; } - if (!Info.Flags[AdvSSE0]) { - Item.AddError(Error, j, E::Present0, 0, Source_AdvSSE_1); - } - if (!Info.Flags[Dolby0]) { - Item.AddError(Error, j, E::Present0, 0, Source_Atmos_1_0); + else { + if (!Info.Flags[AdvSSE0]) { + Item.AddError(Error, j, E::Present0, 0, Source_AdvSSE_1); + } + if (!Info.Flags[Dolby0]) { + Item.AddError(Error, j, E::Present0, 0, Source_Atmos_1_0); + } } break; case 1: - if (!Info.Flags[AdvSSE1]) { - Item.AddError(Error, j, E::Present1, 0, Source_AdvSSE_1); + if (!Info.Flags[Count1]) { + Item.AddError(Error, j, E::Present1, 0); } - if (!Info.Flags[Dolby1]) { - Item.AddError(Error, j, E::Present1, 0, Source_Atmos_1_0); + else { + if (!Info.Flags[AdvSSE1]) { + Item.AddError(Error, j, E::Present1, 0, Source_AdvSSE_1); + } + if (!Info.Flags[Dolby1]) { + Item.AddError(Error, j, E::Present1, 0, Source_Atmos_1_0); + } } break; default: @@ -2654,11 +2991,13 @@ static void CheckErrors_Elements(file_adm_private* File_Adm_Private, item Item_T Item.AddError(Error, j, E::Present2, (int8u)Element_Size); break; } - if (!Info.Flags[AdvSSE2]) { - Item.AddError(Error, j, E::Present2, (int8u)Element_Size, Source_AdvSSE_1); - } - if (!Info.Flags[Dolby2]) { - Item.AddError(Error, j, E::Present2, (int8u)Element_Size, Source_Atmos_1_0); + else { + if (!Info.Flags[AdvSSE2]) { + Item.AddError(Error, j, E::Present2, (int8u)Element_Size, Source_AdvSSE_1); + } + if (!Info.Flags[Dolby2]) { + Item.AddError(Error, j, E::Present2, (int8u)Element_Size, Source_Atmos_1_0); + } } } for (size_t k = 0; k < Element.size(); k++) { @@ -2675,7 +3014,6 @@ static void CheckErrors_Elements(file_adm_private* File_Adm_Private, item Item_T case ITEM_ELEM(item_audioProgrammeReferenceScreen, audioProgrammeReferenceScreen_screenCentrePosition): case ITEM_ELEM(item_audioProgrammeReferenceScreen, audioProgrammeReferenceScreen_screenWidth): case ITEM_ELEM(item_audioBlockFormat, audioBlockFormat_headphoneVirtualise): - case ITEM_ELEM(item_frameHeader, frameHeader_frameFormat): #undef ITEM_ELEM break; default: @@ -2701,7 +3039,7 @@ static void CheckErrors_Element_Target(file_adm_private* File_Adm_Private, item const auto Item_ID_yyyyxxxx = Item_ID.substr(3, 8); const auto TargetIDRef_yyyyxxxx = TargetIDRef.substr(3, 8); if (Item_ID_yyyyxxxx != TargetIDRef_yyyyxxxx) { - Item.AddError(IsAtmos ? Error : Warning, item_Type, i, ':' + CraftName(item_Infos[Target_Type].Name) + "IDRef:" + CraftName(item_Infos[Target_Type].Name) + "IDRef subelement with yyyyxxxx value \"" + TargetIDRef_yyyyxxxx + "\" not same as " + CraftName(item_Infos[item_Type].Name) + "ID attribute yyyyxxxx value \"" + Item_ID_yyyyxxxx + "\"" + (IsAtmos ? ADM_Atmos_1_0 : "")); + Item.AddError(IsAtmos ? Error : Warning, item_Type, i, ':' + CraftName(item_Infos[Target_Type].Name) + "IDRef:" + CraftName(item_Infos[Target_Type].Name) + "IDRef subelement with yyyyxxxx value \"" + TargetIDRef_yyyyxxxx + "\" not same as " + CraftName(item_Infos[item_Type].Name, true) + "ID attribute yyyyxxxx value \"" + Item_ID_yyyyxxxx + "\"" + (IsAtmos ? ADM_Atmos_1_0 : "")); } } } @@ -2723,18 +3061,44 @@ static void CheckErrors_Element_Target(file_adm_private* File_Adm_Private, item } else { bool Target_Found = false; - auto Start = TargetIDRef.rfind('_'); - if (Start != string::npos) { - auto Not0 = TargetIDRef.find_last_not_of('0'); - Target_Found = Start == Not0; // Fake: ID 00000000 means not available, we don't raise an error for them - } for (const auto& Target : Targets) { if (Target.Attributes[item_Infos[Target_Type].ID_Pos] == TargetIDRef) { Target_Found = true; } } if (!Target_Found) { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[Target_Type].Name) + "IDRef:" + CraftName(item_Infos[Target_Type].Name) + "IDRef value \"" + TargetIDRef + "\" shall match the audio" + string(item_Infos[Target_Type].Name) + "ID attribute of an audio" + string(item_Infos[Target_Type].Name) + " element"); + auto Start = TargetIDRef.rfind('_'); + if (Start != string::npos) { + auto Not0 = TargetIDRef.find_last_not_of('0'); + if (Start == Not0) { + Target_Found = true; // Fake: ID 00000000 means not available, we don't raise an error for them + } + else { + // Trying case insensitive, this is permitted by specs + auto TargetIDRef_Up = TargetIDRef; + for (size_t i = Start; i < TargetIDRef_Up.size(); i++) { + auto& Letter = TargetIDRef_Up[i]; + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + for (const auto& Target : Targets) { + auto Target_Up = Target.Attributes[item_Infos[Target_Type].ID_Pos]; + for (size_t i = Start; i < Target_Up.size(); i++) { + auto& Letter = Target_Up[i]; + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + if (Target_Up == TargetIDRef_Up) { + Target_Found = true; + } + } + } + } + } + if (!Target_Found) { + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[Target_Type].Name) + "IDRef:" + CraftName(item_Infos[Target_Type].Name) + "IDRef value \"" + TargetIDRef + "\" shall match the " + CraftName(item_Infos[Target_Type].Name, true) + "ID attribute of an " + CraftName(item_Infos[Target_Type].Name) + " element"); } } } @@ -2834,27 +3198,7 @@ void loudnessMetadata_Check(file_adm_private* File_Adm_Private, item Item_Type) if (loudnessMetadata.Elements[loudnessMetadata_integratedLoudness].empty() && loudnessMetadata.Elements[loudnessMetadata_dialogueLoudness].empty()) Programme.AddError(Error, string(":") + item_Infos[Item_Type].Name + to_string(i) + ":loudnessMetadata" + to_string(j) + ":integratedLoudness is not present", Source_AdvSSE_1); - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = loudnessMetadata.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Programme.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Programme.AddError((error_Type)Error_Type, string(":") + item_Infos[Item_Type].Name + to_string(i) + ":loudnessMetadata" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(loudnessMetadata_renderer, item_renderer); + MoveErrors(File_Adm_Private, item_loudnessMetadata); } //--------------------------------------------------------------------------- @@ -2868,28 +3212,7 @@ void audioProgrammeReferenceScreen_Check(file_adm_private* File_Adm_Private) { size_t i = Programmes.size() - 1; size_t j = Programme.Elements[audioProgramme_audioProgrammeReferenceScreen].size() - 1; - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = ProgrammeReferenceScreen.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Programme.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Programme.AddError((error_Type)Error_Type, ":audioProgramme" + to_string(i) + ":audioProgrammeReferenceScreen" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(audioProgrammeReferenceScreen_screenCentrePosition, item_screenCentrePosition); - MoveErrors(audioProgrammeReferenceScreen_screenWidth, item_screenWidth); + MoveErrors(File_Adm_Private, item_audioProgrammeReferenceScreen); } //--------------------------------------------------------------------------- @@ -2911,10 +3234,10 @@ void screenWidth_Check(file_adm_private* File_Adm_Private) { char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { - screenWidth.AddError(Error, ":audioProgramme" + to_string(i) + ":audioProgrammeReferenceScreen" + to_string(j) + ":screenWidth" + to_string(k) + ":X:X attribute value \"" + Element + "\" is malformed"); + screenWidth.AddError(Error, ":X:X attribute value \"" + Element + "\" is malformed"); } else if (Value < 0 || Value > 2) { - screenWidth.AddError(Error, ":audioProgramme" + to_string(i) + ":audioProgrammeReferenceScreen" + to_string(j) + ":screenWidth" + to_string(k) + ":X:X attribute value \"" + Element + "\" is not permitted, permitted values are [0 - 2]"); + screenWidth.AddError(Error, ":X:X attribute value \"" + Element + "\" is not permitted, permitted values are [0 - 2]"); } } } @@ -2930,27 +3253,8 @@ void authoringInformation_Check(file_adm_private* File_Adm_Private) { size_t i = Programmes.size() - 1; size_t j = Programme.Elements[audioProgramme_authoringInformation].size() - 1; - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = authoringInformation.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Programme.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Programme.AddError((error_Type)Error_Type, ":audioProgramme" + to_string(i) + ":authoringInformation" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(authoringInformation_referenceLayout, item_referenceLayout); + + MoveErrors(File_Adm_Private, item_authoringInformation); } //--------------------------------------------------------------------------- @@ -2968,30 +3272,7 @@ void audioProgramme_Check(file_adm_private* File_Adm_Private) { CheckError_Language(File_Adm_Private, item_audioProgramme, audioProgramme_audioProgrammeLanguage); - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = Programme.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Programme.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Programme.AddError((error_Type)Error_Type, ":audioProgramme" + to_string(i) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(audioProgramme_audioProgrammeLabel, item_audioProgrammeLabel); - MoveErrors(audioProgramme_loudnessMetadata, item_loudnessMetadata); - MoveErrors(audioProgramme_audioProgrammeReferenceScreen, item_audioProgrammeReferenceScreen); - MoveErrors(audioProgramme_authoringInformation, item_authoringInformation); + MoveErrors(File_Adm_Private, item_audioProgramme); if (!File_Adm_Private->IsAtmos && Programme.Attributes[audioProgramme_audioProgrammeName] == "Atmos_Master") { File_Adm_Private->IsAtmos = true; @@ -3023,28 +3304,20 @@ void audioContent_Check(file_adm_private* File_Adm_Private) { } } - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = Content.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Content.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Content.AddError((error_Type)Error_Type, ":audioContent" + to_string(i) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } + auto& ContentLabels = Items[item_audioContentLabel].Items; + auto audioContentLabel_Start = Items[item_audioContentLabel].Items.size() - Content.Elements[audioContent_audioContentLabel].size(); + set PreviousLanguages; + for (size_t k = audioContentLabel_Start; k < ContentLabels.size(); k++) { + const auto& language = ContentLabels[k].Attributes[audioContentLabel_language]; + if (PreviousLanguages.find(language) != PreviousLanguages.end()) { + ContentLabels[k].AddError(Error, item_audioContentLabel, k - audioContentLabel_Start, ":language:language attribute value \"" + language + "\" shall be unique"); } - }; - MoveErrors(audioContent_audioContentLabel, item_audioContentLabel); - MoveErrors(audioContent_loudnessMetadata, item_loudnessMetadata); + else { + PreviousLanguages.insert(language); + } + } + + MoveErrors(File_Adm_Private, item_audioContent); } //--------------------------------------------------------------------------- @@ -3080,28 +3353,7 @@ void audioObjectInteraction_Check(file_adm_private* File_Adm_Private) { size_t i = audioObjects.size() - 1; size_t j = audioObject.Elements[audioObject_audioObjectInteraction].size() - 1; - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = audioObjectInteraction.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - audioObject.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - audioObject.AddError((error_Type)Error_Type, ":audioObject" + to_string(i) + ":audioObjectInteraction" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(audioObjectInteraction_gainInteractionRange, item_gainInteractionRange); - MoveErrors(audioObjectInteraction_positionInteractionRange, item_positionInteractionRange); + MoveErrors(File_Adm_Private, item_audioObjectInteraction); } //--------------------------------------------------------------------------- @@ -3112,31 +3364,7 @@ void Object_Check(file_adm_private* File_Adm_Private) { size_t i = Objects.size() - 1; - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = Object.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - Object.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - Object.AddError((error_Type)Error_Type, ":audioObject" + to_string(i) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(audioObject_audioObjectLabel, item_audioObjectLabel); - MoveErrors(audioObject_audioComplementaryObjectGroupLabel, item_audioComplementaryObjectGroupLabel); - MoveErrors(audioObject_audioObjectInteraction, item_audioObjectInteraction); - MoveErrors(audioObject_positionOffset, item_positionOffset); - MoveErrors(audioObject_alternativeValueSet, item_alternativeValueSet); + MoveErrors(File_Adm_Private, item_audioObject); } //--------------------------------------------------------------------------- @@ -3147,22 +3375,98 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { auto& BlockFormats = Items[item_audioBlockFormat].Items; auto& BlockFormat = BlockFormats.back(); auto& Positions = Items[item_position].Items; + auto& objectDivergences = Items[item_objectDivergence].Items; + + size_t audioBlockFormat_Count = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size(); size_t i = ChannelFormats.size() - 1; - size_t j = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size() - 1; + size_t j = audioBlockFormat_Count - 1; if (i < File_Adm_Private->ChannelFormat_BlockFormat_ReduceCount.size()) { j += File_Adm_Private->ChannelFormat_BlockFormat_ReduceCount[i]; } size_t Position_Pos = Positions.size() - BlockFormat.Elements[audioBlockFormat_position].size(); + const auto objectDivergence_Pos = objectDivergences.size() - BlockFormat.Elements[audioBlockFormat_objectDivergence].size(); const auto& ID = ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID]; const auto Type = GetType(File_Adm_Private, item_audioChannelFormat, i); const auto ID_yyyyxxxx = CheckErrors_ID(File_Adm_Private, ID, item_Infos[item_audioChannelFormat]) ? string() : ID.substr(3, 8); - CheckError_Time(File_Adm_Private, item_audioBlockFormat, audioBlockFormat_rtime); - CheckError_Time(File_Adm_Private, item_audioBlockFormat, audioBlockFormat_duration); - CheckError_Time(File_Adm_Private, item_audioBlockFormat, audioBlockFormat_lstart); - CheckError_Time(File_Adm_Private, item_audioBlockFormat, audioBlockFormat_lduration); + bool initializeBlockActive = (int8s)File_Adm_Private->Version_S >= 0 && BlockFormat.Attributes[audioBlockFormat_initializeBlock] == "1"; + bool CheckNotPresent = Type == Type_Objects && !initializeBlockActive; + auto GetStart = [&](size_t Element_Pos) -> TimeCode { + if (BlockFormat.Attributes_Present[Element_Pos]) { + if (File_Adm_Private->IsLocalTimeReference != (Element_Pos == audioBlockFormat_lstart) || initializeBlockActive) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present1, 0); + } + else if (Type != Type_Objects) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present1, 0, Source_AdvSSE_1); + } + auto Start_TC = CheckError_Time(File_Adm_Private, item_audioBlockFormat, Element_Pos); + if (Start_TC.IsValid() && audioBlockFormat_Count == 1) { + const auto& frameFormats = Items[item_frameFormat].Items; + for (size_t k = 0; k < frameFormats.size(); k++) { + const auto& frameFormat = frameFormats[k]; + TimeCode frameFormat_start_TC = frameFormat.Attributes[frameFormat_start]; + if (frameFormat_start_TC.IsValid() && frameFormat_start_TC != Start_TC) { + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + ':' + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + " attribute value does not match the frameFormat start attribute value", Source_AdvSSE_1); + } + } + static const TimeCode Zero_TC(0, 0, 0, 0, 0); + if (Start_TC != Zero_TC) { + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + ':' + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + " attribute value is not 0", Source_AdvSSE_1); + } + } + return Start_TC; + } + else if (File_Adm_Private->IsLocalTimeReference == (Element_Pos == audioBlockFormat_lstart) && CheckNotPresent) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present0, 0, Source_AdvSSE_1); + } + return {}; + }; + auto GetDuration = [&](size_t Element_Pos) -> TimeCode { + if (BlockFormat.Attributes_Present[Element_Pos]) { + if (File_Adm_Private->IsLocalTimeReference != (Element_Pos == audioBlockFormat_lduration) || initializeBlockActive) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present1, 0); + } + else if (Type != Type_Objects) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present1, 0, Source_AdvSSE_1); + } + auto Duration_TC = CheckError_Time(File_Adm_Private, item_audioBlockFormat, Element_Pos); + if (Duration_TC.IsValid()) { + const auto Duration_ms = Duration_TC.ToMilliseconds(); + if (Duration_ms && Duration_ms < 5) { + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + ':' + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + " attribute value is not permitted, permitted values are 0 or > 5 ms", Source_AdvSSE_1); + } + } + return Duration_TC; + } + else if (File_Adm_Private->IsLocalTimeReference == (Element_Pos == audioBlockFormat_lduration) && CheckNotPresent) { + BlockFormat.AddError(Error, 0x80 | Element_Pos, E::Present0, 0, Source_AdvSSE_1); + } + return {}; + }; + auto CheckTimeOffset = [&](size_t Element_Pos, TimeCode& LastBlockFormatEnd, const TimeCode& Start, const TimeCode& Duration) { + if (audioBlockFormat_Count != 1 && LastBlockFormatEnd.IsValid() && Start.IsValid() && LastBlockFormatEnd != Start) { + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + ':' + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + " attribute value does not match the previous audioBlockFormat", Source_AdvSSE_1); + } + if (Start.IsValid() && Duration.IsValid()) { + LastBlockFormatEnd = Start + Duration; + } + else { + LastBlockFormatEnd = {}; + } + }; + + TimeCode rtime, duration, lstart, lduration; + rtime = GetStart(audioBlockFormat_rtime); + duration = GetDuration(audioBlockFormat_duration); + if ((int8s)File_Adm_Private->Version_S < 0 && BlockFormat.Attributes_Present[audioBlockFormat_initializeBlock]) { + BlockFormat.AddError(Error, 0x80 | audioBlockFormat_initializeBlock, E::Present1, 0); + } + lstart = GetStart(audioBlockFormat_lstart); + lduration = GetDuration(audioBlockFormat_lduration); + CheckTimeOffset(audioBlockFormat_rtime, File_Adm_Private->LastBlockFormatEnd, rtime, duration); + CheckTimeOffset(audioBlockFormat_lstart, File_Adm_Private->LastBlockFormatEnd_S, lstart, lduration); atmos_audioChannelFormatName ChannelAssignment = (atmos_audioChannelFormatName)-1; if (Type == Type_DirectSpeakers && ChannelFormat.Attributes_Present[audioChannelFormat_audioChannelFormatName]) { @@ -3174,7 +3478,7 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { for (size_t k = 0; k < channelLocks.size(); k++) { const auto& channelLock = channelLocks[k]; if (channelLock != "0" && channelLock != "1") { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":channelLock" + to_string(k) + ":GeneralCompliance:channelLock element value " + channelLock + " is not permitted, permitted value are \"0\" or \"1\""); + BlockFormat.AddError(Error, ":channelLock" + to_string(k) + ":GeneralCompliance:channelLock element value " + channelLock + " is not permitted, permitted value are \"0\" or \"1\""); } } @@ -3184,13 +3488,13 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is malformed"); + BlockFormat.AddError(Error, ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is malformed"); } else if (Value < 0 || Value > 1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is not permitted, permitted values are [0 - 1]"); + BlockFormat.AddError(Error, ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is not permitted, permitted values are [0 - 1]"); } else if (Value != 0 && Value != 1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is not permitted, permitted values are 0 or 1", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":diffuse" + to_string(k) + ":GeneralCompliance:diffuse element value \"" + Element + "\" is not permitted, permitted values are 0 or 1", Source_Atmos_1_0); } } @@ -3202,7 +3506,7 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":gain:gain attribute value \"" + Element + "\" is malformed"); + BlockFormat.AddError(Error, ":gain:gain attribute value \"" + Element + "\" is malformed"); } else if (Value){ Gains_Not0 = Element; @@ -3216,17 +3520,17 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":importance:importance element value \"" + Element + "\" is malformed"); + BlockFormat.AddError(Error, ":importance:importance element value \"" + Element + "\" is malformed"); } else if (Value < 0 || Value > 10) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":importance:importance element value \"" + Element + "\" is not permitted, permitted values are [0 - 10]"); + BlockFormat.AddError(Error, ":importance:importance element value \"" + Element + "\" is not permitted, permitted values are [0 - 10]"); } else if (Value == 0) { if (BlockFormat.Elements[audioBlockFormat_gain].empty()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":gain element is not present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":gain element is not present", Source_Atmos_1_0); } else { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":gain" + to_string(Gains_Not0_Pos) + ":gain element value \"" + Gains_Not0 + "\" is not permitted, permitted value is 0 due to importance element value not 0", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":gain" + to_string(Gains_Not0_Pos) + ":gain element value \"" + Gains_Not0 + "\" is not permitted, permitted value is 0 due to importance element value not 0", Source_Atmos_1_0); } } } @@ -3235,20 +3539,20 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { for (size_t k = 0; k < jumpPositions.size(); k++) { const auto& jumpPosition = jumpPositions[k]; if (jumpPosition != "0" && jumpPosition != "1") { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":jumpPosition" + to_string(k) + ":GeneralCompliance:jumpPosition element value " + jumpPosition + " is not permitted, permitted value are \"0\" or \"1\""); + BlockFormat.AddError(Error, ":jumpPosition" + to_string(k) + ":GeneralCompliance:jumpPosition element value " + jumpPosition + " is not permitted, permitted value are \"0\" or \"1\""); } } switch (jumpPositions.size()) { case 0: switch (Type) { case Type_Objects: - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":jumpPosition:jumpPosition element is not present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":jumpPosition:jumpPosition element is not present", Source_Atmos_1_0); } break; default: switch (Type) { case Type_DirectSpeakers: - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":GeneralCompliance:jumpPosition subelement count " + to_string(jumpPositions.size()) + " is not permitted, max is 1", Source_Atmos_1_0); break; } // Fallthrough @@ -3262,17 +3566,17 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { char* End; auto Value = strtof(interpolationLength.c_str(), &End); if (End - interpolationLength.c_str() != interpolationLength.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":jumpPosition0:interpolationLength:interpolationLength attribute value \"" + interpolationLength + "\" is malformed"); + BlockFormat.AddError(Error, ":jumpPosition0:interpolationLength:interpolationLength attribute value \"" + interpolationLength + "\" is malformed"); } else { float ValidValue = j ? 0.005208 : 0; if (Value != ValidValue) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":jumpPosition0:interpolationLength:interpolationLength attribute value \"" + interpolationLength + "\" is not permitted, permitted value is " + (j ? "0.005208" : "0"), Source_Atmos_1_0); + BlockFormat.AddError(Error, ":jumpPosition0:interpolationLength:interpolationLength attribute value \"" + interpolationLength + "\" is not permitted, permitted value is " + (j ? "0.005208" : "0"), Source_Atmos_1_0); } } } else { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":jumpPosition0:interpolationLength attribute is not present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":jumpPosition0:interpolationLength attribute is not present", Source_Atmos_1_0); } } } @@ -3280,18 +3584,18 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { if (Type == Type_DirectSpeakers) { if (BlockFormat.Attributes_Present[audioBlockFormat_rtime]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":rtime:rtime attribute is present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":rtime:rtime attribute is present", Source_Atmos_1_0); } if (BlockFormat.Attributes_Present[audioBlockFormat_duration]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":duration:duration attribute is present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":duration:duration attribute is present", Source_Atmos_1_0); } } if (Type == Type_Objects) { if (!BlockFormat.Attributes_Present[audioBlockFormat_rtime]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":rtime:rtime attribute is not present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":rtime:rtime attribute is not present", Source_Atmos_1_0); } if (!BlockFormat.Attributes_Present[audioBlockFormat_duration]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":duration:duration attribute is not present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":duration:duration attribute is not present", Source_Atmos_1_0); } } @@ -3300,7 +3604,24 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { if (!CheckErrors_ID(File_Adm_Private, ID_Block, item_Infos[item_audioBlockFormat])) { if (!CheckErrors_ID(File_Adm_Private, ID, item_Infos[item_audioChannelFormat])) { const auto ID_Block_yyyyxxxx = ID_Block.substr(3, 8); - if (ID_Block_yyyyxxxx != ID_yyyyxxxx) { + bool Found = ID_Block_yyyyxxxx == ID_yyyyxxxx; + if (!Found) { + // Trying case insensitive, this is permitted by specs + auto ID_Block_yyyyxxxx_Up = ID_Block_yyyyxxxx; + for (auto& Letter : ID_Block_yyyyxxxx_Up) { + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + auto ID_yyyyxxxx_Up = ID_yyyyxxxx; + for (auto& Letter : ID_yyyyxxxx_Up) { + if (Letter >= 'A' && Letter <= 'F') { + Letter += 'a' - 'A'; + } + } + Found = ID_Block_yyyyxxxx_Up == ID_yyyyxxxx_Up; + } + if (!Found) { ChannelFormat.AddError(File_Adm_Private->IsAtmos ? Error : Warning, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":audioBlockFormatID:audioBlockFormatID attribute with yyyyxxxx value \"" + ID_Block_yyyyxxxx + "\" not same as audioChannelFormatID attribute yyyyxxxx value \"" + ID_yyyyxxxx + "\"", File_Adm_Private->IsAtmos ? Source_Atmos_1_0 : Source_ADM); } } @@ -3309,7 +3630,7 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { auto ID_Block_zzzzzzzz_Expected = j + HasNoInit; if ((HasNoInit || !j) && ID_Block_zzzzzzzz_Int != ID_Block_zzzzzzzz_Expected) { const auto ID_Block_Expected = ID_Block.substr(0, 12) + Hex2String(ID_Block_zzzzzzzz_Expected, 8); - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":audioBlockFormatID:audioBlockFormatID attribute value \"" + ID_Block + "\" shall be \"" + ID_Block_Expected + "\" in order to match the audioBlockFormat index"); + BlockFormat.AddError(Error, ":audioBlockFormatID:audioBlockFormatID attribute value \"" + ID_Block + "\" shall be \"" + ID_Block_Expected + "\" in order to match the audioBlockFormat index"); } } @@ -3325,7 +3646,7 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { } } if (!IsInList) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":GeneralConformance:" + (*item_Infos[item_audioBlockFormat].Element_Infos)[l].Name + " subelement is present"); + BlockFormat.AddError(Error, string(":GeneralConformance:") + (*item_Infos[item_audioBlockFormat].Element_Infos)[l].Name + " subelement is present"); } } }; @@ -3335,17 +3656,17 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { const audioBlockFormat_Element BlockFormat_DirectSpeakers_List[] = { audioBlockFormat_cartesian, audioBlockFormat_speakerLabel, audioBlockFormat_position }; // TODO: cartesian is not in specs but lot of files have it List_Check((audioBlockFormat_Element*)&BlockFormat_DirectSpeakers_List, sizeof(BlockFormat_DirectSpeakers_List) / sizeof(*BlockFormat_DirectSpeakers_List)); if (BlockFormat.Elements[audioBlockFormat_speakerLabel].empty()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[audioBlockFormat_speakerLabel].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[audioBlockFormat_speakerLabel].Name + " element is not present"); + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[audioBlockFormat_speakerLabel].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[audioBlockFormat_speakerLabel].Name + " element is not present"); } else { const auto& speakerLabel = BlockFormat.Elements[audioBlockFormat_speakerLabel].back(); speakerLabel_ChannelAssignment = Atmos_audioChannelFormat_Pos(speakerLabel, true); if (speakerLabel_ChannelAssignment == (size_t)-1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":speakerLabel:speakerLabel element value " + speakerLabel + " is not permitted", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":speakerLabel:speakerLabel element value " + speakerLabel + " is not permitted", Source_Atmos_1_0); } else { if (ChannelAssignment != (atmos_audioChannelFormatName)-1 && speakerLabel_ChannelAssignment != ChannelAssignment) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":speakerLabel:speakerLabel element value " + speakerLabel + " is not permitted, permitted value is " + Atmos_audioChannelFormat_Content[ChannelAssignment].SpeakerLabel + "", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":speakerLabel:speakerLabel element value " + speakerLabel + " is not permitted, permitted value is " + Atmos_audioChannelFormat_Content[ChannelAssignment].SpeakerLabel + "", Source_Atmos_1_0); } } } @@ -3362,15 +3683,15 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { char* End; is_cartesian = strtoul(cartesian.c_str(), &End, 10); if (to_string(is_cartesian) != cartesian) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":cartesian:cartesian element value \"" + cartesian + "\" is malformed"); + BlockFormat.AddError(Error, ":cartesian:cartesian element value \"" + cartesian + "\" is malformed"); is_cartesian = (unsigned long)-1; } else if (is_cartesian > 1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":cartesian:cartesian element value \"" + cartesian + "\" is not permitted, permitted values are 0 or 1"); + BlockFormat.AddError(Error, ":cartesian:cartesian element value \"" + cartesian + "\" is not permitted, permitted values are 0 or 1"); } else { if (!is_cartesian) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":cartesian:cartesian element value is not 1", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":cartesian:cartesian element value is not 1", Source_Atmos_1_0); } } } @@ -3380,21 +3701,36 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { bitset<3> HasXYZ; for (size_t k = 0; k < position_Count; k++) { auto& Position = Positions[Position_Pos + k]; - if (Position.Attributes_Present[position_coordinate]) { + if (Position.Attributes_Present[position_coordinate] && !Position.Attributes_Present[position_bound]) { if (Position.Attributes[position_coordinate].size() == 1 && Position.Attributes[position_coordinate][0] >= 'X' && Position.Attributes[position_coordinate][0] <= 'Z') { auto Pos = Position.Attributes[position_coordinate][0] - 'X'; - HasXYZ.set(Pos); + if (HasXYZ[Pos]) { + BlockFormat.AddError(Error, ":coordinate:coordinate@position=\"" + Position.Attributes[position_coordinate] + "\" element is not unique"); + } + else { + HasXYZ.set(Pos); + } } size_t Pos = 0; for (; Pos < 3 && Position.Attributes[position_coordinate] != Cartesian_0_Names[Pos]; Pos++) { } if (Pos < 3) { - HasAED.set(Pos); + if (HasAED[Pos]) { + BlockFormat.AddError(Error, ":coordinate:coordinate@position=\"" + Position.Attributes[position_coordinate] + "\" element is not unique"); + } + else { + HasAED.set(Pos); + } } } } if (HasXYZ.count() > HasAED.count()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":cartesian:cartesian element is not present", Source_Atmos_1_0); + if (Type == Type_Objects) { + BlockFormat.AddError(Error, ":cartesian:cartesian element is not present"); + } + else { + BlockFormat.AddError(Error, ":cartesian:cartesian element is not present", Source_Atmos_1_0); + } is_cartesian = 1; } @@ -3407,7 +3743,7 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { if (Type == Type_Objects) { if (is_cartesian == 0) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position:position element use polar attributes", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":position:position element use polar attributes", Source_Atmos_1_0); } } } @@ -3417,30 +3753,45 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { static float32 Cartesian_0_Limits[][2] = { {-180, 180}, { -90, 90}, {0, 1 } }; for (size_t k = 0; k < position_Count; k++) { auto& Position = Positions[Position_Pos + k]; - if (Position.Attributes_Present[position_coordinate]) { + if (Position.Attributes_Present[position_coordinate] && !Position.Attributes_Present[position_bound]) { size_t Pos = 0; for (; Pos < 3 && Position.Attributes[position_coordinate] != Cartesian_0_Names[Pos]; Pos++) { } if (Pos < 3) { - HasAED.set(Pos); + if (HasAED[Pos]) { + BlockFormat.AddError(Error, ":coordinate:coordinate@position=\"" + Position.Attributes[position_coordinate] + "\" element is not unique"); + } + else { + HasAED.set(Pos); + } const auto& Element = BlockFormat.Elements[audioBlockFormat_position][k]; char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":GeneralCompliance:position element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is malformed"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":GeneralCompliance:position element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is malformed"); } else if (Value < Cartesian_0_Limits[Pos][0] || Value > Cartesian_0_Limits[Pos][1]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":GeneralCompliance:position element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is not permitted, permitted values are [" + to_string(Cartesian_0_Limits[Pos][0]) + " - " + to_string(Cartesian_0_Limits[Pos][1]) + "]"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":GeneralCompliance:position element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is not permitted, permitted values are [" + to_string(Cartesian_0_Limits[Pos][0]) + " - " + to_string(Cartesian_0_Limits[Pos][1]) + "]"); } } else { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":coordinate:coordinate attribute \"" + Position.Attributes[position_coordinate] + "\" is present"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":coordinate:coordinate attribute \"" + Position.Attributes[position_coordinate] + "\" is present"); } } } for (size_t k = 0; k < 2; k++) { if (!HasAED[k]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":coordinate:coordinate==\"" + Cartesian_0_Names[k] + "\" element is not present"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":coordinate:coordinate==\"" + Cartesian_0_Names[k] + "\" element is not present"); + } + } + + for (size_t k = objectDivergence_Pos; k < objectDivergences.size(); k++) { + auto& objectDivergence = objectDivergences[k]; + if (!objectDivergence.Attributes_Present[objectDivergence_azimuthRange]) { + objectDivergence.AddError(Error, 0x80 | objectDivergence_azimuthRange, E::Present0, 0); + } + if (objectDivergence.Attributes_Present[objectDivergence_positionRange]) { + objectDivergence.AddError(Error, 0x80 | objectDivergence_positionRange, E::Present1, 0); } } } @@ -3450,39 +3801,52 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { bool ValuesAreNok = false; for (size_t k = 0; k < position_Count; k++) { auto& Position = Positions[Position_Pos + k]; - if (Position.Attributes_Present[position_coordinate]) { + if (Position.Attributes_Present[position_coordinate] && !Position.Attributes_Present[position_bound]) { if (Position.Attributes[position_coordinate].size() == 1 && Position.Attributes[position_coordinate][0] >= 'X' && Position.Attributes[position_coordinate][0] <= 'Z') { auto Pos = Position.Attributes[position_coordinate][0] - 'X'; + if (HasXYZ[Pos]) { + BlockFormat.AddError(Error, ":coordinate:coordinate@position=\"" + Position.Attributes[position_coordinate] + "\" element is not unique"); + } HasXYZ.set(Pos); const auto& Element = BlockFormat.Elements[audioBlockFormat_position][k]; char* End; Values[Pos] = strtof(Element.c_str(), &End); if (End - Element.c_str() != Element.size()) { ValuesAreNok = true; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed"); + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed"); } else if (Values[Pos] < -1 || Values[Pos] > 1) { ValuesAreNok = true; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":coordinate:coordinate=\"" + Position.Attributes[position_coordinate] + "\" element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is not permitted, permitted values are [-1,1]"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":coordinate:coordinate=\"" + Position.Attributes[position_coordinate] + "\" element value \"" + BlockFormat.Elements[audioBlockFormat_position][k] + "\" is not permitted, permitted values are [-1,1]"); } } else { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position" + to_string(k) + ":coordinate:coordinate attribute \"" + Position.Attributes[position_coordinate] + "\" is present"); + BlockFormat.AddError(Error, ":position" + to_string(k) + ":coordinate:coordinate attribute \"" + Position.Attributes[position_coordinate] + "\" is present"); } } } for (size_t l = 0; l < 2; l++) { if (!HasXYZ[l]) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position:coordinate:coordinate==\"" + string(1, 'X' + l) + "\" element is not present"); + BlockFormat.AddError(Error, ":position:coordinate:coordinate==\"" + string(1, 'X' + l) + "\" element is not present"); } } if (!ValuesAreNok && speakerLabel_ChannelAssignment != -1) { auto position_ChannelAssignment = Atmos_audioChannelFormat_Pos(Values[0], Values[1], Values[2], speakerLabel_ChannelAssignment); if (position_ChannelAssignment == -1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position:position@coordinate=\"X\" \"Y\" \"Z\" element value \"" + Ztring::ToZtring(Values[0], (Values[0] - (int)Values[0]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[1], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[2], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" is not valid", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":position:position@coordinate=\"X\" \"Y\" \"Z\" element value \"" + Ztring::ToZtring(Values[0], (Values[0] - (int)Values[0]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[1], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[2], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" is not valid", Source_Atmos_1_0); } else if (position_ChannelAssignment != speakerLabel_ChannelAssignment) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":position:position@coordinate=\"X\" \"Y\" \"Z\" element value \"" + Ztring::ToZtring(Values[0], (Values[0] - (int)Values[0]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[1], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[2], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" so \"" + Atmos_audioChannelFormat_Content[position_ChannelAssignment].SpeakerLabel + "\" does not match corresponding speakerLabel element value \"" + Atmos_audioChannelFormat_Content[speakerLabel_ChannelAssignment].SpeakerLabel + "\"", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":position:position@coordinate=\"X\" \"Y\" \"Z\" element value \"" + Ztring::ToZtring(Values[0], (Values[0] - (int)Values[0]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[1], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" \"" + Ztring::ToZtring(Values[2], (Values[2] - (int)Values[2]) ? 5 : 0).To_UTF8() + "\" so \"" + Atmos_audioChannelFormat_Content[position_ChannelAssignment].SpeakerLabel + "\" does not match corresponding speakerLabel element value \"" + Atmos_audioChannelFormat_Content[speakerLabel_ChannelAssignment].SpeakerLabel + "\"", Source_Atmos_1_0); + } + } + + for (size_t k = objectDivergence_Pos; k < objectDivergences.size(); k++) { + auto& objectDivergence = objectDivergences[k]; + if (objectDivergence.Attributes_Present[objectDivergence_azimuthRange]) { + objectDivergence.AddError(Error, 0x80 | objectDivergence_azimuthRange, E::Present1, 0); + } + if (!objectDivergence.Attributes_Present[objectDivergence_positionRange]) { + objectDivergence.AddError(Error, 0x80 | objectDivergence_positionRange, E::Present0, 0); } } } @@ -3500,121 +3864,53 @@ void audioBlockFormat_Check(file_adm_private* File_Adm_Private) { } else if (Element != Value_Ref && !AreNotSame) { AreNotSame = true; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":GeneralCompliance:width/height/depth element values are not same", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":GeneralCompliance:width/height/depth element values are not same", Source_Atmos_1_0); } auto Max = (is_cartesian || k == audioBlockFormat_depth) ? 1 : 360; char* End; auto Value = strtof(Element.c_str(), &End); if (End - Element.c_str() < Element.size()) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed"); + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is malformed"); } else if (Value < 0 || Value > Max) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is not permitted, permitted values are [0," + to_string(Max) + "]"); + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + ':' + (*item_Infos[item_audioBlockFormat].Element_Infos)[k].Name + " element value \"" + Element + "\" is not permitted, permitted values are [0," + to_string(Max) + "]"); } Count++; } } if (Count && Count != 3) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":GeneralCompliance:width/height/depth element values are not all present", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":GeneralCompliance:width/height/depth element values are not all present", Source_Atmos_1_0); } } - if (!File_Adm_Private->CartesianAlreadyNotCoherent) { - switch (Type) { - case Type_DirectSpeakers: - case Type_Objects: - if (File_Adm_Private->CartesianIsTested) { - if ((File_Adm_Private->CartesianPresent && BlockFormats.back().Elements[audioBlockFormat_cartesian].empty()) || (File_Adm_Private->CartesianPresent && BlockFormats.back().Elements[audioBlockFormat_cartesian][0] != File_Adm_Private->CartesianValue)) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":cartesian:cartesian element values are not consistant between audioBlockFormat elements", Source_AdvSSE_1); - File_Adm_Private->CartesianAlreadyNotCoherent = true; - } + if (Type == Type_Objects) { + switch (File_Adm_Private->CartesianAlreadyNotCoherent) { + case cartesian_unknown: + if (is_cartesian <= 1) { + File_Adm_Private->CartesianAlreadyNotCoherent = cartesion_test(cartesian_0 + is_cartesian); } - else { - File_Adm_Private->CartesianIsTested = true; - File_Adm_Private->CartesianPresent = !BlockFormat.Elements[audioBlockFormat_cartesian].empty(); - if (File_Adm_Private->CartesianPresent) { - File_Adm_Private->CartesianValue = BlockFormat.Elements[audioBlockFormat_cartesian][0]; - } + break; + case cartesian_alreadyincoherent: + break; + default: + if (is_cartesian != File_Adm_Private->CartesianAlreadyNotCoherent - cartesian_0) { + BlockFormat.AddError(Error, ":cartesian:cartesian element values are not consistant between audioBlockFormat elements", Source_AdvSSE_1); + File_Adm_Private->CartesianAlreadyNotCoherent = cartesian_alreadyincoherent; } } } - if (BlockFormat.Attributes_Present[audioBlockFormat_rtime]) { - if (/*File_Adm_Private->IsLocalTimeReference ||*/ BlockFormat.Attributes[audioBlockFormat_initializeBlock] == "1") { - BlockFormat.AddError(Error, 0x80 | audioBlockFormat_rtime, E::Present1, 0); - } - } - else if (!File_Adm_Private->IsLocalTimeReference) { - //BlockFormat.AddError(Error, 0x80 | audioBlockFormat_rtime, E::Present0, 0, Source_AdvSSE_1); - } - if (BlockFormat.Attributes_Present[audioBlockFormat_duration]) { - if (/*File_Adm_Private->IsLocalTimeReference ||*/ BlockFormat.Attributes[audioBlockFormat_initializeBlock] == "1") { - BlockFormat.AddError(Error, 0x80 | audioBlockFormat_duration, E::Present1, 0); - } - const auto& Duration = BlockFormat.Attributes[audioBlockFormat_duration]; - const TimeCode Duration_TC = Duration; - const auto Duration_ms = Duration_TC.ToMilliseconds(); - if (Duration_ms && Duration_ms < 5) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":duration:duration attribute value is not permitted, permitted values are 0 or > 5 ms", Source_AdvSSE_1); - } - } - if ((int8s)File_Adm_Private->Version_S < 0 && BlockFormat.Attributes_Present[audioBlockFormat_initializeBlock]) { - BlockFormat.AddError(Error, 0x80 | audioBlockFormat_initializeBlock, E::Present1, 0); + while (File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.size() < ChannelFormats.size()) { + File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.push_back({}); } - if (BlockFormat.Attributes_Present[audioBlockFormat_lstart]) { - if (/*!File_Adm_Private->IsLocalTimeReference || */ BlockFormat.Attributes[audioBlockFormat_initializeBlock] == "1") { - BlockFormat.AddError(Error, 0x80 | audioBlockFormat_lstart, E::Present1, 0); + const auto& outputChannelFormatIDRefs = BlockFormat.Elements[audioBlockFormat_outputChannelFormatIDRef]; + if (File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.back().empty() || outputChannelFormatIDRefs != File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.back().back().List) { + if (File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.back().size() < 0x100) { // Limit the count of different outputChannelFormatIDRefs stored + File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.back().push_back({ audioBlockFormat_Count - 1, outputChannelFormatIDRefs }); } } - else if (!File_Adm_Private->IsLocalTimeReference) { - //BlockFormat.AddError(Error, 0x80 | audioBlockFormat_lstart, E::Present0, 0, Source_AdvSSE_1); - } - if (BlockFormat.Attributes_Present[audioBlockFormat_lduration]) { - if (/*!File_Adm_Private->IsLocalTimeReference ||*/ BlockFormat.Attributes[audioBlockFormat_initializeBlock] == "1") { - BlockFormat.AddError(Error, 0x80 | audioBlockFormat_lduration, E::Present1, 0); - } - const auto& Duration = BlockFormat.Attributes[audioBlockFormat_lduration]; - const TimeCode Duration_TC = Duration; - const auto Duration_ms = Duration_TC.ToMilliseconds(); - if (Duration_ms && Duration_ms < 5) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":lduration:lduration attribute value is not permitted, permitted values are 0 or > 5 ms", Source_AdvSSE_1); - } - } - else if (!File_Adm_Private->IsLocalTimeReference) { - //BlockFormat.AddError(Error, 0x80 | audioBlockFormat_lduration, E::Present0, 0, Source_AdvSSE_1); - } - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = BlockFormat.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - auto l = BlockFormats.size() - ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size(); - if (l > 255) { - l = 255; - } - ChannelFormat.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k + (char)item_audioBlockFormat + (char)0, (source)Source); - } - else { - ChannelFormat.AddError((error_Type)Error_Type, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(audioBlockFormat_gain, item_gain); - MoveErrors(audioBlockFormat_headphoneVirtualise, item_headphoneVirtualise); - MoveErrors(audioBlockFormat_position, item_position); - MoveErrors(audioBlockFormat_jumpPosition, item_jumpPosition); - MoveErrors(audioBlockFormat_channelLock, item_channelLock); - MoveErrors(audioBlockFormat_objectDivergence, item_objectDivergence); - MoveErrors(audioBlockFormat_zoneExclusion, item_zoneExclusion); + MoveErrors(File_Adm_Private, item_audioBlockFormat); } //--------------------------------------------------------------------------- @@ -3650,15 +3946,141 @@ void gain_Check(file_adm_private* File_Adm_Private) { const auto& Value = BlockFormat.Elements[audioBlockFormat_gain].back(); char* End; - auto Float = strtof(Value.c_str(), &End); + auto Float = strtod(Value.c_str(), &End); if (End - Value.c_str() != Value.size()) { BlockFormat.AddError(Error, audioBlockFormat_gain, E::Form, File_Adm_Private, Value); } else if (Unit >= 0) { - if (Float > 10) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":gain:gain element value \"" + Value + "\" is not permitted"); + static const double Linear_10dB = 3.1622776601683793319988935444327; // 10 ^ ( dB / 20) + if ((Unit == 0 && Float > Linear_10dB) || (Unit == 1 && Float > 10)) { + BlockFormat.AddError(Error, ":gain:gain element value \"" + Value + "\" is not permitted", Source_AdvSSE_1); + } + } +} + +//--------------------------------------------------------------------------- +void coefficient_Check(file_adm_private* File_Adm_Private) { + auto& Items = File_Adm_Private->Items; + auto& Matrixes = Items[item_matrix].Items; + auto& Matrix = Matrixes.back(); + const auto Matrix_Coefficients = Matrix.Elements[matrix_coefficient]; + const auto& coefficient = Matrix_Coefficients.back(); + auto& Coefficients = Items[item_coefficient].Items; + auto& Coefficient = Coefficients.back(); + + static const char* gain_List[] = { "linear", "dB" }; + int Unit = -1; + if (Coefficient.Attributes_Present[coefficient_gainUnit]) { + const auto& Type = Coefficient.Attributes[coefficient_gainUnit]; + size_t List_Size = sizeof(gain_List) / sizeof(gain_List[0]); + for (size_t i = 0; i < List_Size; i++) { + if (Type == gain_List[i]) { + Unit = i; + } + } + if (Unit < 0) { + Coefficient.AddError(Error, 0x80 | (char)coefficient_gainUnit, E::Form, File_Adm_Private, Type); + } + } + else { + Unit = 0; + } + + if (Coefficient.Attributes_Present[coefficient_gain]) { + const auto& Value = Coefficient.Attributes[coefficient_gain]; + char* End; + auto Float = strtod(Value.c_str(), &End); + if (End - Value.c_str() != Value.size()) { + Coefficient.AddError(Error, coefficient_gain, E::Form, File_Adm_Private, Value); + } + else if (Unit >= 0) { + static const int Linear_20dB = 10; // 10 ^ ( dB / 20) + if ((Unit == 0 && Float > Linear_20dB) || (Unit == 1 && Float > 20)) { + Coefficient.AddError(Error, ":gain:gain attribute value \"" + Value + "\" is not permitted", Source_AdvSSE_1); + } + } + } + + if (find(File_Adm_Private->coefficients.begin(), File_Adm_Private->coefficients.end(), coefficient) != File_Adm_Private->coefficients.end()) { + Matrix.AddError(Error, item_matrix, 0, ":coefficient" + to_string(Matrix_Coefficients.size() - 1) + ":coefficient value \"" + coefficient + "\" shall be unique"); + } + else { + File_Adm_Private->coefficients.push_back(coefficient); + } +} + +//--------------------------------------------------------------------------- +void matrix_Check(file_adm_private* File_Adm_Private) { + auto& Items = File_Adm_Private->Items; + auto& ChannelFormats = Items[item_audioChannelFormat].Items; + auto& ChannelFormat = ChannelFormats.back(); + auto& BlockFormats = Items[item_audioBlockFormat].Items; + auto& BlockFormat = BlockFormats.back(); + auto& Matrixes = Items[item_matrix].Items; + auto& Matrix = Matrixes.back(); + + while (File_Adm_Private->ChannelFormat_Matrix_coefficients.size() < ChannelFormats.size()) { + File_Adm_Private->ChannelFormat_Matrix_coefficients.push_back({}); + } + if (!File_Adm_Private->ChannelFormat_Matrix_coefficients.back().empty() && File_Adm_Private->coefficients == File_Adm_Private->ChannelFormat_Matrix_coefficients.back().back().List) { + File_Adm_Private->coefficients.clear(); + return; + } + + auto audioBlockFormat_Count = ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].size(); + if (File_Adm_Private->ChannelFormat_Matrix_coefficients.back().size() < 0x100) { // Limit the count of different coefficients stored + File_Adm_Private->ChannelFormat_Matrix_coefficients.back().push_back({ audioBlockFormat_Count - 1, move(File_Adm_Private->coefficients) }); + } +} + +//--------------------------------------------------------------------------- +void objectDivergence_Check(file_adm_private* File_Adm_Private) { + auto& Items = File_Adm_Private->Items; + auto& ChannelFormats = Items[item_audioChannelFormat].Items; + auto& ChannelFormat = ChannelFormats.back(); + auto& BlockFormats = Items[item_audioBlockFormat].Items; + auto& BlockFormat = BlockFormats.back(); + auto& objectDivergence_Items = BlockFormat.Elements[audioBlockFormat_objectDivergence]; + auto& objectDivergences = Items[item_objectDivergence].Items; + auto& objectDivergence = objectDivergences.back(); + + const size_t k = objectDivergence_Items.size() - 1; + + if (objectDivergence.Attributes_Present[objectDivergence_azimuthRange]) + { + const auto& Element = objectDivergence.Attributes[objectDivergence_azimuthRange]; + char* End; + auto Value = strtof(Element.c_str(), &End); + if (End - Element.c_str() != Element.size()) { + objectDivergence.AddError(Error, 0x80 | (char)objectDivergence_azimuthRange, E::Form, File_Adm_Private, Element); + } + else if (Value < 0 || Value > 1) { + objectDivergence.AddError(Error, ":azimuthRange" + to_string(k) + ":GeneralCompliance:azimuthRange attribute value \"" + Element + "\" is not permitted, permitted values are [0,180]"); } } + + if (objectDivergence.Attributes_Present[objectDivergence_positionRange]) + { + const auto& Element = objectDivergence.Attributes[objectDivergence_positionRange]; + char* End; + auto Value = strtof(Element.c_str(), &End); + if (End - Element.c_str() != Element.size()) { + objectDivergence.AddError(Error, 0x80 | (char)objectDivergence_positionRange, E::Form, File_Adm_Private, Element); + } + else if (Value < 0 || Value > 1) { + objectDivergence.AddError(Error, ":positionRange" + to_string(k) + ":GeneralCompliance:positionRange attribute value \"" + Element + "\" is not permitted, permitted values are [0,1]"); + } + } + + const auto& Element = objectDivergence_Items.back(); + char* End; + auto Value = strtof(Element.c_str(), &End); + if (End - Element.c_str() != Element.size()) { + BlockFormat.AddError(Error, (char)audioBlockFormat_objectDivergence, E::Form, File_Adm_Private, Element); + } + else if (Value < 0 || Value > 1) { + BlockFormat.AddError(Error, ":objectDivergence" + to_string(k) + ":GeneralCompliance:objectDivergence element value \"" + Element + "\" is not permitted, permitted values are [0,1]"); + } } //--------------------------------------------------------------------------- @@ -3723,52 +4145,32 @@ void zoneExclusion_Check(file_adm_private* File_Adm_Private) { if (End - Attribute.c_str() != Attribute.size()) { ValuesAreNok = true; const auto& Info = (*item_Infos[item_zone].Attribute_Infos)[m]; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute value \"" + Attribute + "\" is malformed"); + BlockFormat.AddError(Error, ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute value \"" + Attribute + "\" is malformed"); } else if (Values.Values[m] < -1 || Values.Values[m] > 1) { ValuesAreNok = true; const auto& Info = (*item_Infos[item_zone].Attribute_Infos)[m]; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute value \"" + Attribute + "\" is not permitted, permitted values are [-1,1]"); + BlockFormat.AddError(Error, ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute value \"" + Attribute + "\" is not permitted, permitted values are [-1,1]"); } } } for (size_t m = 0; m < 6; m++) { if (!HasXYZ[m]) { const auto& Info = (*item_Infos[item_zone].Attribute_Infos)[m]; - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute is not present"); + BlockFormat.AddError(Error, ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ':' + Info.Name + ':' + Info.Name + " attribute is not present"); } } if (!ValuesAreNok) { auto position_Channezone_PoslAssignment = Atmos_zone_Pos(Values.Name, Values.Values); if (position_Channezone_PoslAssignment == -1) { - ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ":GeneralCompliance:zone@minX maxX minY maxY minZ maxZ attributes and element value \"" + Zone.Attributes[zone_minX] + "\" \"" + Zone.Attributes[zone_maxX] + "\" \"" + Zone.Attributes[zone_minY] + "\" \"" + Zone.Attributes[zone_maxY] + "\" \"" + Zone.Attributes[zone_minZ] + "\" \"" + Zone.Attributes[zone_maxZ] + "\" \"" + ZoneExclusion.Elements[zoneExclusion_zone][l] + "\" is not valid", Source_Atmos_1_0); + BlockFormat.AddError(Error, ":zoneExclusion" + to_string(k) + ":zone" + to_string(l) + ":GeneralCompliance:zone@minX maxX minY maxY minZ maxZ attributes and element value \"" + Zone.Attributes[zone_minX] + "\" \"" + Zone.Attributes[zone_maxX] + "\" \"" + Zone.Attributes[zone_minY] + "\" \"" + Zone.Attributes[zone_maxY] + "\" \"" + Zone.Attributes[zone_minZ] + "\" \"" + Zone.Attributes[zone_maxZ] + "\" \"" + ZoneExclusion.Elements[zoneExclusion_zone][l] + "\" is not valid", Source_Atmos_1_0); } } } } } - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = ZoneExclusion.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - ChannelFormat.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - ChannelFormat.AddError((error_Type)Error_Type, ":audioChannelFormat" + to_string(i) + ":audioBlockFormat" + to_string(j) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } - } - }; - MoveErrors(zoneExclusion_zone, item_zone); + MoveErrors(File_Adm_Private, item_zoneExclusion); } //--------------------------------------------------------------------------- @@ -3777,30 +4179,30 @@ void audioChannelFormat_Check(file_adm_private* File_Adm_Private) { auto& ChannelFormats = Items[item_audioChannelFormat].Items; auto& ChannelFormat = ChannelFormats.back(); - size_t i = ChannelFormats.size() - 1; - - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = ChannelFormat.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - ChannelFormat.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - ChannelFormat.AddError((error_Type)Error_Type, ":audioChannelFormat" + to_string(i) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); + if (!ChannelFormat.Elements[audioChannelFormat_audioBlockFormat].empty()) { + auto& BlockFormats = Items[item_audioBlockFormat].Items; + auto& BlockFormat = BlockFormats.back(); + + auto CheckTimeOffset = [&](size_t Element_Pos, TimeCode& LastBlockFormatEnd) { + if (!LastBlockFormatEnd.IsValid()) { + return; + } + const auto& frameFormats = Items[item_frameFormat].Items; + for (size_t k = 0; k < frameFormats.size(); k++) { + const auto& frameFormat = frameFormats[k]; + TimeCode frameFormat_start_TC = frameFormat.Attributes[frameFormat_start]; + TimeCode frameFormat_duration_TC = frameFormat.Attributes[frameFormat_duration]; + if (frameFormat_start_TC.IsValid() && frameFormat_duration_TC.IsValid() && frameFormat_start_TC + frameFormat_duration_TC != LastBlockFormatEnd) { + BlockFormat.AddError(Error, string(1, ':') + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + ':' + (*item_Infos[item_audioBlockFormat].Attribute_Infos)[Element_Pos].Name + " attribute value does not match the frameFormat start+duration attribute value", Source_AdvSSE_1); } } - } - }; - MoveErrors(audioChannelFormat_audioBlockFormat, item_audioBlockFormat); - MoveErrors(audioChannelFormat_frequency, item_frequency); + }; + + CheckTimeOffset(audioBlockFormat_duration, File_Adm_Private->LastBlockFormatEnd); + CheckTimeOffset(audioBlockFormat_lduration, File_Adm_Private->LastBlockFormatEnd_S); + } + + MoveErrors(File_Adm_Private, item_audioChannelFormat); } //--------------------------------------------------------------------------- @@ -3936,19 +4338,21 @@ void transportTrackFormat_Check(file_adm_private* File_Adm_Private) { const auto Tracks_Pos = Tracks.size() - Track_Items.size(); for (size_t j = 0; j < Track_Items.size(); j++) { auto& Track = Tracks[Tracks_Pos + j]; - const auto& ID = Track.Attributes[audioTrack_trackID]; - if (PreviousIDs.find(ID) != PreviousIDs.end()) { - Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name) + "ID:" + CraftName(item_Infos[item_audioTrack].Name) + "ID value \"" + ID + "\" shall be unique"); - } - else { - PreviousIDs.insert(ID); - char* End; - auto ID_Int = strtoul(ID.c_str(), &End, 10); - if (to_string(ID_Int) != ID) { - Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name) + "ID:" + CraftName(item_Infos[item_audioTrack].Name) + "ID attribute value \"" + ID + "\" is malformed"); + if (Track.Attributes_Present[audioTrack_trackID]) { + const auto& ID = Track.Attributes[audioTrack_trackID]; + if (PreviousIDs.find(ID) != PreviousIDs.end()) { + Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name, true) + "ID:" + CraftName(item_Infos[item_audioTrack].Name, true) + "ID value \"" + ID + "\" shall be unique"); } - else if (!ID_Int) { - Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name) + "ID:" + CraftName(item_Infos[item_audioTrack].Name) + "ID attribute value \"" + ID + "\" is not permitted, permitted values are [1...]"); + else { + PreviousIDs.insert(ID); + char* End; + auto ID_Int = strtoul(ID.c_str(), &End, 10); + if (to_string(ID_Int) != ID) { + Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name, true) + "ID:" + CraftName(item_Infos[item_audioTrack].Name, true) + "ID attribute value \"" + ID + "\" is malformed"); + } + else if (!ID_Int) { + Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name, true) + "ID:" + CraftName(item_Infos[item_audioTrack].Name, true) + "ID attribute value \"" + ID + "\" is not permitted, permitted values are [1...]"); + } } } const auto& audioTrackUIDRef_Items = Track.Elements[audioTrack_audioTrackUIDRef]; @@ -3963,7 +4367,7 @@ void transportTrackFormat_Check(file_adm_private* File_Adm_Private) { } else { if (PreviousaudioTrackUIDRef_Itemss.find(ID) != PreviousaudioTrackUIDRef_Itemss.end()) { - Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name) + "ID:" + CraftName(item_Infos[item_audioTrack].Name) + "ID value \"" + ID + "\" shall be unique"); + Track.AddError(Error, item_audioTrack, j, ':' + CraftName(item_Infos[item_audioTrack].Name, true) + "ID:" + CraftName(item_Infos[item_audioTrack].Name, true) + "ID value \"" + ID + "\" shall be unique"); } else { PreviousaudioTrackUIDRef_Itemss.insert(ID); @@ -3972,27 +4376,15 @@ void transportTrackFormat_Check(file_adm_private* File_Adm_Private) { } } - auto MoveErrors = [&](size_t Element_Pos, item Item_Type) { - size_t Count = TransportTrackFormat.Elements[Element_Pos].size(); - auto& Sources = Items[Item_Type].Items; - for (size_t k = Sources.size() - Count; k < Sources.size(); k++) { - auto& Item = Sources[k]; - for (size_t Error_Type = 0; Error_Type < error_Type_Max; Error_Type++) { - for (size_t Source = 0; Source < source_Max; Source++) { - for (const auto& Error : Item.Errors[Error_Type][Source]) { - if (!Error[0]) { - TransportTrackFormat.AddError((error_Type)Error_Type, Error + (char)Item_Type + (char)k, (source)Source); - } - else { - TransportTrackFormat.AddError((error_Type)Error_Type, ":transportTrackFormat" + to_string(i) + Error, (source)Source); - } - } - Item.Errors[Error_Type][Source].clear(); - } - } + if (TransportTrackFormat.Attributes_Present[transportTrackFormat_numIDs]) { + const auto& numIDs = TransportTrackFormat.Attributes[transportTrackFormat_numIDs]; + auto numIDs_Int = strtoul(numIDs.c_str(), nullptr, 10); + if (to_string(numIDs_Int) != numIDs) { + TransportTrackFormat.AddError(Error, 0x80 | transportTrackFormat_numIDs, E::Form, File_Adm_Private, numIDs); } - }; - MoveErrors(transportTrackFormat_audioTrack, item_audioTrack); + } + + MoveErrors(File_Adm_Private, item_transportTrackFormat); } //--------------------------------------------------------------------------- @@ -4372,6 +4764,7 @@ int file_adm_private::audioFormatExtended() auto& coefficients = Items[item_coefficient].Items; coefficients.clear(); + MoveErrors(this, item_audioChannelFormat); ChannelFormat_BlockFormats.pop_back(); BlockFormats.pop_back(); if (ChannelFormat_BlockFormat_ReduceCount.size() < ChannelFormats.size()) { @@ -4418,9 +4811,9 @@ int file_adm_private::audioFormatExtended() ELEMENT_e(audioProgrammeLabel, audioProgramme, audioProgrammeLabel_Check(this)) ELEMENT__(audioProgramme, audioContentIDRef) ELEMENT_s(audioProgramme, loudnessMetadata, loudnessMetadata_Source.push_back('P')) - ATTRIBU_I(loudnessMetadata, loudnessMethod) - ATTRIBU_I(loudnessMetadata, loudnessRecType) - ATTRIBU_I(loudnessMetadata, loudnessCorrectionType) + ATTRIBUTE(loudnessMetadata, loudnessMethod) + ATTRIBUTE(loudnessMetadata, loudnessRecType) + ATTRIBUTE(loudnessMetadata, loudnessCorrectionType) ELEMENT_M(loudnessMetadata) ELEMENT__(loudnessMetadata, integratedLoudness) ELEMENT_I(loudnessMetadata, loudnessRange) @@ -4429,10 +4822,10 @@ int file_adm_private::audioFormatExtended() ELEMENT_I(loudnessMetadata, maxShortTerm) ELEMENT_I(loudnessMetadata, dialogueLoudness) ELEMENT_S(loudnessMetadata, renderer) - ATTRIBU_I(renderer, uri) - ATTRIBU_I(renderer, name) - ATTRIBU_I(renderer, version) - ATTRIBU_I(renderer, coordinateMode) + ATTRIBUTE(renderer, uri) + ATTRIBUTE(renderer, name) + ATTRIBUTE(renderer, version) + ATTRIBUTE(renderer, coordinateMode) ELEMENT_M(renderer) ELEMENT_I(renderer, audioPackFormatIDRef) ELEMENT_I(renderer, audioObjectIDRef) @@ -4465,10 +4858,10 @@ int file_adm_private::audioFormatExtended() ELEMENT__(referenceLayout, audioPackFormatIDRef) ELEMENT_E(referenceLayout, authoringInformation) ELEMENT_S(authoringInformation, renderer) - ATTRIBU_I(renderer, uri) - ATTRIBU_I(renderer, name) - ATTRIBU_I(renderer, version) - ATTRIBU_I(renderer, coordinateMode) + ATTRIBUTE(renderer, uri) + ATTRIBUTE(renderer, name) + ATTRIBUTE(renderer, version) + ATTRIBUTE(renderer, coordinateMode) ELEMENT_M(renderer) ELEMENT_I(renderer, audioPackFormatIDRef) ELEMENT_I(renderer, audioObjectIDRef) @@ -4488,9 +4881,9 @@ int file_adm_private::audioFormatExtended() ELEMENT_M(audioContentLabel) ELEMENT_e(audioContentLabel, audioContent, audioContentLabel_Check(this)) ELEMENT_s(audioContent, loudnessMetadata, loudnessMetadata_Source.push_back('C')) - ATTRIBU_I(loudnessMetadata, loudnessMethod) - ATTRIBU_I(loudnessMetadata, loudnessRecType) - ATTRIBU_I(loudnessMetadata, loudnessCorrectionType) + ATTRIBUTE(loudnessMetadata, loudnessMethod) + ATTRIBUTE(loudnessMetadata, loudnessRecType) + ATTRIBUTE(loudnessMetadata, loudnessCorrectionType) ELEMENT_M(loudnessMetadata) ELEMENT__(loudnessMetadata, integratedLoudness) ELEMENT_I(loudnessMetadata, loudnessRange) @@ -4499,10 +4892,10 @@ int file_adm_private::audioFormatExtended() ELEMENT_I(loudnessMetadata, maxShortTerm) ELEMENT_I(loudnessMetadata, dialogueLoudness) ELEMENT_S(loudnessMetadata, renderer) - ATTRIBU_I(renderer, uri) - ATTRIBU_I(renderer, name) - ATTRIBU_I(renderer, version) - ATTRIBU_I(renderer, coordinateMode) + ATTRIBUTE(renderer, uri) + ATTRIBUTE(renderer, name) + ATTRIBUTE(renderer, version) + ATTRIBUTE(renderer, coordinateMode) ELEMENT_M(renderer) ELEMENT_I(renderer, audioPackFormatIDRef) ELEMENT_I(renderer, audioObjectIDRef) @@ -4541,28 +4934,28 @@ int file_adm_private::audioFormatExtended() ELEMENT__(audioObject, audioComplementaryObjectIDRef) ELEMENT__(audioObject, audioTrackUIDRef) ELEMENT_S(audioObject, audioObjectInteraction) - ATTRIBU_I(audioObjectInteraction, onOffInteract) - ATTRIBU_I(audioObjectInteraction, gainInteract) - ATTRIBU_I(audioObjectInteraction, positionInteract) + ATTRIBUTE(audioObjectInteraction, onOffInteract) + ATTRIBUTE(audioObjectInteraction, gainInteract) + ATTRIBUTE(audioObjectInteraction, positionInteract) ELEMENT_M(audioObjectInteraction) ELEMENT_S(audioObjectInteraction, gainInteractionRange) - ATTRIBU_I(gainInteractionRange, gainUnit) - ATTRIBU_I(gainInteractionRange, bound) + ATTRIBUTE(gainInteractionRange, gainUnit) + ATTRIBUTE(gainInteractionRange, bound) ELEMENT_M(gainInteractionRange) ELEMENT_E(gainInteractionRange, audioObjectInteraction) ELEMENT_S(audioObjectInteraction, positionInteractionRange) - ATTRIBU_I(positionInteractionRange, coordinate) - ATTRIBU_I(positionInteractionRange, bound) + ATTRIBUTE(positionInteractionRange, coordinate) + ATTRIBUTE(positionInteractionRange, bound) ELEMENT_M(positionInteractionRange) ELEMENT_E(positionInteractionRange, audioObjectInteraction) ELEMENT_E(audioObjectInteraction, audioObject) ELEMENT_S(audioObject, gain) - ATTRIBU_I(gain, gainUnit) + ATTRIBUTE(gain, gainUnit) ELEMENT_M(gain) ELEMENT_E(gain, audioObject) ELEMENT__(audioObject, headLocked) ELEMENT_S(audioObject, positionOffset) - ATTRIBU_I(positionOffset, coordinate) + ATTRIBUTE(positionOffset, coordinate) ELEMENT_M(positionOffset) ELEMENT_E(positionOffset, audioObject) ELEMENT__(audioObject, mute) @@ -4606,14 +4999,18 @@ int file_adm_private::audioFormatExtended() ATTRIBUTE(audioBlockFormat, initializeBlock) ELEMENT_M(audioBlockFormat) ELEMENT_S(audioBlockFormat, gain) - ATTRIBU_I(gain, gainUnit) + ATTRIBUTE(gain, gainUnit) ELEMENT_M(gain) ELEMENT_e(gain, audioBlockFormat, gain_Check(this)) ELEMENT__(audioBlockFormat, importance) ELEMENT__(audioBlockFormat, headLocked) + ELEMENT_S(audioBlockFormat, jumpPosition) + ATTRIBUTE(jumpPosition, interpolationLength) + ELEMENT_M(jumpPosition) + ELEMENT_E(jumpPosition, audioBlockFormat) ELEMENT_S(audioBlockFormat, headphoneVirtualise) - ATTRIBU_I(headphoneVirtualise, bypass) - ATTRIBU_I(headphoneVirtualise, DRR) + ATTRIBUTE(headphoneVirtualise, bypass) + ATTRIBUTE(headphoneVirtualise, DRR) ELEMENT_M(headphoneVirtualise) ELEMENT_E(headphoneVirtualise, audioBlockFormat) ELEMENT__(audioBlockFormat, speakerLabel) @@ -4624,10 +5021,6 @@ int file_adm_private::audioFormatExtended() ELEMENT_M(position) ELEMENT_E(position, audioBlockFormat) ELEMENT__(audioBlockFormat, outputChannelFormatIDRef) - ELEMENT_S(audioBlockFormat, jumpPosition) - ATTRIBUTE(jumpPosition, interpolationLength) - ELEMENT_M(jumpPosition) - ELEMENT_E(jumpPosition, audioBlockFormat) ELEMENT_S(audioBlockFormat, matrix) ELEMENT_M(matrix) ELEMENT_S(matrix, coefficient) @@ -4639,9 +5032,8 @@ int file_adm_private::audioFormatExtended() ATTRIBUTE(coefficient, delay) ATTRIBUTE(coefficient, delayVar) ELEMENT_M(coefficient) - ELEMENT_E(coefficient, matrix) - ELEMENT_E(matrix, audioBlockFormat) - ELEMENT__(audioBlockFormat, coefficient) + ELEMENT_e(coefficient, matrix, coefficient_Check(this)) + ELEMENT_e(matrix, audioBlockFormat, matrix_Check(this)) ELEMENT__(audioBlockFormat, width) ELEMENT__(audioBlockFormat, height) ELEMENT__(audioBlockFormat, depth) @@ -4655,7 +5047,7 @@ int file_adm_private::audioFormatExtended() ATTRIBUTE(objectDivergence, azimuthRange) ATTRIBUTE(objectDivergence, positionRange) ELEMENT_M(objectDivergence) - ELEMENT_E(objectDivergence, audioBlockFormat) + ELEMENT_e(objectDivergence, audioBlockFormat, objectDivergence_Check(this)) ELEMENT_S(audioBlockFormat, zoneExclusion) ELEMENT_M(zoneExclusion) ELEMENT_S(zoneExclusion, zone) @@ -4887,8 +5279,8 @@ static void FillErrors(file_adm_private* File_Adm_Private, const item item_Type, switch ((E)ErrorType) { case E::Form: case E::Permitted: - if (Opt0 < File_Adm_Private->Errors_Tips.size()) { - Value.insert(Pos, File_Adm_Private->Errors_Tips[Opt0]); + if (Opt0 < File_Adm_Private->Errors_Tips[k][l].size()) { + Value.insert(Pos, File_Adm_Private->Errors_Tips[k][l][Opt0]); } break; default: @@ -5019,7 +5411,7 @@ void File_Adm::Streams_Fill() } \ #define LINK(NAME,FIELD,VECTOR,TARGET) \ - Apply_SubStreams(*this, P + " LinkedTo_" FIELD "_Pos", File_Adm_Private->Items[item_##NAME].Items[i], NAME##_##VECTOR, File_Adm_Private->Items[item_##TARGET], File_Adm_Private->Items[item_audioFormatExtended].Items.empty()); \ + Apply_SubStreams(*this, P + " LinkedTo_" FIELD "_Pos", File_Adm_Private->Items[item_##NAME].Items[i], NAME##_##VECTOR, File_Adm_Private->Items[item_##TARGET], File_Adm_Private->IsPartial || File_Adm_Private->Items[item_audioFormatExtended].Items.empty()); \ //Filling Stream_Prepare(Stream_Audio); @@ -5073,6 +5465,9 @@ void File_Adm::Streams_Fill() IsAdvSSE = true; IsAdvSSE_Versions.push_back(strtoul(Profile_Item.Attributes[profile_profileVersion].c_str(), nullptr, 10)); IsAdvSSE_Levels.push_back(strtoul(Profile_Item.Attributes[profile_profileLevel].c_str(), nullptr, 10)); + if (IsAdvSSE_Levels.back() > 2 && (Profile == "ITU-R BS.[ADM-NGA-EMISSION]-0" || Profile == "ITU-R BS.[ADM-NGA-EMISSION]-0")) { + Profiles.back().AddError(Error, ':' + CraftName(item_Infos[item_profile].Name) + to_string(i) + ":profileLevel:profileLevel attribute value " + Profile_Item.Attributes[profile_profileLevel] + " is not permitted, max is 2", Source_AdvSSE_1); + } } else { ProfileInfo.Strings[0] = Profile_Item.Attributes[profile_profileName]; @@ -5508,8 +5903,12 @@ void File_Adm::Streams_Fill() auto& ZoneExclusions = File_Adm_Private->Items[item_zoneExclusion].Items; auto& Zones = File_Adm_Private->Items[item_zone].Items; auto& TransportTrackFormats = File_Adm_Private->Items[item_transportTrackFormat].Items; + auto& frameHeaders = File_Adm_Private->Items[item_frameHeader].Items; CheckErrors_Elements(File_Adm_Private, item_root); + if (File_Adm_Private->Version_S != (uint8_t)-1 && frameHeaders.empty()) { + Root[0].AddError(Error, root_frameHeader, E::Present0, 0); + } set TopLevelObjects; set TopLevel_alternativeValueSetIDRefs; @@ -5553,8 +5952,8 @@ void File_Adm::Streams_Fill() if (Level) { static const int8u MaxCounts[][MaxCount_Size] = { - {0, 0, 8, 16, 48, 32, 32, 32, 0, 0 }, - {0, 0, 16, 28, 84, 56, 56, 56, 0, 0 }, + { 0, 0, 8, 16, 48, 32, 32, 32, 0, 0 }, + { 0, 0, 16, 28, 84, 56, 56, 56, 0, 0 }, }; Level--; if (Level < sizeof(MaxCounts) / sizeof(MaxCounts[0]) && item_Type < sizeof(MaxCounts[0]) / sizeof(MaxCounts[0][0]) && MaxCounts[Level][item_Type] && Items.size() > MaxCounts[Level][item_Type]) { @@ -5575,10 +5974,10 @@ void File_Adm::Streams_Fill() if (item_Infos[item_Type].ID_Pos != (int8u)-1) { const auto& ID = Item.Attributes[item_Infos[item_Type].ID_Pos]; if (PreviousIDs.find(ID) != PreviousIDs.end()) { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID value \"" + ID + "\" shall be unique"); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID value \"" + ID + "\" shall be unique"); } else if (PreviousIDs_Forbidden.find(ID) != PreviousIDs_Forbidden.end()) { - Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name) + "ID:" + CraftName(item_Infos[item_Type].Name) + "ID value \"" + ID + "\" is not permitted due to the ID of the DirectSpeakers typed object", Source_Atmos_1_0); + Item.AddError(Error, item_Type, i, ':' + CraftName(item_Infos[item_Type].Name, true) + "ID:" + CraftName(item_Infos[item_Type].Name, true) + "ID value \"" + ID + "\" is not permitted due to the ID of the DirectSpeakers typed object", Source_Atmos_1_0); } else { PreviousIDs.insert(ID); @@ -5650,8 +6049,8 @@ void File_Adm::Streams_Fill() if (Level) { static const int8u MaxCounts[][MaxCount_Size] = { - { 16, 4, 0, 0, 0, 16 }, - { 28, 8, 0, 0, 0, 28 }, + { 4, 16, 0, 0, 0, 16 }, + { 8, 28, 0, 0, 0, 28 }, }; Level--; if (Level < sizeof(MaxCounts) / sizeof(MaxCounts[0])) { @@ -5699,13 +6098,13 @@ void File_Adm::Streams_Fill() } dialogue_Pos++; } - static const size_t MaxCount_Size = 2; + static const size_t MaxCount_Size = audioContent_audioContentLabel + 1; for (auto Level : IsAdvSSE_Levels) { if (Level) { static const int8u MaxCounts[][MaxCount_Size] = { - { 0, 4 }, - { 0, 8 }, + { 4 }, + { 8 }, }; Level--; if (Level < sizeof(MaxCounts) / sizeof(MaxCounts[0])) { @@ -5715,8 +6114,8 @@ void File_Adm::Streams_Fill() if (!((int8u)(MaxCount + 1))) { } if (Content.Elements[j].size() > MaxCount) { - const auto ElementName = (*item_Infos[item_audioProgramme].Element_Infos)[j].Name; - Content.AddError(Error, ":audioProgramme" + to_string(i) + ':' + ElementName + ':' + ElementName + " element count " + to_string(Content.Elements[j].size()) + " is not permitted, max is " + to_string(MaxCount), Source_AdvSSE_1); + const auto ElementName = (*item_Infos[item_audioContent].Element_Infos)[j].Name; + Content.AddError(Error, ":audioContent" + to_string(i) + ':' + ElementName + ':' + ElementName + " element count " + to_string(Content.Elements[j].size()) + " is not permitted, max is " + to_string(MaxCount), Source_AdvSSE_1); } } } @@ -5761,8 +6160,8 @@ void File_Adm::Streams_Fill() if (Level) { static const int8u MaxCounts[][MaxCount_Size] = { - { 0, 16, (int8u)-1, 4, 15, 0, 0, 0, 0, 0, 0, 8 }, - { 0, 28, (int8u)-1, 8, 27, 0, 0, 0, 0, 0, 0, 16 }, + { 0, 16, 12, 4, 15, 0, 0, 0, 0, 0, 0, 8 }, + { 0, 28, 24, 8, 27, 0, 0, 0, 0, 0, 0, 16 }, }; Level--; if (Level < sizeof(MaxCounts) / sizeof(MaxCounts[0])) { @@ -5772,8 +6171,8 @@ void File_Adm::Streams_Fill() if (!((int8u)(MaxCount + 1))) { } if (Object.Elements[j].size() > MaxCount) { - const auto ElementName = (*item_Infos[item_audioProgramme].Element_Infos)[j].Name; - Object.AddError(Error, ":audioProgramme" + to_string(i) + ':' + ElementName + ':' + ElementName + " element count " + to_string(Object.Elements[j].size()) + " is not permitted, max is " + to_string(MaxCount), Source_AdvSSE_1); + const auto ElementName = (*item_Infos[item_audioObject].Element_Infos)[j].Name; + Object.AddError(Error, ":audioObject" + to_string(i) + ':' + ElementName + ':' + ElementName + " element count " + to_string(Object.Elements[j].size()) + " is not permitted, max is " + to_string(MaxCount), Source_AdvSSE_1); } } } @@ -5844,8 +6243,8 @@ void File_Adm::Streams_Fill() for (size_t i = 0; i < PackFormats.size(); i++) { auto& PackFormat = PackFormats[i]; auto Type = GetType(File_Adm_Private, item_audioPackFormat, i); + const auto& ChannelFormatIDRefs = PackFormat.Elements[audioPackFormat_audioChannelFormatIDRef]; if (IsAtmos) { - const auto& ChannelFormatIDRefs = PackFormat.Elements[audioPackFormat_audioChannelFormatIDRef]; if (!ChannelFormatIDRefs.empty()) { auto ChannelFormatIDRefs_Size = ChannelFormatIDRefs.size(); if ((Type == Type_DirectSpeakers && ChannelFormatIDRefs_Size > 10) || (Type == Type_Objects && ChannelFormatIDRefs_Size > 1)) { @@ -5877,6 +6276,84 @@ void File_Adm::Streams_Fill() } } } + if (Type == Type_Matrix) { + for (const auto& inputPackFormatIDRef : PackFormat.Elements[audioPackFormat_inputPackFormatIDRef]) { + set audioChannelFormatIDRefs; + for (const auto& TrackUID : TrackUIDs) { + for (const auto& audioPackFormatIDRef : TrackUID.Elements[audioTrackUID_audioPackFormatIDRef]) { + if (audioPackFormatIDRef != inputPackFormatIDRef) { + continue; + } + for (const auto& audioChannelFormatIDRef : TrackUID.Elements[audioTrackUID_audioChannelFormatIDRef]) { + audioChannelFormatIDRefs.insert(audioChannelFormatIDRef); + } + } + } + for (const auto& audioChannelFormatIDRef : PackFormat.Elements[audioPackFormat_audioChannelFormatIDRef]) { + for (size_t j = 0; j < ChannelFormats.size(); j++) { + auto& ChannelFormat = ChannelFormats[j]; + if (ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID] != audioChannelFormatIDRef || j >= File_Adm_Private->ChannelFormat_Matrix_coefficients.size()) { + continue; + } + const auto& coefficients_List = File_Adm_Private->ChannelFormat_Matrix_coefficients[j]; + for (size_t k = 0; k < coefficients_List.size(); k++) { + const auto& coefficients = coefficients_List[k]; + for (size_t l = 0; l < coefficients.List.size(); l++) { + const auto& coefficient = coefficients.List[l]; + if (audioChannelFormatIDRefs.find(coefficient) == audioChannelFormatIDRefs.end()) { + ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(j) + ":audioBlockFormat" + to_string(coefficients.BlockPos) + ":matrix" + to_string(0) + ":coefficient" + to_string(l) + ":coefficient value \"" + coefficient + "\" is not in corresponding inputPackFormatIDRef \"" + inputPackFormatIDRef + '\"', Source_AdvSSE_1); + } + } + } + } + } + } + for (const auto& outputPackFormatIDRef : PackFormat.Elements[audioPackFormat_outputPackFormatIDRef]) { + set audioChannelFormatIDRefs; + for (const auto& TrackUID : TrackUIDs) { + for (const auto& audioPackFormatIDRef : TrackUID.Elements[audioTrackUID_audioPackFormatIDRef]) { + if (audioPackFormatIDRef != outputPackFormatIDRef) { + continue; + } + for (const auto& audioChannelFormatIDRef : TrackUID.Elements[audioTrackUID_audioChannelFormatIDRef]) { + audioChannelFormatIDRefs.insert(audioChannelFormatIDRef); + } + } + } + bool CommonDefIsInvalid = false; + if (audioChannelFormatIDRefs.empty() && !CheckErrors_ID(File_Adm_Private, outputPackFormatIDRef, item_Infos[item_audioPackFormat]) && outputPackFormatIDRef.rfind("AP_00010", 0) == 0) { + auto Value = strtoul(outputPackFormatIDRef.c_str() + 8, nullptr, 16); + audioChannelFormatIDRefs = audioPackFormatID_2_audioChannelFormatIDRef(Value); + if (audioChannelFormatIDRefs.empty()) { + CommonDefIsInvalid = true; + } + } + for (const auto& audioChannelFormatIDRef : PackFormat.Elements[audioPackFormat_audioChannelFormatIDRef]) { + for (size_t j = 0; j < ChannelFormats.size(); j++) { + auto& ChannelFormat = ChannelFormats[j]; + if (ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID] != audioChannelFormatIDRef || j >= File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs.size()) { + continue; + } + const auto& outputChannelFormatIDRef_List = File_Adm_Private->ChannelFormat_Matrix_outputChannelFormatIDRefs[j]; + for (size_t k = 0; k < outputChannelFormatIDRef_List.size(); k++) { + const auto& outputChannelFormatIDRefs = outputChannelFormatIDRef_List[k]; + for (size_t l = 0; l < outputChannelFormatIDRefs.List.size(); l++) { + const auto& outputChannelFormatIDRef = outputChannelFormatIDRefs.List[l]; + if (audioChannelFormatIDRefs.find(outputChannelFormatIDRef) == audioChannelFormatIDRefs.end()) { + if (CommonDefIsInvalid) { + ChannelFormat.AddError(Information, ":audioChannelFormat" + to_string(j) + ":audioBlockFormat" + to_string(outputChannelFormatIDRefs.BlockPos) + ":outputChannelFormatIDRef" + to_string(0) + ":outputChannelFormatIDRef value \"" + outputPackFormatIDRef.substr(7) + "\" is not allocated in ITU-R BS.2094-1"); + break; + } + else { + ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(j) + ":audioBlockFormat" + to_string(outputChannelFormatIDRefs.BlockPos) + ":matrix" + to_string(0) + ":outputChannelFormatIDRef" + to_string(l) + ":Value \"" + outputChannelFormatIDRef + "\" is not in corresponding outputPackFormatIDRef \"" + outputPackFormatIDRef + '\"', Source_AdvSSE_1); + } + } + } + } + } + } + } + } if (Type == Type_Objects) { PackFormat_Objects_Count++; } @@ -5908,7 +6385,7 @@ void File_Adm::Streams_Fill() if (Value >= 0x800) { Value -= 0x800; } - static int8u List[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x0A, 0x0C, 0x0F, 0x17, 0x1A, 0x1B, 0x1C, 0x1E, 0x1F }; + static int8u List[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x09, 0x0A, 0x0C, 0x0F, 0x10, 0x17, 0x1B, 0x1C, 0x1E, 0x1F }; IsNotValid = true; for (auto List_Item : List) { if (List_Item == Value) { @@ -6004,6 +6481,22 @@ void File_Adm::Streams_Fill() break; } } + + const auto& ID = ChannelFormat.Attributes[audioChannelFormat_audioChannelFormatID]; + size_t Found = 0; + for (size_t i = 0; i < PackFormats.size(); i++) { + const auto& PackFormat = PackFormats[i]; + const auto& audioChannelFormatIDRefs = PackFormat.Elements[audioPackFormat_audioChannelFormatIDRef]; + for (size_t j = 0; j < audioChannelFormatIDRefs.size(); j++) { + const auto& audioChannelFormatIDRef = audioChannelFormatIDRefs[j]; + if (audioChannelFormatIDRef == ID) { + Found++; + } + } + } + if (Found != 1) { + ChannelFormat.AddError(Error, ":audioChannelFormat" + to_string(i) + ":GeneralCompliance:this audioChannelFormat is referenced by " + to_string(Found) + " audioPackFormat", Source_AdvSSE_1); + } } if (IsAtmos) { @@ -6093,6 +6586,13 @@ void File_Adm::Streams_Fill() default: TrackUID.AddError(Error, ":audioTrackUID" + to_string(i) + ":audioChannelFormatIDRef:audioChannelFormatIDRef attribute xxxx value \"" + audioChannelFormatIDRef_xxxx + "\" is not permitted, permitted values are \"0001\" or \"0003\"", Source_AdvSSE_1); } + if (audioChannelFormatIDRef[7] == '0') { + auto audioChannelFormatIDRef_yyyy = audioChannelFormatIDRef.substr(7, 4); + Value = strtoul(audioChannelFormatIDRef_yyyy.c_str(), nullptr, 16); + if (Value > 0x0028) { + TrackUID.AddError(Information, ":audioTrackUID" + to_string(i) + ":audioChannelFormatIDRef:audioChannelFormatIDRef attribute yyyy value \"" + audioChannelFormatIDRef_yyyy + "\" is not allocated in ITU-R BS.2094-1"); + } + } } } const auto& audioPackFormatIDRefs = TrackUID.Elements[audioTrackUID_audioPackFormatIDRef]; @@ -6136,7 +6636,6 @@ void File_Adm::Streams_Fill() const auto& numIDs = TransportTrackFormat.Attributes[transportTrackFormat_numIDs]; auto numIDs_Int = strtoul(numIDs.c_str(), nullptr, 10); if (to_string(numIDs_Int) != numIDs) { - TransportTrackFormat.AddError(Error, 0x80 | transportTrackFormat_numIDs, E::Form, File_Adm_Private, numIDs); } else if (numIDs_Int < TrackUIDs.size()) { TransportTrackFormat.AddError(Error, ":transportTrackFormat" + to_string(i) + ":numIDs:numIDs attribute value " + numIDs + " is less than audioTrackUID element count " + to_string(TrackUIDs.size()), Source_AdvSSE_1); @@ -6144,31 +6643,9 @@ void File_Adm::Streams_Fill() } } - /* - // Errors - audioTrack - for (size_t i = 0; i < Tracks.size(); i++) { - auto& Track = Tracks[i]; - - if (Track.Attributes_Present[audioTrack_trackID]) { - const auto& trackID = Track.Attributes[audioTrack_trackID]; - if (trackID != "ATU_00000000") { - for (size_t j = 0; j < TrackUIDs.size(); j++) { - bool Found = false; - if (TrackUIDs[j].Attributes[audioTrackUID_UID] == trackID) { - Found = true; - } - if (!Found) { - Track.AddError(Error, ":audioTrack" + to_string(i) + ":trackID:trackID attribute value " + trackID + " is ); - } - } - } - } - } - */ - // Errors - Fill for (size_t t = 0; t < item_Max; t++) { - size_t Error_Count_Per_Type[2] = {}; + size_t Error_Count_Per_Type[error_Type_Max] = {}; for (size_t i = 0; i < File_Adm_Private->Items[t].Items.size(); i++) { FillErrors(File_Adm_Private, (item)t, i, item_Infos[t].Name, &Errors_Field[0], &Errors_Value[0], WarningError, &Error_Count_Per_Type[0], IsAdvSSE); } @@ -6242,6 +6719,28 @@ void File_Adm::Read_Buffer_Init() //--------------------------------------------------------------------------- void File_Adm::Read_Buffer_Continue() { + if (NeedToJumpToEnd) { + // There was a jump, trying to resynch + NeedToJumpToEnd = false; + static const char* ToSearch = ""; + const char* Nok = (const char*)Buffer - 1; + const char* LastPos = Nok; + while (auto NextPos = strstr(LastPos + 1, ToSearch)) { + LastPos = NextPos; + } + if (LastPos == Nok || File_Adm_Private->Resynch("audioFormatExtended")) { + Buffer_Offset = Buffer_Size; + ForceFinish(); + return; + } + size_t Offset = (const int8u*)LastPos - Buffer + 21; // + length of ToSearch + Buffer += Offset; + Buffer_Size -= Offset; + Read_Buffer_Continue(); + Buffer_Size += Offset; + Buffer -= Offset; + } + auto Result = File_Adm_Private->parse((void*)Buffer, Buffer_Size); if (!Status[IsAccepted]) { for (const auto& Items : File_Adm_Private->Items) { @@ -6252,20 +6751,27 @@ void File_Adm::Read_Buffer_Continue() } } Buffer_Offset = Buffer_Size - File_Adm_Private->Remain(); - if (TotalSize > 512 * 1024 * 1024 && !File_Adm_Private->ChannelFormat_BlockFormat_ReduceCount.empty()) { - // Too big, we stop parsing here - File_Adm_Private->IsPartial = true; - NeedToJumpToEnd = true; - } - else if (Result && File_Adm_Private->File_Buffer_Size_Hint_Pointer) { - auto File_Offset_Now = File_Offset + Buffer_Size; - auto Size = File_Size - File_Offset_Now; - if (Size > 16 * 1024 * 1024) { - Size = 16 * 1024 * 1024; - } - *File_Adm_Private->File_Buffer_Size_Hint_Pointer = Size; + if (Buffer_Offset < Buffer_Size) { Element_WaitForMoreData(); } + if (Status[IsAccepted]) { + if (!File_Adm_Private->ChannelFormat_BlockFormat_ReduceCount.empty() && !File_Adm_Private->IsPartial && TotalSize > 512 * 1024 * 1024) { + // Too big, we stop parsing here + File_Adm_Private->IsPartial = true; + NeedToJumpToEnd = true; + } + if (Result && TotalSize > 16 * 1024 * 1024 && File_Adm_Private->File_Buffer_Size_Hint_Pointer) { + auto File_Offset_Now = File_Offset + Buffer_Size; + auto Size = File_Size - File_Offset_Now; + if (Size > 16 * 1024 * 1024) { + Size = 16 * 1024 * 1024; + } + if (Size >= 64 * 1024) { + *File_Adm_Private->File_Buffer_Size_Hint_Pointer = Size; + } + Element_WaitForMoreData(); + } + } } //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyAudioMetadata.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyAudioMetadata.cpp index cc661b9e62..6e7c95a228 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyAudioMetadata.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyAudioMetadata.cpp @@ -530,6 +530,8 @@ void File_DolbyAudioMetadata::Merge(File__Analyze& In, size_t StreamPos) { string Name=TrackUID_String+Pos.To_UTF8(); auto PosI=(size_t)Pos.To_int64u(); + if (In.Retrieve_Const(Stream_Audio, 0, Name.c_str()).empty()) + In.Fill(Stream_Audio, 0, Name.c_str(), "Yes"); Name+=BinauralRenderMode_String; In.Fill(Stream_Audio, 0, Name.c_str(), BinauralRenderMode); } @@ -543,6 +545,8 @@ void File_DolbyAudioMetadata::Merge(File__Analyze& In, size_t StreamPos) ZtringList LinkedToList; LinkedToList.Separator_Set(0, " + "); LinkedToList.Write(LinkedTos); + if (In.Retrieve_Const(Stream_Audio, 0, Name.c_str()).empty()) + In.Fill(Stream_Audio, 0, Name.c_str(), "Yes"); Name+=BinauralRenderMode_String; ZtringList BinauralRenderModes; set BinauralRenderMode_Diffs; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp index 49e3d20f56..7ce8c9d9b6 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DolbyE.cpp @@ -58,6 +58,11 @@ extern const char* AC3_ChannelPositions[]; extern const char* AC3_ChannelPositions2[]; extern const char* AC3_ChannelLayout_lfeoff[]; extern const char* AC3_ChannelLayout_lfeon[]; +extern const char* AC3_roomtyp[]; +extern const char* AC3_dmixmod[]; +extern string AC3_Level_Value(int8u Index, float Start, float Multiplier); +extern void AC3_Level_Fill(File__Analyze* A, size_t StreamPos, int8u Index, float Start, float Multiplier, const char* Name); +extern string AC3_dynrngprof_Get(int8u Value); //*************************************************************************** // Utils @@ -970,7 +975,7 @@ File_DolbyE::File_DolbyE() //Configuration MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; //In GuardBand_Before=0; @@ -1014,7 +1019,7 @@ void File_DolbyE::Streams_Fill() Stream_Prepare(Stream_Audio); Fill(Stream_Audio, program, Audio_Format, "Dolby E"); if (DolbyE_Programs[program_config]>1) - Fill(Stream_Audio, program, Audio_ID, Count_Get(Stream_Audio)); + Fill(Stream_Audio, program, Audio_ID, program+1); Fill(Stream_Audio, program, Audio_Channel_s_, DolbyE_Channels_PerProgram(program_config, program)); Fill(Stream_Audio, program, Audio_ChannelPositions, DolbyE_ChannelPositions_PerProgram(program_config, program)); Fill(Stream_Audio, program, Audio_ChannelPositions_String2, DolbyE_ChannelPositions2_PerProgram(program_config, program)); @@ -1048,12 +1053,12 @@ void File_DolbyE::Streams_Fill_PerProgram(size_t program) if (SMPTE_time_code_StartTimecode!=(int64u)-1) { - Fill(StreamKind_Last, program, Audio_Delay, SMPTE_time_code_StartTimecode); - Fill(StreamKind_Last, program, Audio_Delay_Source, "Stream"); + Fill(Stream_Audio, program, Audio_Delay, SMPTE_time_code_StartTimecode); + Fill(Stream_Audio, program, Audio_Delay_Source, "Stream"); } Fill(Stream_Audio, program, Audio_FrameRate, Mpegv_frame_rate[frame_rate_code]); - if (FrameInfo.PTS!=(int64u)-1 && bit_depth) + if (bit_depth) { float BitRate=(float)(96000*bit_depth); @@ -1063,13 +1068,13 @@ void File_DolbyE::Streams_Fill_PerProgram(size_t program) Fill(Stream_Audio, program, "GuardBand_Before", GuardBand_Before_Initial_Duration, 9); Fill(Stream_Audio, program, "GuardBand_Before/String", Ztring::ToZtring(GuardBand_Before_Initial_Duration*1000000, 0)+Ztring().From_UTF8(" \xC2xB5s")); //0xC2 0xB5 = micro sign Fill_SetOptions(Stream_Audio, program, "GuardBand_Before", "N NT"); - Fill_SetOptions(Stream_Audio, program, "GuardBand_Before/String", "N NT"); + Fill_SetOptions(Stream_Audio, program, "GuardBand_Before/String", "Y NT"); float GuardBand_After_Initial_Duration=GuardBand_After_Initial*8/BitRate; Fill(Stream_Audio, program, "GuardBand_After", GuardBand_After_Initial_Duration, 9); Fill(Stream_Audio, program, "GuardBand_After/String", Ztring::ToZtring(GuardBand_After_Initial_Duration*1000000, 0)+Ztring().From_UTF8(" \xC2xB5s")); //0xC2 0xB5 = micro sign Fill_SetOptions(Stream_Audio, program, "GuardBand_After", "N NT"); - Fill_SetOptions(Stream_Audio, program, "GuardBand_After/String", "N NT"); + Fill_SetOptions(Stream_Audio, program, "GuardBand_After/String", "Y NT"); } } @@ -1088,7 +1093,14 @@ void File_DolbyE::Streams_Fill_PerProgram(size_t program) //--------------------------------------------------------------------------- void File_DolbyE::Streams_Fill_ED2() { - Stream_Prepare(Stream_Audio); + if (Count_Get(Stream_Audio)) + { + while (Count_Get(Stream_Audio)>1) + Stream_Erase(Stream_Audio, Count_Get(Stream_Audio)-1); // We may have several streams due to metadata, we keep one + StreamPos_Last=0; + } + else + Stream_Prepare(Stream_Audio); Fill(Stream_Audio, StreamPos_Last, Audio_Format, "Dolby ED2"); if (Guardband_EMDF_PresentAndSize) Fill(Stream_Audio, StreamPos_Last, Audio_BitRate, Guardband_EMDF_PresentAndSize*8*Mpegv_frame_rate[frame_rate_code], 0); @@ -3469,6 +3481,7 @@ enum ac3 { ac3_roomtyp, ac3_copyrightb, ac3_origbs, + ac3_xbsi1e, ac3_dmixmod, ac3_ltrtcmixlev, ac3_ltrtsurmixlev, @@ -3501,33 +3514,33 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) { int8u meta[ac3_max]; Element_Begin1("per program"); - Get_S1 (5, meta[ac3_datarate], "ac3_datarate"); - Get_S1 (3, meta[ac3_bsmod], "ac3_bsmod"); - Get_S1 (3, meta[ac3_acmod], "ac3_acmod"); - Get_S1 (2, meta[ac3_cmixlev], "ac3_cmixlev"); - Get_S1 (2, meta[ac3_surmixlev], "ac3_surmixlev"); - Get_S1 (2, meta[ac3_dsurmod], "ac3_dsurmod"); - Get_S1 (1, meta[ac3_lfeon], "ac3_lfeon"); - Get_S1 (5, meta[ac3_dialnorm], "ac3_dialnorm"); + Get_S1 (5, meta[ac3_datarate], "ac3_datarate"); Param_Info2C(meta[ac3_datarate]<19, AC3_BitRate[meta[ac3_datarate]], " kbps"); + Get_S1 (3, meta[ac3_bsmod], "ac3_bsmod"); Param_Info1(AC3_Mode_String[meta[ac3_bsmod]]); + Get_S1 (3, meta[ac3_acmod], "ac3_acmod"); Param_Info1(AC3_ChannelLayout_lfeoff[meta[ac3_acmod]]); + Get_S1 (2, meta[ac3_cmixlev], "ac3_cmixlev"); Param_Info2C(meta[ac3_cmixlev]<=2, Ztring::ToZtring(-3 - ((float)meta[ac3_cmixlev]) * 1.5, 1).To_UTF8(), " dB"); + Get_S1 (2, meta[ac3_surmixlev], "ac3_surmixlev"); Param_Info2C(meta[ac3_surmixlev]<=2, meta[ac3_surmixlev]==2?string("-inf"):to_string(-3 - (int)meta[ac3_cmixlev] * 3), " dB"); + Get_S1 (2, meta[ac3_dsurmod], "ac3_dsurmod"); Param_Info1C(meta[ac3_dsurmod], "Dolby Surround"); + Get_S1 (1, meta[ac3_lfeon], "ac3_lfeon"); Param_Info1C(meta[ac3_lfeon], "LFE"); + Get_S1 (5, meta[ac3_dialnorm], "ac3_dialnorm"); Param_Info2(Ztring::ToZtring(meta[ac3_dialnorm]==0?-31:-(int)meta[ac3_dialnorm]).To_UTF8(), " dB"); Get_S1 (1, meta[ac3_langcode], "ac3_langcode"); Get_S1 (8, meta[ac3_langcod], "ac3_langcod"); Get_S1 (1, meta[ac3_audprodie], "ac3_audprodie"); - Get_S1 (5, meta[ac3_mixlevel], "ac3_mixlevel"); - Get_S1 (2, meta[ac3_roomtyp], "ac3_roomtyp"); + Get_S1 (5, meta[ac3_mixlevel], "ac3_mixlevel"); Param_Info2C(meta[ac3_audprodie], 80 + meta[ac3_mixlevel], " dB"); + Get_S1 (2, meta[ac3_roomtyp], "ac3_roomtyp"); Param_Info1C(meta[ac3_audprodie] && meta[ac3_roomtyp], AC3_roomtyp[meta[ac3_roomtyp] - 1]); Get_S1 (1, meta[ac3_copyrightb], "ac3_copyrightb"); Get_S1 (1, meta[ac3_origbs], "ac3_origbs"); if (xbsi) { - Skip_S1(1, "ac3_xbsi1e"); + Get_S1 (1, meta[ac3_xbsi1e], "ac3_xbsi1e"); Get_S1 (2, meta[ac3_dmixmod], "ac3_dmixmod"); - Get_S1 (3, meta[ac3_ltrtcmixlev], "ac3_ltrtcmixlev"); - Get_S1 (3, meta[ac3_ltrtsurmixlev], "ac3_ltrtsurmixlev"); - Get_S1 (3, meta[ac3_lorocmixlev], "ac3_lorocmixlev"); - Get_S1 (3, meta[ac3_lorosurmixlev], "ac3_lorosurmixlev"); + Get_S1 (3, meta[ac3_ltrtcmixlev], "ac3_ltrtcmixlev"); Param_Info2C(meta[ac3_xbsi1e], AC3_Level_Value(meta[ac3_ltrtcmixlev], 3, 1.5), " dB"); + Get_S1 (3, meta[ac3_ltrtsurmixlev], "ac3_ltrtsurmixlev"); Param_Info2C(meta[ac3_xbsi1e], AC3_Level_Value(meta[ac3_ltrtsurmixlev], 3, 1.5), " dB"); + Get_S1 (3, meta[ac3_lorocmixlev], "ac3_lorocmixlev"); Param_Info2C(meta[ac3_xbsi1e], AC3_Level_Value(meta[ac3_lorocmixlev], 3, 1.5), " dB"); + Get_S1 (3, meta[ac3_lorosurmixlev], "ac3_lorosurmixlev"); Param_Info2C(meta[ac3_xbsi1e], AC3_Level_Value(meta[ac3_lorosurmixlev], 3, 1.5), " dB"); Get_S1 (1, meta[ac3_xbsi2e], "ac3_xbsi2e"); - Get_S1 (2, meta[ac3_dsurexmod], "ac3_dsurexmod"); - Get_S1 (2, meta[ac3_dheadphonmod], "ac3_dheadphonmod"); - Get_S1 (1, meta[ac3_adconvtyp], "ac3_adconvtyp"); + Get_S1 (2, meta[ac3_dsurexmod], "ac3_dsurexmod"); Param_Info1C(meta[ac3_dsurexmod]>=2, meta[ac3_dsurexmod]==2?"Dolby Surround EX":"Dolby Pro Logic IIz"); + Get_S1 (2, meta[ac3_dheadphonmod], "ac3_dheadphonmod"); Param_Info1C(meta[ac3_dheadphonmod], "Dolby Headphone"); + Get_S1 (1, meta[ac3_adconvtyp], "ac3_adconvtyp"); Param_Info1C(meta[ac3_xbsi2e] && meta[ac3_adconvtyp], "HDCD"); Get_S1 (8, meta[ac3_xbsi2], "ac3_xbsi2"); Get_S1 (1, meta[ac3_encinfo], "ac3_encinfo"); } @@ -3545,12 +3558,12 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) Get_S1 (1, meta[ac3_suratton], "ac3_suratton"); Get_S1 (1, meta[ac3_rfpremphon], "ac3_rfpremphon"); Get_S1 (1, meta[ac3_compre], "ac3_compre"); - Get_S1 (8, meta[ac3_compr1], "ac3_compr1"); + Get_S1 (8, meta[ac3_compr1], "ac3_compr1"); Param_Info2C(meta[ac3_compre], Ztring::ToZtring(meta[ac3_dynrng1]?(AC3_compr[meta[ac3_compr1]>>4]+20*std::log10(((float)(0x10+(meta[ac3_compr1]&0x0F)))/32)):0, 2), " dB"); Get_S1 (1, meta[ac3_dynrnge], "ac3_dynrnge"); - Get_S1 (8, meta[ac3_dynrng1], "ac3_dynrng1"); - Get_S1 (8, meta[ac3_dynrng2], "ac3_dynrng2"); - Get_S1 (8, meta[ac3_dynrng3], "ac3_dynrng3"); - Get_S1 (8, meta[ac3_dynrng4], "ac3_dynrng4"); + Get_S1 (8, meta[ac3_dynrng1], "ac3_dynrng1"); Param_Info2C(meta[ac3_dynrnge], Ztring::ToZtring(meta[ac3_dynrng1]?(AC3_dynrng[meta[ac3_dynrng1]>>5]+20*std::log10(((float)(0x20+(meta[ac3_dynrng1]&0x1F)))/64)):0, 2), " dB"); + Get_S1 (8, meta[ac3_dynrng2], "ac3_dynrng2"); Param_Info2C(meta[ac3_dynrnge], Ztring::ToZtring(meta[ac3_dynrng2]?(AC3_dynrng[meta[ac3_dynrng2]>>5]+20*std::log10(((float)(0x20+(meta[ac3_dynrng2]&0x1F)))/64)):0, 2), " dB"); + Get_S1 (8, meta[ac3_dynrng3], "ac3_dynrng3"); Param_Info2C(meta[ac3_dynrnge], Ztring::ToZtring(meta[ac3_dynrng3]?(AC3_dynrng[meta[ac3_dynrng3]>>5]+20*std::log10(((float)(0x20+(meta[ac3_dynrng3]&0x1F)))/64)):0, 2), " dB"); + Get_S1 (8, meta[ac3_dynrng4], "ac3_dynrng4"); Param_Info2C(meta[ac3_dynrnge], Ztring::ToZtring(meta[ac3_dynrng4]?(AC3_dynrng[meta[ac3_dynrng4]>>5]+20*std::log10(((float)(0x20+(meta[ac3_dynrng4]&0x1F)))/64)):0, 2), " dB"); Element_End0(); FILLING_BEGIN() @@ -3558,14 +3571,18 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) { if (program >= Count_Get(Stream_Audio)) Stream_Prepare(Stream_Audio); - Fill(Stream_Audio, program, "AC3_metadata", "Yes"); - int32u BitRate = AC3_BitRate[meta[ac3_datarate]]*1000; - if (BitRate) - Fill(Stream_Audio, program, "AC3_metadata BitRate", BitRate); - //Fill(Stream_Audio, program, "AC3_metadata ServiceKind", AC3_Mode[meta[ac3_bsmod]]); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata ServiceKind", "N NTY"); - Fill(Stream_Audio, program, "AC3_metadata ServiceKind/String", AC3_Mode_String[meta[ac3_bsmod]]); - //Fill_SetOptions(Stream_Audio, 0, "AC3_metadata ServiceKind/String", "Y NTN"); + Fill(Stream_Audio, program, "AC3_Metadata", "Yes"); + if (meta[ac3_datarate]<19) + { + Fill(Stream_Audio, program, "AC3_Metadata BitRate", AC3_BitRate[meta[ac3_datarate]]*1000); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata BitRate", "N NTY"); + Fill(Stream_Audio, program, "AC3_Metadata BitRate/String", Ztring::ToZtring(AC3_BitRate[meta[ac3_datarate]])+__T(" kbps")); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata BitRate/String", "Y NTN"); + } + Fill(Stream_Audio, program, "AC3_Metadata ServiceKind", AC3_Mode[meta[ac3_bsmod]]); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata ServiceKind", "N NTY"); + Fill(Stream_Audio, program, "AC3_Metadata ServiceKind/String", AC3_Mode_String[meta[ac3_bsmod]]); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata ServiceKind/String", "Y NTN"); int8u Channels = AC3_Channels[meta[ac3_acmod]]; Ztring ChannelPositions; ChannelPositions.From_UTF8(AC3_ChannelPositions[meta[ac3_acmod]]); Ztring ChannelPositions2; ChannelPositions2.From_UTF8(AC3_ChannelPositions2[meta[ac3_acmod]]); @@ -3576,7 +3593,7 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) ChannelPositions += __T(", LFE"); ChannelPositions2 += __T(".1"); } - Fill(Stream_Audio, program, "AC3_metadata ChannelLayout", ChannelLayout); + Fill(Stream_Audio, program, "AC3_Metadata ChannelLayout", ChannelLayout); //Surround if (meta[ac3_dsurmod]==2) @@ -3597,15 +3614,26 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) } // Metadata - Fill(Stream_Audio, program, "AC3_metadata dialnorm/String", Ztring::ToZtring(meta[ac3_dialnorm]==0?-31:-(int)meta[ac3_dialnorm])+__T(" dB")); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata dialnorm/String", "N NTN"); + Fill(Stream_Audio, program, "AC3_Metadata dialnorm", meta[ac3_dialnorm]==0?-31:-(int)meta[ac3_dialnorm]); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dialnorm", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata dialnorm/String", Ztring::ToZtring(meta[ac3_dialnorm]==0?-31:-(int)meta[ac3_dialnorm])+__T(" dB")); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dialnorm/String", "Y NTN"); if (meta[ac3_compre]) { - float64 Value=AC3_compr[meta[ac3_compr1]>>4]+20*std::log10(((float)(0x10+(meta[ac3_compr1]&0x0F)))/32); - //Fill(Stream_Audio, program, "AC3_metadata compr", Value, 2); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata compr", "N NT"); - Fill(Stream_Audio, program, "AC3_metadata compr/String", Ztring::ToZtring(Value, 2)+__T(" dB")); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata compr/String", "N NTN"); + float64 Value; + if (meta[ac3_compr1]==0) + Value=0; //Special case in the formula + else + Value=AC3_compr[meta[ac3_compr1]>>4]+20*std::log10(((float)(0x10+(meta[ac3_compr1]&0x0F)))/32); + Fill(Stream_Audio, program, "AC3_Metadata compr", Value, 2); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata compr", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata compr/String", Ztring::ToZtring(Value, 2)+__T(" dB")); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata compr/String", "Y NTN"); + } + else if (meta[ac3_compr1]) + { + Fill(Stream_Audio, program, "AC3_Metadata comprprof", AC3_dynrngprof_Get(meta[ac3_compr1])); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata comprprof", "Y NT"); } if (meta[ac3_dynrnge]) { @@ -3614,22 +3642,68 @@ void File_DolbyE::ac3_metadata_subsegment(bool xbsi) Value=0; //Special case in the formula else Value=AC3_dynrng[meta[ac3_dynrng1]>>5]+20*std::log10(((float)(0x20+(meta[ac3_dynrng1]&0x1F)))/64); - //Fill(Stream_Audio, program, "AC3_metadata dynrng", Value, 2); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata dynrng", "N NT"); - Fill(Stream_Audio, program, "dynrng/String", Ztring::ToZtring(Value, 2)+__T(" dB")); - //Fill_SetOptions(Stream_Audio, program, "AC3_metadata dynrng/String", "N NTN"); + Fill(Stream_Audio, program, "AC3_Metadata dynrng", Value, 2); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dynrng", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata dynrng/String", Ztring::ToZtring(Value, 2)+__T(" dB")); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dynrng/String", "Y NTN"); + } + else if (meta[ac3_dynrng1]) + { + Fill(Stream_Audio, program, "AC3_Metadata dynrngprof", AC3_dynrngprof_Get(meta[ac3_dynrng1])); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dynrngprof", "Y NT"); } - // Other metadata if (meta[ac3_cmixlev]<=2) { - Fill(Stream_Audio, program, "AC3_metadata cmixlev/String", Ztring::ToZtring(-3 - ((float)meta[ac3_cmixlev]) * 1.5, 1).To_UTF8() + " dB"); + string Value = Ztring::ToZtring(-3 - ((float)meta[ac3_cmixlev]) * 1.5, 1).To_UTF8(); + Fill(Stream_Audio, program, "AC3_Metadata cmixlev", Value); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata cmixlev", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata cmixlev/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata cmixlev/String", "Y NTN"); } if (meta[ac3_surmixlev]<=2) { - Fill(Stream_Audio, program, "AC3_metadata surmixlev/String", (meta[ac3_surmixlev]==2?string("-inf"):to_string(-3 - (int)meta[ac3_cmixlev] * 3)) + " dB"); + string Value = (meta[ac3_surmixlev]==2?string("-inf"):to_string(-3 - (int)meta[ac3_cmixlev] * 3)); + Fill(Stream_Audio, program, "AC3_Metadata surmixlev", Value + " dB"); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata surmixlev", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata surmixlev/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata surmixlev/String", "Y NTN"); + } + if (meta[ac3_audprodie]) + { + string Value = to_string(80 + meta[ac3_mixlevel]); + Fill(Stream_Audio, program, "AC3_Metadata mixlevel", Value); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata mixlevel", "N NT"); + Fill(Stream_Audio, program, "AC3_Metadata mixlevel/String", Value + " dB"); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata mixlevel/String", "Y NTN"); + if (meta[ac3_roomtyp]) { + Fill(Stream_Audio, program, "AC3_Metadata roomtyp", AC3_roomtyp[meta[ac3_roomtyp] - 1]); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata roomtyp", "Y NTY"); + } + } + if (xbsi) { + if (meta[ac3_xbsi1e]) { + if (meta[ac3_dmixmod]) { + Fill(Stream_Audio, program, "AC3_Metadata dmixmod", AC3_dmixmod[meta[ac3_dmixmod] - 1]); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata dmixmod", "Y NTY"); + } + AC3_Level_Fill(this, program, meta[ac3_ltrtcmixlev], 3, 1.5, "AC3_Metadata ltrtcmixlev"); + AC3_Level_Fill(this, program, meta[ac3_ltrtsurmixlev], 3, 1.5, "AC3_Metadata ltrtsurmixlev"); + AC3_Level_Fill(this, program, meta[ac3_lorocmixlev], 3, 1.5, "AC3_Metadata lorocmixlev"); + AC3_Level_Fill(this, program, meta[ac3_lorosurmixlev], 3, 1.5, "AC3_Metadata lorosurmixlev"); + } + if (meta[ac3_xbsi2e] && meta[ac3_adconvtyp]) { + Fill(Stream_Audio, program, "AC3_Metadata adconvtyp", "HDCD"); + Fill_SetOptions(Stream_Audio, program, "AC3_Metadata adconvtyp", "Y NTY"); + } } + Fill(Stream_Audio, program, "AC3_Metadata hpfon", meta[ac3_hpfon] ? "Yes" : "No"); + Fill(Stream_Audio, program, "AC3_Metadata bwlpfon", meta[ac3_bwlpfon] ? "Yes" : "No"); + Fill(Stream_Audio, program, "AC3_Metadata lfelpfon", meta[ac3_lfelpfon] ? "Yes" : "No"); + Fill(Stream_Audio, program, "AC3_Metadata sur90on", meta[ac3_sur90on] ? "Yes" : "No"); + Fill(Stream_Audio, program, "AC3_Metadata suratton", meta[ac3_suratton] ? "Yes" : "No"); + Fill(Stream_Audio, program, "AC3_Metadata rfpremphon", meta[ac3_rfpremphon] ? "Yes" : "No"); } FILLING_END() diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsdiff.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsdiff.cpp index 4407c84905..33d9010167 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsdiff.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsdiff.cpp @@ -284,18 +284,18 @@ void File_Dsdiff::Header_Parse() Get_C4 (Name, "Name"); Get_B8 (Size, "Size"); - //Top level chunks - if (Name==Elements::FRM8) - Get_C4 (Name, "Real Name"); - //Coherency check - if (File_Offset+Buffer_Offset+Size>File_Size) + if (File_Offset+Buffer_Offset+12+Size>File_Size) { - Size=File_Size-(File_Offset+Buffer_Offset); if (Element_Level<=2) //Incoherencies info only at the top level chunk - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+12+Size, false, "DSDIFF"); + Size=File_Size-(File_Offset+Buffer_Offset+Element_Offset); } + //Top level chunks + if (Name==Elements::FRM8) + Get_C4 (Name, "Real Name"); + //Padding if (Size%2) { diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsf.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsf.cpp index b6dcb3cad6..a1f9c048e4 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsf.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dsf.cpp @@ -181,11 +181,11 @@ void File_Dsf::Header_Parse() Get_L8 (Size, "Size"); //Coherency check - if (File_Offset+Buffer_Offset+Size>File_Size) + if (Element_Offset<12 || File_Offset+Buffer_Offset+Size>File_Size) { - Size=File_Size-(File_Offset+Buffer_Offset); if (Element_Level<=2) //Incoherencies info only at the top level chunk - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+Size, false, "DSF"); + Size=File_Size-(File_Offset+Buffer_Offset); } Header_Fill_Code(Name, Ztring().From_CC4(Name)); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dts.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dts.cpp index 9afb5fbbc9..3ca65062d1 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dts.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Dts.cpp @@ -542,7 +542,7 @@ File_Dts::File_Dts() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; PTS_DTS_Needed=true; StreamSource=IsStream; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DtsUhd.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DtsUhd.cpp index 3895f7ff7e..c901478a69 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DtsUhd.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_DtsUhd.cpp @@ -1368,7 +1368,7 @@ File_DtsUhd::File_DtsUhd() IsType1CertifiedContent=false; LongTermLoudnessIndex=(int8u)-1; MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; PTS_DTS_Needed=true; StreamSource=IsStream; } diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.cpp index 05fb1f32df..ff91512edb 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.cpp @@ -843,7 +843,7 @@ bool File_Mpega::Synched_Test() || (Buffer[Buffer_Offset+2]&0xF0)==0xF0 || (Buffer[Buffer_Offset+2]&0x0C)==0x0C) { - Synched=false; + SynchLost("MPEG-Audio"); return true; } @@ -854,7 +854,7 @@ bool File_Mpega::Synched_Test() int8u sampling_frequency0=(CC1(Buffer+Buffer_Offset+2)>>2)&0x03; if (Mpega_SamplingRate[ID0][sampling_frequency0]==0 || Mpega_Coefficient[ID0][layer0]==0 || Mpega_BitRate[ID0][layer0][bitrate_index0]==0 || Mpega_SlotSize[layer0]==0) { - Synched=false; + SynchLost("MPEG Audio"); return true; } @@ -982,8 +982,11 @@ void File_Mpega::Data_Parse() } //Partial frame - if (Header_Size + Element_Size<((int64u)Mpega_Coefficient[ID][layer] * (int64u)Mpega_BitRate[ID][layer][bitrate_index] * 1000 / (int64u)Mpega_SamplingRate[ID][sampling_frequency] + (padding_bit ? 1 : 0)) * (int64u)Mpega_SlotSize[layer]) + auto FrameSize = ((int64u)Mpega_Coefficient[ID][layer] * (int64u)Mpega_BitRate[ID][layer][bitrate_index] * 1000 / (int64u)Mpega_SamplingRate[ID][sampling_frequency] + (padding_bit ? 1 : 0))* (int64u)Mpega_SlotSize[layer]; + auto RealFrameSize = Header_Size + Element_Size; + if (RealFrameSize < FrameSize) { + IsTruncated(File_Offset+Buffer_Offset+RealFrameSize, true, "MPEG-Audio"); Element_Name("Partial frame"); Skip_XX(Element_Size, "Data"); return; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.h b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.h index 83a3d2e327..eb92607c47 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Mpega.h @@ -25,7 +25,6 @@ class File_Mpega : public File__Analyze, public File__Tags_Helper public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; bool CalculateDelay; //Constructor/Destructor diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp index b50b3064b9..d5a5981823 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_SmpteSt0337.cpp @@ -164,7 +164,7 @@ File_SmpteSt0337::File_SmpteSt0337() ParserIDs[0]=MediaInfo_Parser_Aes3; #endif // MEDIAINFO_EVENTS MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=256*1024; + Buffer_TotalBytes_FirstSynched_Max=1024*1024; PTS_DTS_Needed=true; // In @@ -449,12 +449,6 @@ bool File_SmpteSt0337::Synchronize() // Synchronizing while (Buffer_Offset+16<=Buffer_Size) { - if (!Status[IsAccepted] && File_Offset_FirstSynched==(int64u)-1 && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max) - { - Reject(); - return false; - } - if ((BitDepth==0 || BitDepth==16) && (!Aligned || ((Buffer_TotalBytes+Buffer_Offset)%4)==0)) { if (Buffer[Buffer_Offset ]==0xF8 @@ -691,7 +685,7 @@ bool File_SmpteSt0337::Synchronize() return false; } - if (!Status[IsAccepted]) + if (!Status[IsAccepted] && IsSub) Accept("SMPTE ST 337"); // Guard band @@ -998,7 +992,7 @@ void File_SmpteSt0337::Header_Parse() } // Coherency test - if (!IsSub && !Status[IsAccepted]) + if (!IsSub && !Status[IsAccepted] && File_Offset+Buffer_Size=2 && Parser->Status[IsFilled])) + int64u Frame_Count_Valid=1+(File_Offset+Buffer_Size=Frame_Count_Valid && (!Parser || Parser->Status[IsAccepted])) + Accept("SMPTE ST 337"); + if (!Status[IsFilled] && Frame_Count>=2 && (!Parser || Parser->Status[IsFilled])) { Fill("SMPTE ST 337"); if (!IsSub && Config->ParseSpeed<1.0) @@ -1665,7 +1662,7 @@ void File_SmpteSt0337::Data_Parse() Finish(); } } - if (Parser==NULL || (Frame_Count>=2 && Parser->Status[IsFinished])) + if (!Status[IsFinished] && Frame_Count>=2 && (!Parser || Parser->Status[IsFinished])) Finish("SMPTE ST 337"); FILLING_END(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp index 0f4c94272a..4ecff62913 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.cpp @@ -110,7 +110,7 @@ File_Wvpk::File_Wvpk() //Configuration MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=32*1024; + Buffer_TotalBytes_FirstSynched_Max=64*1024; //In Frame_Count_Valid=2; @@ -121,13 +121,17 @@ File_Wvpk::File_Wvpk() total_samples_FirstFrame=(int32u)-1; block_index_FirstFrame=0; block_index_LastFrame=0; - SamplingRate=(int8u)-1; + SamplingRate_Index=(int8u)-1; + SamplingRate_Shift=0; + SamplingRate=0; num_channels=0; channel_mask=0; mono=false; hybrid=false; resolution0=false; resolution1=false; + correction=false; + dsf=false; } //*************************************************************************** @@ -137,18 +141,20 @@ File_Wvpk::File_Wvpk() //--------------------------------------------------------------------------- void File_Wvpk::Streams_Finish() { - Fill(Stream_Audio, 0, Audio_BitRate_Mode, "VBR"); - //Specific case if (FromMKV) return; //Duration - if (SamplingRate<15) + if (!SamplingRate && SamplingRate_Index<15) + SamplingRate=Wvpk_SamplingRate[SamplingRate_Index]<>23)&0xF)); Param_Info1(Wvpk_SamplingRate[SamplingRate]); + Skip_Flags(flags, 26, "sampling rate"); SamplingRate_Index=(int8u)(((flags>>23)&0xF)); Param_Info1(Wvpk_SamplingRate[SamplingRate_Index]); Skip_Flags(flags, 27, "reserved"); Skip_Flags(flags, 28, "reserved"); Skip_Flags(flags, 29, "use IIR for negative hybrid noise shaping"); Skip_Flags(flags, 30, "false stereo"); - Skip_Flags(flags, 31, "reserved"); + Get_Flags (flags, 31, dsf, "dsf"); } else { @@ -435,7 +441,9 @@ void File_Wvpk::Data_Parse() { case 0x07 : id_07(); break; case 0x0D : id_0D(); break; + case 0x0E : id_0E(); break; case 0x25 : id_25(); break; + case 0x27 : id_27(); break; default : if (word_size) Skip_XX(Size, "data"); } @@ -447,10 +455,15 @@ void File_Wvpk::Data_Parse() } //Filling - if (!Status[IsAccepted] && Frame_Count>=Frame_Count_Valid) + if (!Status[IsAccepted]) { - File__Tags_Helper::Accept("WavPack"); - Data_Parse_Fill(); + if (File_Offset+Buffer_Offset+Element_Size==File_Size) + Frame_Count_Valid=Frame_Count; + if (Frame_Count>=Frame_Count_Valid) + { + File__Tags_Helper::Accept("WavPack"); + Data_Parse_Fill(); + } } } @@ -465,7 +478,8 @@ void File_Wvpk::Data_Parse_Fill() Version_Minor.insert(0, 1, __T('0')); Fill(Stream_Audio, 0, Audio_Format_Profile, Ztring::ToZtring(version/0x100)+__T('.')+Version_Minor); Fill(Stream_Audio, 0, Audio_Codec, "Wavpack"); - Fill(Stream_Audio, 0, Audio_BitDepth, Wvpk_Resolution[(resolution1?1:0)*2+(resolution0?1:0)]); + if (!dsf) + Fill(Stream_Audio, 0, Audio_BitDepth, Wvpk_Resolution[(resolution1?1:0)*2+(resolution0?1:0)]); Fill(Stream_Audio, StreamPos_Last, Audio_Channel_s_, num_channels?num_channels:(mono?1:2)); if (channel_mask) { @@ -558,18 +572,28 @@ void File_Wvpk::Data_Parse_Fill() Fill(Stream_Audio, 0, Audio_ChannelLayout, ExtensibleWave_ChannelMask_ChannelLayout(channel_mask)); } - if (!FromMKV && SamplingRate<15) + if (!FromMKV && SamplingRate_Index<15) { - Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, Wvpk_SamplingRate[SamplingRate]); + Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, (Wvpk_SamplingRate[SamplingRate_Index]< this is a valid value - Fill(Stream_Audio, 0, Audio_Duration, ((int64u)total_samples_FirstFrame)*1000/Wvpk_SamplingRate[SamplingRate]); + Fill(Stream_Audio, 0, Audio_Duration, ((int64u)total_samples_FirstFrame)*1000/(Wvpk_SamplingRate[SamplingRate_Index]<=2*512*1024) + File__Tags_Helper::GoToFromEnd(512*1024, "WavPack"); } //*************************************************************************** @@ -580,12 +604,9 @@ void File_Wvpk::Data_Parse_Fill() void File_Wvpk::id_07() { //Parsing - Skip_XX(Size, "Data (Not decoded yet)"); + Skip_XX(Size, "Data"); - FILLING_BEGIN(); - if (Retrieve(Stream_Audio, 0, Audio_Compression_Mode).empty()) - Fill(Stream_Audio, 0, Audio_Compression_Mode, "Lossless", Unlimited, true, true); - FILLING_END(); + correction=true; } //--------------------------------------------------------------------------- @@ -621,6 +642,16 @@ void File_Wvpk::id_0D() } } +//--------------------------------------------------------------------------- +void File_Wvpk::id_0E() +{ + //Parsing + int8u Temp; + Get_L1 (Temp, "framerate multiplier"); + if (Temp<31) + SamplingRate_Shift=Temp; +} + //--------------------------------------------------------------------------- void File_Wvpk::id_25() { @@ -722,6 +753,16 @@ void File_Wvpk::id_25() Encoded_Library_Settings.erase(Encoded_Library_Settings.begin()); } +//--------------------------------------------------------------------------- +void File_Wvpk::id_27() +{ + //Parsing + Get_L3 (SamplingRate, "data"); + + if (SamplingRate) + Fill(Stream_Audio, StreamPos_Last, Audio_SamplingRate, SamplingRate, 10, true); +} + //*************************************************************************** // C++ //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.h b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.h index e39edb4c23..36f0b9bd0b 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Audio/File_Wvpk.h @@ -59,7 +59,9 @@ private : //Elements void id_07(); void id_0D(); + void id_0E(); void id_25(); + void id_27(); //Temp - Technical info int32u total_samples_FirstFrame; @@ -72,8 +74,12 @@ private : bool hybrid; bool joint_stereo; bool cross_channel_decorrelation; - int8u SamplingRate; + bool correction; + bool dsf; + int8u SamplingRate_Index; + int8u SamplingRate_Shift; int8u num_channels; + int32u SamplingRate; int32u channel_mask; int32u Size; int16u version; diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.cpp b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.cpp index c8509eed43..185ffe7e2e 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.cpp @@ -27,7 +27,9 @@ #if MEDIAINFO_IBIUSAGE #include "MediaInfo/Multiple/File_Ibi_Creation.h" #endif //MEDIAINFO_IBIUSAGE +#include "TimeCode.h" #include +#include using namespace std; using namespace tinyxml2; #if MEDIAINFO_EVENTS @@ -163,6 +165,366 @@ string uint128toString(uint128 ii, int radix) return string(&sz[i]); } +//*************************************************************************** +// Conformance +//*************************************************************************** + +#if MEDIAINFO_CONFORMANCE +struct field_value +{ + string Field; + string Value; + bitset8 Flags; + struct frame_pos + { + int64u Frame_Count_Min = (int64u)-1; + int64u Frame_Count_NotParsedIncluded_Min = (int64u)-1; + int64u SubFramePos_Min = (int64u)-1; + int64u PTS_Min = (int64u)-1; + int64u File_Offset_Min = (int64u)-1; + int64u Frame_Count_Max = (int64u)-1; + int64u Frame_Count_NotParsedIncluded_Max = (int64u)-1; + int64u SubFramePos_Max = (int64u)-1; + int64u PTS_Max = (int64u)-1; + int64u File_Offset_Max = (int64u)-1; + + frame_pos(int64u Frame_Count = (int64u)-1, int64u Frame_Count_NotParsedIncluded = (int64u)-1, int64u SubFramePos = (int64u)-1, int64u PTS = (int64u)-1, int64u File_Offset = (int64u)-1) + : Frame_Count_Min(Frame_Count) + , Frame_Count_NotParsedIncluded_Min(Frame_Count_NotParsedIncluded) + , SubFramePos_Min(SubFramePos) + , PTS_Min(PTS) + , File_Offset_Min(File_Offset) + {} + }; + vector FramePoss; + + field_value(string&& Field = {}, string&& Value = {}, bitset8 Flags = {}, int64u Frame_Count = (int64u)-1, int64u Frame_Count_NotParsedIncluded = (int64u)-1, int64u SubFramePos = (int64u)-1, int64u PTS = (int64u)-1, int64u File_Offset = (int64u)-1) + : Field(Field) + , Value(Value) + , Flags(Flags) + { + FramePoss.push_back({ Frame_Count, Frame_Count_NotParsedIncluded, SubFramePos, PTS, File_Offset }); + } + + friend bool operator==(const field_value& l, const field_value& r) + { + return l.Field == r.Field && l.Value == r.Value && l.Flags.to_int8u() == r.Flags.to_int8u(); + } +}; +struct conformance +{ + conformance(File__Analyze* A) : A(A) {} + + File__Analyze* A; + int64u Frame_Count = (int64u)-1; + int64u Frame_Count_NotParsedIncluded = (int64u)-1; + int64u PTS = (int64u)-1; + int64u File_Offset = (int64u)-1; + stream_t StreamKind_Last = Stream_General; + size_t StreamPos_Last = 0; + + bitset8 ConformanceFlags; + vector ConformanceErrors_Total[Conformance_Max]; + vector ConformanceErrors[Conformance_Max]; + bool Warning_Error = false; + int8u IsParsingRaw = 0; + bool CheckIf(const bitset8 Flags) { return !Flags || (ConformanceFlags & Flags); } + + void Fill_Conformance(const char* Field, const char* Value, bitset8 Flags = {}, conformance_type Level = Conformance_Error, stream_t StreamKind = Stream_General, size_t StreamPos = 0); + void Fill_Conformance(const char* Field, const string& Value, bitset8 Flags = {}, conformance_type Level = Conformance_Error) { Fill_Conformance(Field, Value.c_str(), Flags, Level); } + void Clear_Conformance(); + void Merge_Conformance(bool FromConfig = false); + void Streams_Finish_Conformance(); +}; +typedef conformance conformance_data; +static const char* Conformance_Type_String[] = { + "Errors", + "Warnings", + "Infos", +}; +static_assert(sizeof(Conformance_Type_String) / sizeof(Conformance_Type_String[0]) == Conformance_Max, ""); +#endif //MEDIAINFO_CONFORMANCE + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +string BuildConformanceName(const string& ParserName, const char* Prefix, const char* Suffix) +{ + string Result; + if (!Prefix) { + Prefix = ParserName.c_str(); + } + if (Prefix) { + Result += Prefix; + } + if (!Result.empty()) { + if (Result.back() >= '0' && Result.back() <= '9') { + Result += '_'; + } + if (!Result.empty() && Suffix && Suffix[0]) { + Result += ' '; + } + } + if (Suffix) { + Result += Suffix; + if (Result.empty() && Result.back() >= '0' && Result.back() <= '9') { + Result += '_'; + } + } + return Result; +} +void conformance::Fill_Conformance(const char* Field, const char* Value, bitset8 Flags, conformance_type Level, stream_t StreamKind, size_t StreamPos) +{ + if (Level == Conformance_Warning && Warning_Error) + Level = Conformance_Error; + field_value FieldValue(Field, Value, Flags, (int64u)-1, (int64u)-1, IsParsingRaw >= 2 ? (IsParsingRaw - 2) : (int64u)-1, (int64u)-1, (int64u)-1); + auto& Conformance = ConformanceErrors[Level]; + auto Current = find(Conformance.begin(), Conformance.end(), FieldValue); + if (Current != Conformance.end()) + return; + Conformance.emplace_back(FieldValue); +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void conformance::Clear_Conformance() +{ + for (size_t Level = 0; Level < Conformance_Max; Level++) { + auto& Conformance = ConformanceErrors[Level]; + Conformance.clear(); + } +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void conformance::Merge_Conformance(bool FromConfig) +{ + for (size_t Level = 0; Level < Conformance_Max; Level++) { + auto& Conformance = ConformanceErrors[Level]; + auto& Conformance_Total = ConformanceErrors_Total[Level]; + for (const auto& FieldValue : Conformance) { + auto Current = find(Conformance_Total.begin(), Conformance_Total.end(), FieldValue); + if (Current != Conformance_Total.end()) { + if (Current->FramePoss.size() < 32) { + if (FromConfig) { + Current->FramePoss.insert(Current->FramePoss.begin(), { (int64u)-2 }); + } + else if (Frame_Count != (int64u)-1 && !Current->FramePoss.empty() && (Frame_Count - Current->FramePoss.back().Frame_Count_Min <= 1 || Frame_Count - Current->FramePoss.back().Frame_Count_Max <= 1)) { + Current->FramePoss.back().Frame_Count_Max = Frame_Count; + Current->FramePoss.back().Frame_Count_NotParsedIncluded_Max = Frame_Count_NotParsedIncluded; + Current->FramePoss.back().SubFramePos_Min = FieldValue.FramePoss[0].SubFramePos_Min; + Current->FramePoss.back().PTS_Max = PTS; + Current->FramePoss.back().File_Offset_Max = File_Offset; + } + else { + Current->FramePoss.push_back({ Frame_Count, Frame_Count_NotParsedIncluded, FieldValue.FramePoss[0].SubFramePos_Min, PTS, File_Offset }); + } + } + else if (Current->FramePoss.size() == 32) + Current->FramePoss.push_back({}); //Indicating "..." + continue; + } + if (!CheckIf(FieldValue.Flags)) { + continue; + } + if (Conformance_Total.size() < 32) { + Conformance_Total.push_back(FieldValue); + Conformance_Total.back().FramePoss.front() = { FromConfig ? ((int64u)-2) : Frame_Count, FromConfig ? ((int64u)-1) : Frame_Count_NotParsedIncluded, FieldValue.FramePoss[0].SubFramePos_Min, FromConfig ? ((int64u)-1) : PTS, File_Offset }; + } + else { + if (Conformance_Total.size() == 32) { + field_value TooMany; + TooMany.Field = "GeneralCompliance"; + TooMany.Value = "[More conformance errors...]"; + Conformance_Total.push_back(TooMany); + } + break; + } + } + Conformance.clear(); + } +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void conformance::Streams_Finish_Conformance() +{ + Merge_Conformance(true); + + for (size_t Level = 0; Level < Conformance_Max; Level++) + { + auto& Conformance_Total = ConformanceErrors_Total[Level]; + if (Conformance_Total.empty()) + continue; + for (size_t i = Conformance_Total.size() - 1; i < Conformance_Total.size(); i--) { + if (!CheckIf(Conformance_Total[i].Flags)) { + Conformance_Total.erase(Conformance_Total.begin() + i); + } + } + if (Conformance_Total.empty()) + continue; + string Conformance_String = "Conformance"; + Conformance_String += Conformance_Type_String[Level]; + A->Fill(StreamKind_Last, StreamPos_Last, Conformance_String.c_str(), Conformance_Total.size()); + Conformance_String += ' '; + for (const auto& ConformanceError : Conformance_Total) { + size_t Space = 0; + for (;;) { + Space = ConformanceError.Field.find(' ', Space + 1); + if (Space == string::npos) { + break; + } + const auto Field = Conformance_String + ConformanceError.Field.substr(0, Space); + const auto& Value = A->Retrieve_Const(StreamKind_Last, StreamPos_Last, Field.c_str()); + if (Value.empty()) { + A->Fill(StreamKind_Last, StreamPos_Last, Field.c_str(), "Yes"); + } + } + string Extra; + if (!ConformanceError.FramePoss.empty()) + { + string Frames, Times, Offsets; + auto Pos_Total = ConformanceError.FramePoss.size(); + if (ConformanceError.FramePoss.back().File_Offset_Min == (int64u)-1) { + Pos_Total--; + } + size_t Frames_HasContent, Times_HasContent, Offsets_HasContent; + Frames_HasContent = Times_HasContent = Offsets_HasContent = Pos_Total; + for (size_t i = 0; i < Pos_Total; i++) { + auto FramePos = ConformanceError.FramePoss[i]; + if (FramePos.Frame_Count_Min == (int64u)-2) { + Frames += "conf"; + } + else { + if (FramePos.Frame_Count_NotParsedIncluded_Min != (int64u)-1) { + if (FramePos.Frame_Count_NotParsedIncluded_Max != (int64u)-1) { + Frames += '['; + } + Frames += to_string(FramePos.Frame_Count_NotParsedIncluded_Min); + if (FramePos.SubFramePos_Min != (int64u)-1) { + Frames += '.'; + Frames += to_string(FramePos.SubFramePos_Min); + } + if (FramePos.Frame_Count_NotParsedIncluded_Max != (int64u)-1) { + Frames += '.'; + Frames += '.'; + Frames += to_string(FramePos.Frame_Count_NotParsedIncluded_Max); + if (FramePos.SubFramePos_Min != (int64u)-1) { + Frames += '.'; + Frames += to_string(FramePos.SubFramePos_Max); + } + Frames += ']'; + } + } + else { + Frames += '?'; + Frames_HasContent--; + } + if (FramePos.PTS_Min != (int64u)-1) { + if (FramePos.PTS_Max != (int64u)-1) { + Times += '['; + } + auto PTS = (int64_t)FramePos.PTS_Min; + if (PTS >= 0) { + PTS += 500000; + } + else { + PTS -= 500000; + } + PTS /= 1000000; + TimeCode TC(PTS, 999, TimeCode::Timed()); + Times += TC.ToString(); + if (FramePos.PTS_Max != (int64u)-1) { + Times += '.'; + Times += '.'; + auto PTS = (int64_t)FramePos.PTS_Max; + if (PTS >= 0) { + PTS += 500000; + } + else { + PTS -= 500000; + } + PTS /= 1000000; + TimeCode TC(PTS, 999, TimeCode::Timed()); + Times += TC.ToString(); + Times += ']'; + } + } + else { + Times += '?'; + Times_HasContent--; + } + } + if (FramePos.File_Offset_Min != (int64u)-1) { + if (FramePos.File_Offset_Max != (int64u)-1) { + Offsets += '['; + } + Offsets += "0x" + Ztring::ToZtring(FramePos.File_Offset_Min, 16).To_UTF8(); + if (FramePos.File_Offset_Max != (int64u)-1) { + Offsets += '.'; + Offsets += '.'; + Offsets += "0x" + Ztring::ToZtring(FramePos.File_Offset_Max, 16).To_UTF8(); + Offsets += ']'; + } + } + else { + Offsets += '?'; + Offsets_HasContent--; + } + Frames += '+'; + Times += '+'; + Offsets += '+'; + } + if (ConformanceError.FramePoss.back().File_Offset_Min == (int64u)-1) { + Frames += "..."; + Times += "..."; + Offsets += "..."; + } + else { + Frames.pop_back(); + Times.pop_back(); + Offsets.pop_back(); + } + if (Frames_HasContent + Times_HasContent + Offsets_HasContent) { + Extra = ' '; + Extra += '('; + if (Frames == "conf") { + Extra += Frames; + } + else { + if (Frames_HasContent) { + Extra += "frame "; + Extra += Frames; + } + if (Times_HasContent) { + if (Frames_HasContent) { + Extra += ','; + Extra += ' '; + } + Extra += "time "; + Extra += Times; + } + } + if (Offsets_HasContent) { + if (Frames_HasContent + Times_HasContent) { + Extra += ','; + Extra += ' '; + } + Extra += "offset "; + Extra += Offsets; + } + Extra += ')'; + } + } + A->Fill(StreamKind_Last, StreamPos_Last, (Conformance_String + ConformanceError.Field).c_str(), ConformanceError.Value + Extra); + } + Conformance_Total.clear(); + } +} +#endif + //*************************************************************************** // Constructor/Destructor //*************************************************************************** @@ -263,7 +625,7 @@ File__Analyze::File__Analyze () if (MediaInfoLib::Config.FormatDetection_MaximumOffset_Get()) Buffer_TotalBytes_FirstSynched_Max=MediaInfoLib::Config.FormatDetection_MaximumOffset_Get(); else - Buffer_TotalBytes_FirstSynched_Max=1024*1024; + Buffer_TotalBytes_FirstSynched_Max=16*1024*1024; if (Buffer_TotalBytes_FirstSynched_Max<(int64u)-1-64*1024*1024) Buffer_TotalBytes_Fill_Max=Buffer_TotalBytes_FirstSynched_Max+64*1024*1024; else @@ -274,6 +636,7 @@ File__Analyze::File__Analyze () //Synchro MustParseTheHeaderFile=true; + FrameIsAlwaysComplete=false; Synched=false; UnSynched_IsNotJunk=false; MustExtendParsingDuration=false; @@ -321,6 +684,7 @@ File__Analyze::File__Analyze () //Events data PES_FirstByte_IsAvailable=false; + PES_FirstByte_Value=false; //AES #if MEDIAINFO_AES @@ -337,6 +701,10 @@ File__Analyze::File__Analyze () Hash_ParseUpTo=0; #endif //MEDIAINFO_HASH + #if MEDIAINFO_CONFORMANCE + Conformance_Data=nullptr; + #endif //MEDIAINFO_CONFORMANCE + Unsynch_Frame_Count=(int64u)-1; #if MEDIAINFO_IBIUSAGE Ibi_SynchronizationOffset_Current=0; @@ -371,6 +739,10 @@ File__Analyze::~File__Analyze () delete Hash; //Hash=NULL; #endif //MEDIAINFO_HASH + #if MEDIAINFO_CONFORMANCE + delete (conformance_data*)Conformance_Data; + #endif //MEDIAINFO_CONFORMANCE + #if MEDIAINFO_IBIUSAGE if (!IsSub) delete IbiStream; //IbiStream=NULL; @@ -770,6 +1142,11 @@ void File__Analyze::Open_Buffer_Continue (const int8u* ToAdd, size_t ToAdd_Size) ) { BookMark_Get(); + if (File_GoTo==File_Size) + { + File_GoTo=(int64u)-1; + ForceFinish(); + } } //Demand to go elsewhere @@ -1031,8 +1408,11 @@ void File__Analyze::Open_Buffer_Continue (File__Analyze* Sub, const int8u* ToAdd int8u* Temp=Sub->OriginalBuffer; Sub->OriginalBuffer_Capacity=(size_t)(Sub->OriginalBuffer_Size+Element_Size-Element_Offset); Sub->OriginalBuffer=new int8u[Sub->OriginalBuffer_Capacity]; - memcpy_Unaligned_Unaligned(Sub->OriginalBuffer, Temp, Sub->OriginalBuffer_Size); - delete[] Temp; + if (Temp) + { + memcpy_Unaligned_Unaligned(Sub->OriginalBuffer, Temp, Sub->OriginalBuffer_Size); + delete[] Temp; + } } memcpy_Unaligned_Unaligned(Sub->OriginalBuffer+Sub->OriginalBuffer_Size, Buffer+Buffer_Offset+(size_t)Element_Offset, (size_t)(Element_Size-Element_Offset)); Sub->OriginalBuffer_Size+=(size_t)(Element_Size-Element_Offset); @@ -1176,6 +1556,7 @@ bool File__Analyze::Open_Buffer_Continue_Loop () //Parsing specific Read_Buffer_AfterParsing(); + Merge_Conformance(); //Jumping to the end of the file if needed if (!IsSub && !EOF_AlreadyDetected && Config->ParseSpeed<1 && Count_Get(Stream_General)) @@ -2016,11 +2397,8 @@ bool File__Analyze::Synchro_Manage() { if (Status[IsFinished]) Finish(); //Finish - if (!IsSub && File_Offset_FirstSynched==(int64u)-1 && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max) - { - Open_Buffer_Unsynch(); - GoToFromEnd(0); - } + if (!IsSub && !Status[IsAccepted] && Buffer_TotalBytes+Buffer_Offset>=Buffer_TotalBytes_FirstSynched_Max) + Reject(); return false; //Wait for more data } Synched=true; @@ -2273,13 +2651,16 @@ bool File__Analyze::Header_Manage() if(Element_Level<2) return false; //Can not synchronize anymore in this block - Element_Offset=Element[Element_Level-2].Next-(File_Offset+Buffer_Offset); + if (FrameIsAlwaysComplete) + Element_Offset=Buffer_Size-Buffer_Offset; + else + Element_Offset=Element[Element_Level-2].Next-(File_Offset+Buffer_Offset); Header_Fill_Size(Element_Offset); } } if(Element_Level<1) return false; - if (Element_IsWaitingForMoreData() || ((DataMustAlwaysBeComplete && Element[Element_Level-1].Next>File_Offset+Buffer_Size) || File_GoTo!=(int64u)-1) //Wait or want to have a comple data chunk + if (Element_IsWaitingForMoreData() || ((!FrameIsAlwaysComplete && DataMustAlwaysBeComplete && Element[Element_Level-1].Next>File_Offset+Buffer_Size) || File_GoTo!=(int64u)-1) //Wait or want to have a comple data chunk #if MEDIAINFO_DEMUX || (Config->Demux_EventWasSent) #endif //MEDIAINFO_DEMUX @@ -2384,7 +2765,18 @@ void File__Analyze::Header_Fill_Size(int64u Size) if (Element_Level==1) Element[0].Next=File_Offset+Buffer_Offset+Size; else if (File_Offset+Buffer_Offset+Size>Element[Element_Level-2].Next) + { + if (!IsSub || (File_Offset + Buffer_Size < File_Size && File_Size - (File_Offset + Buffer_Size) >= 0x10000)) { //TODO: good support of end of TS dumps + auto Name = CreateElementName(); + if (!Name.empty()) { + Name += ' '; + } + Name += "GeneralCompliance"; + Fill_Conformance(Name.c_str(), "Element size " + to_string(Size - Element_Offset) + " is more than maximal permitted size " + to_string(Element[Element_Level - 2].Next - (File_Offset + Buffer_Offset + Element_Offset))); + } + Element[Element_Level-1].Next=Element[Element_Level-2].Next; + } else Element[Element_Level-1].Next=File_Offset+Buffer_Offset+Size; Element[Element_Level-1].IsComplete=true; @@ -2471,12 +2863,13 @@ bool File__Analyze::Data_Manage() //Next element if (!Element_WantNextLevel + && Buffer_Size // If the buffer is cleared after Open_Buffer_Unsynch(), Element[Element_Level].Next is no more relevant #if MEDIAINFO_HASH && Hash==NULL #endif //MEDIAINFO_HASH ) { - if (Element[Element_Level].Next<=File_Offset+Buffer_Size) + if (Element[Element_Level].Next>=File_Offset && Element[Element_Level].Next<=File_Offset+Buffer_Size) { if (Element_Offset<(size_t)(Element[Element_Level].Next-File_Offset-Buffer_Offset)) Element_Offset=(size_t)(Element[Element_Level].Next-File_Offset-Buffer_Offset); @@ -2758,11 +3151,34 @@ void File__Analyze::Element_Parser(const char* Parser) #if MEDIAINFO_TRACE void File__Analyze::Element_Error(const char* Message) { - //Needed? - if (Config_Trace_Level<=0.7) - return; + if (Trace_Activated) + Element[Element_Level].TraceNode.Infos.push_back(new element_details::Element_Node_Info(Message, "Error")); - Element[Element_Level].TraceNode.Infos.push_back(new element_details::Element_Node_Info(Message, "Error")); + // Quick transform of old fashion error to new system. TODO: better wording of errors + string M(Message); + size_t Dash_Pos=string::npos; + if (M.find(' ')!=string::npos) + { + Fill_Conformance("GeneralCompliance", M.c_str()); + } + else + { + auto Version_Pos=M.find(':'); + if (Version_Pos!=string::npos) + M.erase(Version_Pos); + auto FFV1_Pos=M.rfind("FFV1-", 0); + if (FFV1_Pos !=string::npos) + M.erase(0, 5); + for (;;) + { + auto Temp=M.find('-', Dash_Pos+1); + if (Temp==string::npos) + break; + Dash_Pos=Temp; + M[Dash_Pos]=' '; + } + Fill_Conformance(M.c_str(), M.substr(Dash_Pos+1)); + } } #endif //MEDIAINFO_TRACE @@ -2770,7 +3186,36 @@ void File__Analyze::Element_Error(const char* Message) #if MEDIAINFO_TRACE void File__Analyze::Param_Error(const char* Message) { - Param_Info(Message, "Error"); + if (Trace_Activated) + Param_Info(Message, "Error"); + + // Quick transform of old fashion error to new system. TODO: better wording of errors + string M(Message); + if (M=="TRUNCATED-ELEMENT:1") + return; // Redundant, TODO: sub-elements + size_t Dash_Pos=string::npos; + if (M.find(' ')!=string::npos) + { + Fill_Conformance("GeneralCompliance", M.c_str()); + } + else + { + auto Version_Pos=M.find(':'); + if (Version_Pos!=string::npos) + M.erase(Version_Pos); + auto FFV1_Pos=M.rfind("FFV1-", 0); + if (FFV1_Pos !=string::npos) + M.erase(0, 5); + for (;;) + { + auto Temp=M.find('-', Dash_Pos+1); + if (Temp==string::npos) + break; + Dash_Pos=Temp; + M[Dash_Pos]=' '; + } + Fill_Conformance(M.c_str(), M.substr(Dash_Pos+1)); + } } #endif //MEDIAINFO_TRACE @@ -2938,7 +3383,7 @@ void File__Analyze::Trusted_IsNot () #endif //MEDIAINFO_TRACE //Enough data? - if (!Element[Element_Level].IsComplete) + if (!FrameIsAlwaysComplete && !Element[Element_Level].IsComplete) { Element_WaitForMoreData(); return; @@ -3186,6 +3631,7 @@ void File__Analyze::ForceFinish () return; #endif //MEDIAINFO_DEMUX } + Streams_Finish_Conformance(); Streams_Finish_Global(); #if MEDIAINFO_DEMUX if (Config->Demux_EventWasSent) @@ -3888,6 +4334,165 @@ void File__Analyze::Decoded (const int8u* Buffer, size_t Buffer_Size) #endif //MEDIAINFO_DECODE +//*************************************************************************** +// Conformance +//*************************************************************************** + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::Fill_Conformance(const char* Field, const char* Value, uint8_t Flags, conformance_type Level, stream_t StreamKind, size_t StreamPos) +{ + if (!Conformance_Data) { + Conformance_Data = new conformance_data(this); + ((conformance_data*)Conformance_Data)->Warning_Error = MediaInfoLib::Config.WarningError(); + } + auto& Data = *(conformance_data*)Conformance_Data; + Data.Frame_Count = Frame_Count; + Data.Frame_Count_NotParsedIncluded = Frame_Count_NotParsedIncluded; + if (IsSub) { + if (Frame_Count != (int64u)-1) { + Data.Frame_Count -= Frame_Count_InThisBlock; + } + if (Frame_Count_NotParsedIncluded != (int64u)-1) { + Data.Frame_Count_NotParsedIncluded -= Frame_Count_InThisBlock; + } + } + if (FrameInfo.PTS != (int64u)-1 && PTS_Begin != (int64u)-1) + FrameInfo.PTS -= PTS_Begin; + Data.PTS = FrameInfo.PTS == (int64u)-1 ? FrameInfo.DTS : FrameInfo.PTS; + if (FrameInfo.PTS != (int64u)-1 && PTS_Begin != (int64u)-1) + FrameInfo.PTS -= PTS_Begin; + if (Data.PTS != (int64u)-1) { + if (Frame_Count_InThisBlock) { + Data.PTS -= FrameInfo.DUR; + } + } + #if !MEDIAINFO_TRACE + static const size_t BS_Size=0; + #endif //MEDIAINFO_TRACE + Data.File_Offset = File_Offset + Buffer_Offset + Element_Offset + BS_Size - (BS->Remain() + 7) / 8; + Data.Fill_Conformance( Field, Value, Flags, Level, StreamKind, StreamPos); +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::Clear_Conformance() +{ + if (!Conformance_Data) { + return; + } + auto& Data = *(conformance_data*)Conformance_Data; + Data.Clear_Conformance(); +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::Merge_Conformance(bool FromConfig) +{ + if (!Conformance_Data) { + return; + } + auto& Data = *(conformance_data*)Conformance_Data; + Data.Merge_Conformance(FromConfig); +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::Streams_Finish_Conformance() +{ + if (!Conformance_Data) { + return; + } + auto& Data = *(conformance_data*)Conformance_Data; + if (IsSub) + { + for (size_t StreamKind = Stream_General + 1; StreamKind < Stream_Max; StreamKind++) { + if (Count_Get((stream_t)StreamKind)) { + Data.StreamKind_Last = (stream_t)StreamKind; + } + } + } + Data.Streams_Finish_Conformance(); +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +string File__Analyze::CreateElementName() +{ + string Result; + for (size_t i = 1; i < Element_Level; i++) { + if (!Element[i].Code) { + continue; + } + Result += '0'; + Result += 'x'; + Result += Ztring().From_Number(Element[i].Code, 16).To_UTF8(); + if (Result.back() >= '0' && Result.back() <= '9') { + Result += '_'; + } + Result += ' '; + } + if (!Result.empty()) + Result.pop_back(); + return Result; +} +#endif + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::IsTruncated(int64u ExpectedSize, bool MoreThan, const char* Prefix) +{ + if (IsSub) { + return; + } + auto Frame_Count_Save = Frame_Count; + auto Frame_Count_NotParsedIncluded_Save = Frame_Count_NotParsedIncluded; + Frame_Count = (int64u)-1; + Frame_Count_NotParsedIncluded = (int64u)-1; + Fill(Stream_General, 0, "IsTruncated", "Yes", Unlimited, true, true); + Fill_SetOptions(Stream_General, 0, "IsTruncated", "N NT"); + Fill_Conformance(BuildConformanceName(ParserName, Prefix, "GeneralCompliance").c_str(), "File size " + std::to_string(File_Size) + " is less than expected size " + (ExpectedSize == (int64u)-1 ? std::string() : ((MoreThan ? "at least " : "") + std::to_string(ExpectedSize)))); + Merge_Conformance(); + Frame_Count = Frame_Count_Save; + Frame_Count_NotParsedIncluded = Frame_Count_NotParsedIncluded_Save; +} + +#endif //MEDIAINFO_CONFORMANCE + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::RanOutOfData(const char* Prefix) +{ + if (File_Offset + Buffer_Offset + Element_Size >= File_Size) { + return; + } + if (FrameIsAlwaysComplete && !Frame_Count_InThisBlock) { + Frame_Count++; + if (Frame_Count_NotParsedIncluded != (int64u)-1) + Frame_Count_NotParsedIncluded++; + Frame_Count_InThisBlock++; + } + Trusted_IsNot("out of data"); + Clear_Conformance(); + Fill_Conformance(BuildConformanceName(ParserName, Prefix, "GeneralCompliance").c_str(), "Bitstream parsing ran out of data to read before the end of the syntax was reached, most probably the bitstream is malformed"); +} + +#endif //MEDIAINFO_CONFORMANCE + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +void File__Analyze::SynchLost(const char* Prefix) +{ + Synched=false; + Fill_Conformance(BuildConformanceName(ParserName, Prefix, "GeneralCompliance").c_str(), "Bitstream synchronisation is lost"); +} + +#endif //MEDIAINFO_CONFORMANCE + //*************************************************************************** // IBI //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.h b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.h index 808383dcb3..2a94dc1030 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.h +++ b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze.h @@ -75,6 +75,13 @@ static inline int8u ReverseBits(int8u c) string uint128toString(uint128 Value, int radix); +enum conformance_type { + Conformance_Error, + Conformance_Warning, + Conformance_Information, + Conformance_Max, +}; + #if !MEDIAINFO_TRACE #include "MediaInfo/File__Analyze_MinimizeSize.h" #else @@ -250,6 +257,7 @@ public : int64u Field_Count_InThisBlock; int64u Frame_Count_NotParsedIncluded; int64u FrameNumber_PresentationOrder; + bool FrameIsAlwaysComplete; bool Synched; //Data is synched bool UnSynched_IsNotJunk; //Data is actually synched bool MustExtendParsingDuration; //Data has some substreams difficult to detect (e.g. captions), must wait a bit before final filling @@ -1360,6 +1368,7 @@ protected : friend class File__Tags_Helper; friend class File_Usac; friend class File_Mk; + friend class File_Riff; friend class File_Mpeg4; friend class File_Hevc; @@ -1514,6 +1523,29 @@ public : int64u Hash_ParseUpTo; #endif //MEDIAINFO_HASH + #if MEDIAINFO_CONFORMANCE + void* Conformance_Data; + void Fill_Conformance(const char* Field, const char* Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error, stream_t StreamKind = Stream_General, size_t StreamPos = 0); + void Fill_Conformance(const char* Field, const string& Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error) { Fill_Conformance(Field, Value.c_str(), Flags, Level); } + void Clear_Conformance(); + void Merge_Conformance(bool FromConfig = false); + void Streams_Finish_Conformance(); + virtual string CreateElementName(); + void IsTruncated(int64u ExpectedSize = (int64u)-1, bool MoreThan = false, const char* Prefix = nullptr); + void RanOutOfData(const char* Prefix = nullptr); + void SynchLost(const char* Prefix = nullptr); + #else //MEDIAINFO_CONFORMANCE + void Fill_Conformance(const char* Field, const char* Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error, stream_t StreamKind = Stream_General, size_t StreamPos = 0) {} + void Fill_Conformance(const char* Field, const string& Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error) { Fill_Conformance(Field, Value.c_str(), Flags, Level); } + void Clear_Conformance() {} + void Merge_Conformance(bool FromConfig = false) {} + void Streams_Finish_Conformance() {} + string CreateElementName() { return {}; } + void IsTruncated(int64u ExpectedSize = (int64u)-1, bool MoreThan = false, const char* = nullptr) {} + void RanOutOfData(const char* = nullptr) { Trusted_IsNot(); } + void SynchLost(const char* = nullptr) { Trusted_IsNot(); } + #endif //MEDIAINFO_CONFORMANCE + #if MEDIAINFO_SEEK private: bool Seek_Duration_Detected; diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h index 639e320401..21c641ae90 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h +++ b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_MinimizeSize.h @@ -180,6 +180,7 @@ public : int64u Field_Count_InThisBlock; int64u Frame_Count_NotParsedIncluded; int64u FrameNumber_PresentationOrder; + bool FrameIsAlwaysComplete; bool Synched; //Data is synched bool UnSynched_IsNotJunk; //Data is actually synched bool MustExtendParsingDuration; //Data has some substreams difficult to detect (e.g. captions), must wait a bit before final filling @@ -1285,6 +1286,7 @@ protected : friend class File__Tags_Helper; friend class File_Usac; friend class File_Mk; + friend class File_Riff; friend class File_Mpeg4; friend class File_Hevc; @@ -1437,6 +1439,29 @@ public : int64u Hash_ParseUpTo; #endif //MEDIAINFO_HASH + #if MEDIAINFO_CONFORMANCE + void* Conformance_Data; + void Fill_Conformance(const char* Field, const char* Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error, stream_t StreamKind = Stream_General, size_t StreamPos = 0); + void Fill_Conformance(const char* Field, const string& Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error) { Fill_Conformance(Field, Value.c_str(), Flags, Level); } + void Clear_Conformance(); + void Merge_Conformance(bool FromConfig = false); + void Streams_Finish_Conformance(); + virtual string CreateElementName(); + void IsTruncated(int64u ExpectedSize = (int64u)-1, bool MoreThan = false, const char* Prefix = nullptr); + void RanOutOfData(const char* Prefix = nullptr); + void SynchLost(const char* Prefix = nullptr); + #else //MEDIAINFO_CONFORMANCE + void Fill_Conformance(const char* Field, const char* Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error, stream_t StreamKind = Stream_General, size_t StreamPos = 0) {} + void Fill_Conformance(const char* Field, const string& Value, uint8_t Flags = {}, conformance_type Level = Conformance_Error) { Fill_Conformance(Field, Value.c_str(), Flags, Level); } + void Clear_Conformance() {} + void Merge_Conformance(bool FromConfig = false) {} + void Streams_Finish_Conformance() {} + string CreateElementName() { return {}; } + void IsTruncated(int64u ExpectedSize = (int64u)-1, bool MoreThan = false, const char* = nullptr) {} + void RanOutOfData(const char* = nullptr) { Trusted_IsNot(); } + void SynchLost(const char* = nullptr) { Trusted_IsNot(); } + #endif //MEDIAINFO_CONFORMANCE + #if MEDIAINFO_SEEK private: bool Seek_Duration_Detected; diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams.cpp b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams.cpp index 3a1cff9514..36f28180ae 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams.cpp @@ -546,7 +546,10 @@ void File__Analyze::dvcC(bool has_dependency_pid, std::map* Skip_BS(Data_BS_Remain()-End, "reserved"); } else + { dv_bl_signal_compatibility_id=0; + dv_md_compression=0; + } BS_End(); } Skip_XX(Element_Size-Element_Offset, "Unknown"); @@ -1885,7 +1888,7 @@ void File__Analyze::Fill_SetOptions(stream_t StreamKind, size_t StreamPos, const return; //Handle Value before StreamKind - if (!Status[IsAccepted] || StreamKind==Stream_Max || StreamPos>=(*Stream)[StreamKind].size()) + if (StreamKind==Stream_Max || StreamPos>=(*Stream)[StreamKind].size()) { Fill_Temp_Options[StreamKind][Parameter]=Options; return; //No streams diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp index 826f26d12f..5187df9e1f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/File__Analyze_Streams_Finish.cpp @@ -1446,7 +1446,7 @@ void File__Analyze::Streams_Finish_StreamOnly_Audio(size_t Pos) if (Audio_Begin!=List[2].size()) { for (size_t j=0; j<6; j++) - if (!List[j].empty()) + if (!List[j].empty() && Audio_Begin+iOpen_Buffer_Finalize(); - #if MEDIAINFO_TRACE - Details=Parser[0]->Details; - #endif //MEDIAINFO_TRACE -} - //*************************************************************************** // Buffer - Global //*************************************************************************** @@ -847,6 +842,10 @@ void File__MultipleParsing::Read_Buffer_Unsynched() //--------------------------------------------------------------------------- void File__MultipleParsing::Read_Buffer_Continue() { + //Position if requested (reset of value after it was set in the previous call) + if (Parser.size()==1 && Parser[0]->File_GoTo!=(int64u)-1) + Parser[0]->File_GoTo=File_GoTo; + //Parsing for (size_t Pos=0; PosStatus[IsAccepted]) - Status[IsAccepted]=true; + Accept(); if (!Status[IsFilled] && Parser[Pos]->Status[IsFilled]) - Status[IsFilled]=true; + Fill(); if (!Status[IsUpdated] && Parser[Pos]->Status[IsUpdated]) - Status[IsUpdated]=true; + Update(); if (!Status[IsFinished] && Parser[Pos]->Status[IsFinished]) - Status[IsFinished]=true; + Finish(); - //Positionning if requested - if (Parser[0]->File_GoTo!=(int64u)-1) - File_GoTo=Parser[0]->File_GoTo; + //Seek if requested + if (Parser[0]->File_GoToFile_GoTo; + else if (Parser[0]->File_GoTo==File_Size && File_Size!=(int64u)-1) + { + delete Parser[0]; + Parser.clear(); + } //Clean #if MEDIAINFO_TRACE @@ -905,6 +903,14 @@ void File__MultipleParsing::Read_Buffer_Continue() } } } + + if (Parser.empty()) + { + File__Analyze* Temp=new File_Unknown(); Parser.push_back(Temp); + Read_Buffer_Init(); + Accept(); + Finish(); + } } } //NameSpace diff --git a/src/ExtLib/MediaInfo/MediaInfo/File__MultipleParsing.h b/src/ExtLib/MediaInfo/MediaInfo/File__MultipleParsing.h index 56283b3efe..accb838000 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/File__MultipleParsing.h +++ b/src/ExtLib/MediaInfo/MediaInfo/File__MultipleParsing.h @@ -37,9 +37,6 @@ public : ~File__MultipleParsing(); private : - //Streams management - void Streams_Finish(); - //Buffer - Global void Read_Buffer_Init(); void Read_Buffer_Unsynched(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Image/File_Bmp.cpp b/src/ExtLib/MediaInfo/MediaInfo/Image/File_Bmp.cpp index ce2b19ed69..f4cc1b51aa 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Image/File_Bmp.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Image/File_Bmp.cpp @@ -41,19 +41,16 @@ namespace MediaInfoLib //*************************************************************************** //--------------------------------------------------------------------------- -static const char* Bmp_CompressionMethod(int32u CompressionMethod) +static const char* Bmp_CompressionMethod[] { - switch(CompressionMethod) - { - case 0 : return "RGB"; - case 1 : return "RLE8"; - case 2 : return "RLE4"; - case 3 : return "Bit field"; - case 4 : return "JPEG"; - case 5 : return "PNG"; - default: return ""; - } -} + "Raw", + "RLE8", + "RLE4", + "Bit field", + "JPEG", + "PNG", +}; +static const size_t Bmp_CompressionMethod_Size=sizeof(Bmp_CompressionMethod)/sizeof(Bmp_CompressionMethod[0]); //*************************************************************************** // Static stuff @@ -208,7 +205,7 @@ void File_Bmp::BitmapInfoHeader(int8u Version) Get_L4 (Height, "Height"); Skip_L2( "Color planes"); Get_L2 (BitsPerPixel, "Bits per pixel"); - Get_L4 (CompressionMethod, "Compression method"); Param_Info1(Bmp_CompressionMethod(CompressionMethod)); + Get_L4 (CompressionMethod, "Compression method"); Param_Info1C(CompressionMethod1) diff --git a/src/ExtLib/MediaInfo/MediaInfo/Image/File_Jpeg.cpp b/src/ExtLib/MediaInfo/MediaInfo/Image/File_Jpeg.cpp index 86483efe99..05ae2c51f1 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Image/File_Jpeg.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Image/File_Jpeg.cpp @@ -231,6 +231,7 @@ File_Jpeg::File_Jpeg() //In StreamKind=Stream_Image; Interlaced=false; + MxfContentKind=(int8u)-1; #if MEDIAINFO_DEMUX FrameRate=0; #endif //MEDIAINFO_DEMUX @@ -730,6 +731,22 @@ void File_Jpeg::SIZ() FILLING_BEGIN_PRECISE(); if (Frame_Count==0 && Field_Count==0) { + if (IsSub && !Interlaced && MxfContentKind<=1) + { + //Checking if a 2nd field is present + size_t Size=(size_t)(Buffer_Offset+Element_Size); + if (SizeMinFileSizeCheck && Image_Width_*Image_Height_*(Pixel_Depth>>3)second.size(); i++) + { + auto Offset=Info->second[i].To_int64u(); + if (ExpectedFileSizesecond.size()) + { + ExpectedFileSize+=Info->second[ExpectedFileSize_Pos].To_int64u(); + } + } + + if (ExpectedFileSize>File_Size) + IsTruncated(ExpectedFileSize, false, "TIFF"); + } } //*************************************************************************** @@ -558,6 +586,9 @@ void File_Tiff::Read_Directory() int32u IFDOffset; Get_X4 (IFDOffset, "IFDOffset"); IfdItems[IFDOffset]=IfdItem; + auto End=IFDOffset+Size; + if (ExpectedFileSize infos; //Key is Tag value infos Infos; + int64u ExpectedFileSize; bool LittleEndian; #if defined(MEDIAINFO_ICC_YES) File__Analyze* ICC_Parser; diff --git a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config.cpp b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config.cpp index 8a4bae43b3..9a6f96071d 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config.cpp @@ -137,7 +137,7 @@ namespace MediaInfoLib { //--------------------------------------------------------------------------- -const Char* MediaInfo_Version=__T("MediaInfoLib - v24.03"); +const Char* MediaInfo_Version=__T("MediaInfoLib - v24.05"); const Char* MediaInfo_Url=__T("http://MediaArea.net/MediaInfo"); Ztring EmptyZtring; //Use it when we can't return a reference to a true Ztring const Ztring EmptyZtring_Const; //Use it when we can't return a reference to a true Ztring, const version @@ -1673,7 +1673,6 @@ Ztring MediaInfo_Config::Option (const String &Option, const String &Value_Raw) return __T("conformance features are disabled due to compilation options"); #endif // MEDIAINFO_CONFORMANCE } - if (Option_Lower==__T("info_canhandleurls")) { #if defined(MEDIAINFO_LIBCURL_YES) @@ -3029,7 +3028,7 @@ const Ztring MediaInfo_Config::Iso639_Translate (const Ztring &Value) void MediaInfo_Config::Language_Set_Internal(stream_t KindOfStream) { //Loading codec table if not yet done - if (Info[KindOfStream].empty()) + if (KindOfStream1 && Name.back()==__T('_')) + { + auto Last2=Name[Name.size()-2]; + if (Last2>='0' && Last2<='9') + Name.pop_back(); + } + auto& Number=Numbers[i]; + if (Number) + Name+=MediaInfoLib::Config.Language_Get(__T(" Config_Text_NumberTag"))+Ztring::ToZtring(Number); } Names.Separator_Set(0, __T(" ")); Names.Quote_Set(__T("")); @@ -3573,6 +3602,183 @@ bool MediaInfo_Config_MediaInfo::File_Eia708_DisplayEmptyStream_Get () return File_Eia708_DisplayEmptyStream; } +//--------------------------------------------------------------------------- +void MediaInfo_Config_MediaInfo::File_CommandOnlyMeansEmpty_Set (bool NewValue) +{ + CriticalSectionLocker CSL(CS); + File_CommandOnlyMeansEmpty=NewValue; +} + +bool MediaInfo_Config_MediaInfo::File_CommandOnlyMeansEmpty_Get () +{ + CriticalSectionLocker CSL(CS); + return File_CommandOnlyMeansEmpty; +} + +//--------------------------------------------------------------------------- +Ztring MediaInfo_Config_MediaInfo::File_ProbeCaption_Set (const Ztring& NewValue) +{ + static const auto Malformed = __T("File_ProbeCaption option malformed"); + ZtringListList List; + List.Separator_Set(0, __T(",")); + List.Separator_Set(1, __T("+")); + List.Write(NewValue); + CriticalSectionLocker CSL(CS); + File_ProbeCaption.clear(); + bool HasForAll = false; + string AllMinus; + for (const auto& Line : List) { + config_probe Item; + for (const auto& Value : Line) { + auto Pos = Value.find_first_not_of(__T("0123456789")); + if (Pos == string::npos) { + Item.Start_Type = config_probe_size; + Item.Start = Value.To_int64u(); + } + else if (!Value.empty() && ((Value[0] >= __T('A') && Value[0] <= __T('Z')) || (Value[0] >= __T('a') && Value[0] <= __T('z')))) { + string Value2(Ztring(Value).MakeUpperCase().To_UTF8()); + bool Negative = false; + if (Value2.rfind("ALL", 0) == 0) { + if (Value2.size() > 3) { + if (Value2[3] != __T('-')) + return Malformed; + Negative = true; + Value2 = Value.To_UTF8().substr(4); + AllMinus += '-'; + AllMinus += Value2; + } + } + if (Value2 != "MP4" && Value2 != "MPEG-4" && Value2 != "MXF" && !Value2.empty()) { //TODO: full list + return Malformed; + } + Item.Parser = Value2 != "MP4" ? Value2 : "MPEG-4"; + if (Negative) { + Item.Parser.insert(Item.Parser.begin(), __T('-')); + } + } + else if (Pos == Value.size() - 1 && Value[Pos] == __T('%')) { + auto Value_Int = Value.To_int64u(); + if (Value_Int > 100) { + return Malformed; + } + if (Item.Start_Type == config_probe_none) { + Item.Start_Type = config_probe_percent; + Item.Start = Value_Int; + } + else if (Item.Duration_Type == config_probe_none) { + Item.Duration_Type = config_probe_percent; + Item.Duration = Value_Int; + } + else { + return Malformed; + } + } + else if (Pos == Value.size() - 1 && (Value[Pos] == __T('E') || Value[Pos] == __T('G') || Value[Pos] == __T('K') || Value[Pos] == __T('M') || Value[Pos] == __T('P') || Value[Pos] == __T('T') || Value[Pos] == __T('k'))) { + auto Value_Int = Value.To_int64u(); + switch (Value[Pos]) + { + case 'E': + Value_Int <<= 10; + // Fall through + case 'P': + Value_Int <<= 10; + // Fall through + case 'T': + Value_Int <<= 10; + // Fall through + case 'G': + Value_Int <<= 10; + // Fall through + case 'M': + Value_Int <<= 10; + // Fall through + default: + Value_Int <<= 10; + } + if (Item.Start_Type == config_probe_none) { + Item.Start_Type = config_probe_size; + Item.Start = Value_Int; + } + else if (Item.Duration_Type == config_probe_none) { + Item.Duration_Type = config_probe_size; + Item.Duration = Value_Int; + } + else { + return Malformed; + } + } + else { + TimeCode TC(Value.To_UTF8(), 999); + if (!TC.IsValid()) { + return Malformed; + } + auto Seconds = TC.ToSeconds(); + if (Seconds <= 0) { + return Malformed; + } + if (Item.Start_Type == config_probe_none) { + Item.Start_Type = config_probe_dur; + Item.Start = Seconds; + } + else if (Item.Duration_Type == config_probe_none) { + Item.Duration_Type = config_probe_dur; + Item.Duration = Seconds; + } + else { + return Malformed; + } + } + } + if (Item.Parser.empty()) { + HasForAll=true; + } + if (Item.Duration_Type == config_probe_none) { + Item.Duration_Type = config_probe_dur; + Item.Duration = 30; + } + File_ProbeCaption.push_back(Item); + } + File_ProbeCaption_Pos=0; + if (!HasForAll) { + config_probe Probe; + Probe.Start_Type = config_probe_percent; + Probe.Start = 50; + Probe.Duration_Type = config_probe_dur; + Probe.Duration = 30; + Probe.Parser = AllMinus; + File_ProbeCaption.push_back(Probe); + } + + return {}; +} + +config_probe MediaInfo_Config_MediaInfo::File_ProbeCaption_Get(const string& ParserName) +{ + if (ParseSpeed<=0 && ParseSpeed>=1) + return {}; + + CriticalSectionLocker CSL(CS); + for (;;) + { + if (File_ProbeCaption_Pos >= File_ProbeCaption.size()) + return {}; + const auto& Item = File_ProbeCaption[File_ProbeCaption_Pos]; + File_ProbeCaption_Pos++; + if (Item.Parser.empty()) { + if (Item.Parser[0] == '-') { + if (Item.Parser.rfind(ParserName, 1) == 1) { + continue; + } + } + } + else if (Item.Parser != ParserName) { + continue; + } + + return Item; + } +} + //--------------------------------------------------------------------------- #if defined(MEDIAINFO_AC3_YES) void MediaInfo_Config_MediaInfo::File_Ac3_IgnoreCrc_Set (bool NewValue) diff --git a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h index b4cf6efe28..aab78de8ad 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h +++ b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Config_MediaInfo.h @@ -68,6 +68,22 @@ enum encryption_padding }; #endif //MEDIAINFO_AES +enum config_probe_type +{ + config_probe_none, + config_probe_size, + config_probe_dur, + config_probe_percent, +}; +struct config_probe +{ + config_probe_type Start_Type=config_probe_none; + config_probe_type Duration_Type=config_probe_none; + int64u Start=0; + int64u Duration=0; + string Parser; +}; + //*************************************************************************** // Class MediaInfo_Config_MediaInfo //*************************************************************************** @@ -375,6 +391,10 @@ public : bool File_Eia608_DisplayEmptyStream_Get (); void File_Eia708_DisplayEmptyStream_Set (bool NewValue); bool File_Eia708_DisplayEmptyStream_Get (); + void File_CommandOnlyMeansEmpty_Set(bool NewValue); + bool File_CommandOnlyMeansEmpty_Get(); + Ztring File_ProbeCaption_Set(const Ztring& NewValue); + config_probe File_ProbeCaption_Get(const string& Parser); #if defined(MEDIAINFO_AC3_YES) void File_Ac3_IgnoreCrc_Set (bool NewValue); bool File_Ac3_IgnoreCrc_Get (); @@ -609,6 +629,9 @@ private : #endif //defined(MEDIAINFO_LIBMMS_YES) bool File_Eia608_DisplayEmptyStream; bool File_Eia708_DisplayEmptyStream; + bool File_CommandOnlyMeansEmpty; + std::vector File_ProbeCaption; + size_t File_ProbeCaption_Pos; #if defined(MEDIAINFO_AC3_YES) bool File_Ac3_IgnoreCrc; #endif //defined(MEDIAINFO_AC3_YES) diff --git a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_File.cpp b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_File.cpp index d387d0af83..2d2903c67a 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_File.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_File.cpp @@ -1077,9 +1077,6 @@ int MediaInfo_Internal::ListFormats(const String &File_Name) #if defined(MEDIAINFO_MPCSV8_YES) delete Info; Info=new File_MpcSv8(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; #endif - #if defined(MEDIAINFO_MPEGA_YES) - delete Info; Info=new File_Mpega(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; - #endif #if defined(MEDIAINFO_OPENMG_YES) delete Info; Info=new File_OpenMG(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; #endif @@ -1210,6 +1207,9 @@ int MediaInfo_Internal::ListFormats(const String &File_Name) #endif //At the end, too much sensible + #if defined(MEDIAINFO_MPEGA_YES) + delete Info; Info=new File_Mpega(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; + #endif #if defined(MEDIAINFO_TGA_YES) delete Info; Info=new File_Tga(); if (((Reader_File*)Reader)->Format_Test_PerParser(this, File_Name)>0) return 1; //At the end, too much sensible #endif diff --git a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Inform.cpp b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Inform.cpp index 151e7da9dc..5c921789ef 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Inform.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/MediaInfo_Inform.cpp @@ -791,9 +791,9 @@ Ztring MediaInfo_Internal::Inform (stream_t StreamKind, size_t StreamPos, bool I size_t Space=SubName.rfind(' '); if (Space!=(size_t)-1) SubName.erase(0, Space+1); - size_t NumbersPos=SubName.find_first_of("0123456789"); + size_t NumbersPos=SubName.find_last_not_of("0123456789"); if (NumbersPos!=(size_t)-1) - SubName.resize(NumbersPos); + SubName.resize(NumbersPos+1); if (XML_0_7_78 || JSON) SubName=Xml_Name_Escape_0_7_78(Ztring().From_UTF8(SubName)).To_UTF8(); else diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp index 68cfb59280..fd7562a4e3 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.cpp @@ -233,7 +233,6 @@ File_DvDif::File_DvDif() Demux_Level=3; //Container and Stream #endif //MEDIAINFO_DEMUX MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; //In Frame_Count_Valid=IsSub?1:2; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.h index 2673c92a9c..e28009ccc7 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_DvDif.h @@ -32,7 +32,6 @@ class File_DvDif : public File__Analyze public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; int8u AuxToAnalyze; //Only Aux must be parsed bool IgnoreAudio; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.cpp index 964d15350e..71d55f54c2 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.cpp @@ -329,12 +329,66 @@ static const char* Flv_VP6_Version2[]= "VP6.1/6.2", }; +enum flv_FrameType { + Reserved0, + KeyFrame, + InterFrame, + DisposableInterFrame, + GeneratedKeyFrame, + Command, +}; static const char* Flv_FrameType[]= { "", "KeyFrame", "InterFrame", "InterFrame (Disposable)", + "KeyFrame (Generated)", + "Command", + "", + "", +}; + +enum flv_PacketType { + SequenceStart, + CodedFrames, + SequenceEnd, + CodedFramesX, + Metadata, + MPEG2TSSequenceStart, + Multitrack, +}; +static const char* Flv_PacketType[] = +{ + "SequenceStart", + "CodedFrames", + "SequenceEnd", + "CodedFramesX", + "Metadata", + "MPEG2TSSequenceStart", + "Multitrack", + "", + "", + "", + "", + "", + "", + "", + "", + "", +}; + +enum flv_MultiTrackType { + OneTrack, + ManyTracks, + ManyTracksManyCodecs, +}; +static const char* Flv_MultitrackType[] = +{ + "OneTrack", + "ManyTracks", + "ManyTracksManyCodecs", + "", "", "", "", @@ -937,11 +991,36 @@ void File_Flv::video() return; //No more need of Video stream //Parsing + int32u videoFourCc=0; int8u Codec, FrameType; + int8u PacketType = 0; Element_Begin1("Stream header"); BS_Begin(); - Get_S1 (4, FrameType, "frameType"); Param_Info1(Flv_FrameType[FrameType]); + Peek_S1(4, FrameType); + auto isExVideoHeader=FrameType>>3; + if (isExVideoHeader) + { + FrameType&=0x7; + Skip_SB( "isExVideoHeader"); + Skip_S1(3, "videoFrameType"); Param_Info1(Flv_FrameType[FrameType]); + Get_S1 (4, PacketType, "videoPacketType"); Param_Info1(Flv_PacketType[PacketType]); + if (PacketType!=Metadata && FrameType==Command) + Skip_S1(8, "videoCommand"); + else if (PacketType==Multitrack) + { + int8u MultitrackType; + Get_S1 (4, MultitrackType, "AvMultitrackType"); Param_Info1(Flv_MultitrackType[MultitrackType]); + Get_S1 (4, PacketType, "videoPacketType"); Param_Info1(Flv_PacketType[PacketType]); + } + BS_End(); + Get_C4 (videoFourCc, "videoFourCc"); // The first one if ManyTracksManyCodecs + BS_Begin(); + } + else + { + Skip_S1(4, "frameType"); Param_Info1(Flv_FrameType[FrameType]); Get_S1 (4, Codec, "codecID"); Param_Info1(Flv_Codec_Video[Codec]); Element_Info1(Flv_Codec_Video[Codec]); + } BS_End(); Element_End0(); @@ -951,15 +1030,31 @@ void File_Flv::video() { if (Count_Get(Stream_Video)==0) File__Analyze::Stream_Prepare(Stream_Video); - Fill(Stream_Video, 0, Video_Format, Flv_Format_Video[Codec]); - Fill(Stream_Video, 0, Video_Format_Profile, Flv_Format_Profile_Video[Codec]); - Fill(Stream_Video, 0, Video_Codec, Flv_Codec_Video[Codec]); - Fill(Stream_Video, 0, Video_CodecID, Codec); - Fill(Stream_Video, 0, Video_CodecID_Hint, Flv_CodecID_Hint_Video[Codec]); + if (isExVideoHeader) + { + CodecID_Fill(Ztring().From_CC4(videoFourCc), Stream_Video, 0, InfoCodecID_Format_Mpeg4); + } + else + { + Fill(Stream_Video, 0, Video_Format, Flv_Format_Video[Codec]); + Fill(Stream_Video, 0, Video_Format_Profile, Flv_Format_Profile_Video[Codec]); + Fill(Stream_Video, 0, Video_Codec, Flv_Codec_Video[Codec]); + Fill(Stream_Video, 0, Video_CodecID, Codec); + Fill(Stream_Video, 0, Video_CodecID_Hint, Flv_CodecID_Hint_Video[Codec]); + } Fill(Stream_Video, 0, Video_BitDepth, 8); //FLV is not known to support another bit depth MustSynchronize=true; // Now, synchronization test is possible } + if (isExVideoHeader) + { + switch (videoFourCc) + { + case 0x61766331: Codec= 7; break; //AVC + case 0x68766331: Codec=12; break; //HEVC + default: Codec=(int8u)-1; + } + } //Parsing video data switch (Codec) @@ -969,8 +1064,8 @@ void File_Flv::video() case 4 : video_VP6(false); break; case 5 : video_VP6(true); break; case 6 : video_ScreenVideo(2); break; - case 7 : video_AVC(); break; - case 12 : video_HEVC(); break; + case 7 : video_AVC(PacketType+isExVideoHeader); break; + case 12 : video_HEVC(PacketType+isExVideoHeader); break; default : Skip_XX(Element_Size-Element_Offset, "Unknown"); video_stream_Count=false; //No more need of Video stream; } @@ -1108,11 +1203,27 @@ void File_Flv::video_VP6(bool WithAlpha) } //--------------------------------------------------------------------------- -void File_Flv::video_AVC() +void File_Flv::video_AVC(int8u PacketType_plus1) { int8u AVCPacketType; + if (PacketType_plus1) + { + switch (PacketType_plus1) + { + case SequenceStart+1: AVCPacketType=0; break; + case CodedFrames+1: + case CodedFramesX+1: AVCPacketType=1; break; + default: AVCPacketType=-1; + } + } + else + { Get_B1 (AVCPacketType, "AVCPacketType"); Param_Info1(Flv_AVCPacketType(AVCPacketType)); + } + if (!PacketType_plus1 || PacketType_plus1==CodedFrames-1) + { Info_B3(CompositionTime, "CompositionTime"); Param_Info1(Ztring::ToZtring((int32s)(CompositionTime+0xFF000000))); + } switch (AVCPacketType) { @@ -1122,6 +1233,7 @@ void File_Flv::video_AVC() { Stream[Stream_Video].Parser=new File_Avc; Open_Buffer_Init(Stream[Stream_Video].Parser); + ((File_Avc*)Stream[Stream_Video].Parser)->FrameIsAlwaysComplete=true; ((File_Avc*)Stream[Stream_Video].Parser)->MustParse_SPS_PPS=true; ((File_Avc*)Stream[Stream_Video].Parser)->SizedBlocks=true; ((File_Avc*)Stream[Stream_Video].Parser)->MustSynchronize=false; @@ -1190,11 +1302,27 @@ void File_Flv::video_AVC() } //--------------------------------------------------------------------------- -void File_Flv::video_HEVC() +void File_Flv::video_HEVC(int8u PacketType_plus1) { int8u AVCPacketType; + if (PacketType_plus1) + { + switch (PacketType_plus1) + { + case SequenceStart+1: AVCPacketType=0; break; + case CodedFrames+1: + case CodedFramesX+1: AVCPacketType=1; break; + default: AVCPacketType=-1; + } + } + else + { Get_B1 (AVCPacketType, "AVCPacketType"); Param_Info1(Flv_AVCPacketType(AVCPacketType)); + } + if (!PacketType_plus1 || PacketType_plus1==CodedFrames-1) + { Info_B3(CompositionTime, "CompositionTime"); Param_Info1(Ztring::ToZtring((int32s)(CompositionTime+0xFF000000))); + } switch (AVCPacketType) { diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.h index 15e574d9f3..82505083bf 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Flv.h @@ -58,8 +58,8 @@ private : void video_H263(); void video_ScreenVideo(int8u Version); void video_VP6(bool WithAlpha); - void video_AVC(); - void video_HEVC(); + void video_AVC(int8u PacketType_plus1); + void video_HEVC(int8u PacketType_plus1); void audio(); void audio_MPEG(); void audio_AAC(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp index c2385df612..e686643e62 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Gxf.cpp @@ -217,7 +217,6 @@ File_Gxf::File_Gxf() Demux_Level=2; //Container #endif //MEDIAINFO_DEMUX MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser #if MEDIAINFO_DEMUX Demux_EventWasSent_Accept_Specific=true; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp index 93ed2e32c1..485c211bd6 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ivf.cpp @@ -114,7 +114,8 @@ void File_Ivf::FileHeader_Parse() { Stream_Prepare(Stream_Video); CodecID_Fill(Ztring().From_CC4(fourcc), Stream_Video, 0, InfoCodecID_Format_Riff); - Fill(Stream_Video, 0, Video_FrameRate, (float)frame_rate_num / frame_rate_den); + if (frame_rate_den) + Fill(Stream_Video, 0, Video_FrameRate, (float)frame_rate_num / frame_rate_den); Fill(Stream_Video, 0, Video_FrameCount, frame_count); Fill(Stream_Video, 0, Video_Width, width); Fill(Stream_Video, 0, Video_Height, height); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mk.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mk.cpp index 8c8b9a4ede..f80924360f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mk.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mk.cpp @@ -1654,7 +1654,7 @@ void File_Mk::Header_Parse() { Param_Error("TRUNCATED-ELEMENT:1"); if (Element_Level<=2) - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+Element_Offset+Size, true, "Matroska"); } //Should we parse Cluster? diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp index c23445a121..19465791d7 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.cpp @@ -2223,7 +2223,7 @@ void File_Mpeg4::Header_Parse() //Incoherencies if (Element_Level<=2 && File_Offset+Buffer_Offset+Size>File_Size) - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+Size, false, "MPEG-4"); } //--------------------------------------------------------------------------- @@ -2589,6 +2589,8 @@ bool File_Mpeg4::BookMark_Needed() else mdat_Pos_Temp2.Size = *stsz_Current; mdat_Pos.push_back(mdat_Pos_Temp2); + if (Temp->second.IsCaption) + mdat_Pos_Caption.push_back(mdat_Pos_Temp2); Chunk_Offset += *stsz_Current; stsz_Current++; if (stsz_Current2) @@ -2607,6 +2609,8 @@ bool File_Mpeg4::BookMark_Needed() mdat_Pos_Temp2.StreamID = Temp->first; mdat_Pos_Temp2.Size = stsc_Current->SamplesPerChunk*Temp->second.stsz_Sample_Size*Temp->second.stsz_Sample_Multiplier; mdat_Pos.push_back(mdat_Pos_Temp2); + if (Temp->second.IsCaption) + mdat_Pos_Caption.push_back(mdat_Pos_Temp2); #if MEDIAINFO_DEMUX if (Temp_stts_Durations.empty() || stsc_Current->SamplesPerChunk != Temp_stts_Durations[Temp_stts_Durations.size() - 1].SampleDuration) @@ -2658,6 +2662,8 @@ bool File_Mpeg4::BookMark_Needed() if (Temp->second.FirstUsedOffset==(int64u)-1) Temp->second.FirstUsedOffset=mdat_Pos_Temp2.Offset; mdat_Pos.push_back(mdat_Pos_Temp2); + if (Temp->second.IsCaption) + mdat_Pos_Caption.push_back(mdat_Pos_Temp2); } Chunk_Offset += Size; if (Chunk_Offset >= File_Size) @@ -2667,7 +2673,7 @@ bool File_Mpeg4::BookMark_Needed() } Chunk_FrameCount++; } - if (!Temp->second.TimeCode && Chunk_FrameCount >= FrameCount_MaxPerStream) + if (!Temp->second.TimeCode && !Temp->second.IsCaption && Chunk_FrameCount >= FrameCount_MaxPerStream) break; } @@ -2981,6 +2987,28 @@ bool File_Mpeg4::BookMark_Needed() return false; //We do not want to use the bookmark feature, only detect the end of the file } + +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +string File_Mpeg4::CreateElementName() +{ + if (IsParsing_mdat) { + return "mdat"; + } + string Result; + for (size_t i = 1; i < Element_Level; i++) { + Result += Ztring().From_CC4(Element[i].Code).Trim().To_UTF8(); + if (Result.back() >= '0' && Result.back() <= '9') { + Result += '_'; + } + Result += __T(' '); + } + if (!Result.empty()) + Result.pop_back(); + return Result; +} +#endif + //--------------------------------------------------------------------------- //Get language string from 2CC Ztring File_Mpeg4::Language_Get(int16u Language) diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h index 67b0bc0e3e..b9803cd9b4 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mpeg4.h @@ -68,6 +68,10 @@ private : void Data_Parse(); bool BookMark_Needed(); + #if MEDIAINFO_CONFORMANCE + string CreateElementName(); + #endif //MEDIAINFO_CONFORMANCE + //Elements void bloc(); void cdat(); @@ -454,6 +458,19 @@ private : int16u channelcount; int8u Version_Temp; //Used when box version must be provided to nested boxes + struct mdat_Pos_Type + { + int64u Offset; + int64u Size; + int32u StreamID; + int32u Reserved1; + int64u Reserved2; + bool operator<(const mdat_Pos_Type& r) const + { + return Offset mdat_Pos; std::vector CC; std::vector CCFor; std::vector FallBackTo; @@ -628,6 +647,7 @@ private : HasForcedSamples=false; AllForcedSamples=false; IsImage=false; + IsCaption=false; tkhd_Found=false; CleanAperture_Width=0; CleanAperture_Height=0; @@ -679,18 +699,6 @@ private : size_t* File_Buffer_Size_Hint_Pointer; //Positions - struct mdat_Pos_Type - { - int64u Offset; - int64u Size; - int32u StreamID; - int32u Reserved1; - int64u Reserved2; - bool operator<(const mdat_Pos_Type& r) const - { - return Offset mdat_pos; static bool mdat_pos_sort (const File_Mpeg4::mdat_Pos_Type &i,const File_Mpeg4::mdat_Pos_Type &j) { return (i.OffsetParseSpeed<=-1 && !Streams.empty()) { if (File_Offset+Buffer_Offset+Element_TotalSize_Get()>File_Size) - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+Element_TotalSize_Get(), true, "MPEG-4"); Finish(); return; } @@ -2171,8 +2171,86 @@ void File_Mpeg4::mdat_xxxx() if (mdat_Pos_Item->StreamID!=(int32u)Element_Code) mdat_Pos_New.push_back(*mdat_Pos_Item); } - mdat_Pos=std::move(mdat_Pos_New); - std::sort(mdat_Pos.begin(), mdat_Pos.end(), &mdat_pos_sort); + if (!mdat_Pos_New.empty()) + { + mdat_Pos=std::move(mdat_Pos_New); + std::sort(mdat_Pos.begin(), mdat_Pos.end(), &mdat_pos_sort); + } + else + { + mdat_Pos=move(mdat_Pos_Caption); + std::sort(mdat_Pos.begin(), mdat_Pos.end(), &mdat_pos_sort); + size_t mdat_Pos_Min=(size_t)-1; + size_t mdat_Pos_Max=0; + for (auto& Stream : Streams) + { + if (Stream.second.IsCaption) + { + Stream.second.Parsers.front()->Open_Buffer_Unsynch(); + int64u ProbeCaption_mdatPos=(int64u)-1; + int64u ProbeCaption_mdatDur=(int64u)-1; + if (Stream.second.stts_Duration && Stream.second.stts_FrameCount && Stream.second.mdhd_TimeScale) + { + auto FrameRateRatio=(float)Stream.second.stts_Duration/Stream.second.stts_FrameCount; + auto FrameRate=Stream.second.mdhd_TimeScale/FrameRateRatio; + auto Duration=(float)Stream.second.stts_Duration/Stream.second.mdhd_TimeScale; + if (FrameRate) + { + auto Probe=Config->File_ProbeCaption_Get(ParserName); + switch (Probe.Start_Type) { + case config_probe_dur: + ProbeCaption_mdatPos=Probe.Start*FrameRate; + break; + case config_probe_size: + Probe.Start=Probe.Start*100/File_Size; //File pos is not relevant there + if (!Probe.Start) + Probe.Start=50; + // Fall through + case config_probe_percent: + ProbeCaption_mdatPos=Stream.second.stts_FrameCount*Probe.Start/100; + break; + } + switch (Probe.Duration_Type) { + case config_probe_dur: + ProbeCaption_mdatDur=Probe.Duration*FrameRate; + break; + case config_probe_size: + Probe.Duration=Probe.Duration*100/File_Size; //File pos is not relevant there + if (!Probe.Duration) + Probe.Duration++; + // Fall through + case config_probe_percent: + ProbeCaption_mdatDur=Stream.second.stts_FrameCount*Probe.Duration/100; + break; + } + } + } + if (ProbeCaption_mdatPos!=(int64u)-1 && ProbeCaption_mdatDur!=(int64u)-1) + { + size_t mdat_Pos_PerStream=0; + auto ProbeCaption_mdatPosEnd=ProbeCaption_mdatPos+ProbeCaption_mdatDur; + for (size_t i=0; ii) + mdat_Pos_Min=i; + if (mdat_Pos_PerStream==ProbeCaption_mdatPosEnd && mdat_Pos_Max<=i) + mdat_Pos_Max=i+1; + } + } + } + else + mdat_Pos_Max=0; + } + } + if (mdat_Pos_Maxsecond.stsz_StreamSize+=sample_size; Stream->second.stsz_Total.push_back(sample_size); - if (Stream->second.stsz.size()second.TimeCode) + if (Stream->second.stsz.size()second.TimeCode || Streams[moov_trak_tkhd_TrackID].IsCaption) Stream->second.stsz.push_back(sample_size); if (Stream->second.StreamKind==Stream_Text && sample_size>2) Stream->second.stsz_MoreThan2_Count++; @@ -4920,7 +4998,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_co64() return; std::vector &stco=Streams[moov_trak_tkhd_TrackID].stco; - stco.resize((CountElement_Size) break; //Problem @@ -5682,7 +5760,8 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxSound() int64s SampleRate=0; int32u Channels=0, SampleSize=0, Flags=0; int16u Version=0, ID; - if (!IsQt()) // like ISO MP4 + Peek_B2(Version); + if (!IsQt() && (Version_Temp || !Version)) // like ISO MP4, and some buggy files have Qt style but at the same time entry_version=1 is forbidden is stst version is not 1 { if (Version_Temp>1) { @@ -5716,7 +5795,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxSound() } else { - Get_B2 (Version, "Version"); + Skip_B2( "Version"); Skip_B2( "Revision level"); Skip_C4( "Vendor"); if (Version<2) // Version 0 or 1 @@ -6138,6 +6217,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxText() //Creating the parser File_Mpeg4* Parser=new File_Mpeg4; Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser); + Streams[moov_trak_tkhd_TrackID].IsCaption=true; } #if defined(MEDIAINFO_CDP_YES) if (MediaInfoLib::Config.CodecID_Get(Stream_Text, InfoCodecID_Format_Mpeg4, CodecID, InfoCodecID_Format)==__T("EIA-708")) @@ -6147,6 +6227,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsd_xxxxText() Parser->WithAppleHeader=true; Parser->AspectRatio=((float)16)/9; //TODO: this is hardcoded, must adapt it to the real video aspect ratio Streams[moov_trak_tkhd_TrackID].Parsers.push_back(Parser); + Streams[moov_trak_tkhd_TrackID].IsCaption=true; } #endif #if defined(MEDIAINFO_TTML_YES) @@ -8608,7 +8689,7 @@ void File_Mpeg4::moov_trak_mdia_minf_stbl_stsz() Stream->second.stsz_StreamSize+=Size; Stream->second.stsz_Total.push_back(Size); - if (Possecond.TimeCode) + if (Possecond.TimeCode || Streams[moov_trak_tkhd_TrackID].IsCaption) Stream->second.stsz.push_back(Size); if (IsTimedText && Size>2) TimedText_Count++; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp index ee733a461b..33640c1c60 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegPs.cpp @@ -200,7 +200,6 @@ File_MpegPs::File_MpegPs() Trace_Layers_Update(0); //Container1 #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser Trusted_Multiplier=2; @@ -875,10 +874,19 @@ bool File_MpegPs::Synched_Test() if (Buffer[Buffer_Offset ]!=0x00 || Buffer[Buffer_Offset+1]!=0x00 || Buffer[Buffer_Offset+2]!=0x01) - Synched=false; + { + Frame_Count=(int64u)-1; + Frame_Count_NotParsedIncluded=(int64u)-1; + if (Streams[stream_id].TimeStamp_End.PTS.TimeStamp!=(int64u)-1 && Streams[stream_id].TimeStamp_Start.PTS.TimeStamp!=(int64u)-1) + FrameInfo.PTS=(Streams[stream_id].TimeStamp_End.PTS.TimeStamp-Streams[stream_id].TimeStamp_Start.PTS.TimeStamp)*100000/9; + SynchLost("MPEG-PS"); + Frame_Count=0; + FrameInfo=frame_info(); + return true; + } //Quick search - if (Synched && !Header_Parser_QuickSearch()) + if (!Header_Parser_QuickSearch()) return false; //We continue @@ -1445,6 +1453,12 @@ bool File_MpegPs::Header_Parse_PES_packet(int8u stream_id) if (Demux_UnpacketizeContainer && Buffer_Offset+6+PES_packet_length>Buffer_Size) return false; #endif //MEDIAINFO_DEMUX + if (!IsSub) + { + int64u ExpectedSize=Buffer_Offset+6+PES_packet_length; + if (ExpectedSize>File_Size) + IsTruncated(ExpectedSize, true, "MPEG-PS"); + } //Parsing switch (stream_id) diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp index 34168ac64b..bc92824b39 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_MpegTs.cpp @@ -259,7 +259,6 @@ File_MpegTs::File_MpegTs() Demux_Level=4; //Intermediate #endif //MEDIAINFO_DEMUX MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; Buffer_TotalBytes_Fill_Max=(int64u)-1; //Disabling this feature for this format, this is done in the parser Trusted_Multiplier=2; #if MEDIAINFO_DEMUX @@ -1510,7 +1509,10 @@ bool File_MpegTs::Synched_Test() //Synchro testing if (Buffer[Buffer_Offset+BDAV_Size]!=0x47) { - Synched=false; + Frame_Count=(int64u)-1; + Frame_Count_NotParsedIncluded=(int64u)-1; + SynchLost("MPEG-TS"); + Frame_Count=0; #if MEDIAINFO_DUPLICATE if (File__Duplicate_Get()) Trusted++; //We don't want to stop parsing if duplication is requested, TS is not a lot stable, normal... @@ -1800,7 +1802,24 @@ bool File_MpegTs::Synched_Test() } if (File_Offset+Buffer_Size>=File_Size) + { Detect_EOF(); //for TRP files + if (File_GoTo==(int64u)-1) + { + int64u Current_Offset=File_Offset+Buffer_Offset; + if (Current_Offset!=File_Size) + { + IsTruncated(Current_Offset+TS_Size, true, "MPEG-TS"); + auto LastPacket_Size=File_Size-Current_Offset; + auto LastPacker_Missing=TS_Size-LastPacket_Size; + if (LastPacker_Missing>=TSP_Size) + TSP_Size=0; // Last bytes of a content and partial TS packet without the content after the TS content + else + TSP_Size-=LastPacker_Missing; + } + } + return true; + } return false; //Not enough data } diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp index f5b490d107..c2a2969d5f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.cpp @@ -146,6 +146,12 @@ namespace MediaInfoLib static const size_t MaxCountSameElementInTrace=10; #endif // MEDIAINFO_TRACE +//--------------------------------------------------------------------------- +#define VECTOR(LENGTH) \ + auto Count=Vector(LENGTH); \ + if (Count==(int32u)-1) \ + return; \ + //--------------------------------------------------------------------------- #define UUID(PART1, PART2, PART3, PART4, LOCAL, NORM, NAME, DESCRIPTION) \ const int32u NAME##1=0x##PART1; \ @@ -2610,6 +2616,8 @@ void File_Mxf::Streams_Fill() //--------------------------------------------------------------------------- void File_Mxf::Streams_Finish() { + Frame_Count=Frame_Count_NotParsedIncluded=FrameInfo.PTS=FrameInfo.DTS=(int64u)-1; + #if MEDIAINFO_NEXTPACKET && defined(MEDIAINFO_REFERENCES_YES) //Locators only if (ReferenceFiles_IsParsing) @@ -2728,22 +2736,6 @@ void File_Mxf::Streams_Finish() Fill(Stream_Other, StreamPos_Last, Other_FrameRate, SDTI_TimeCode_StartTimecode.GetFrameRate()); } } - if (SystemScheme1_TimeCodeArray_StartTimecode.IsSet()) - { - bool IsDuplicate=false; - for (size_t Pos2=0; Pos2ParseSpeed>-1 || (!Partitions.empty() && Partitions[0].FooterPartition && Partitions[0].FooterPartition>=File_Size)) - Fill(Stream_General, 0, "IsTruncated", "Yes", Unlimited, true, true); + IsTruncated((!Partitions.empty() && Partitions[0].FooterPartition && Partitions[0].FooterPartition>=File_Size)?Partitions[0].FooterPartition:(int64u)-1, false, "MXF"); #endif //MEDIAINFO_ADVANCED //Handling separate streams @@ -2808,14 +2800,17 @@ void File_Mxf::Streams_Finish() } //System scheme 1 - for (systemschemes::iterator SystemScheme=SystemSchemes.begin(); SystemScheme!=SystemSchemes.end(); ++SystemScheme) + for (const auto& SystemScheme : SystemScheme1s) { - if (!SystemScheme->second.IsTimeCode) //Already done somewhere else + for (size_t i=0; ifirst>8))+__T('-')+Ztring().From_Number((int8u)(SystemScheme->first&0xFF))); - Fill(Stream_Other, StreamPos_Last, "MuxingMode", "System scheme 1"); + Fill(Stream_Other, StreamPos_Last, Other_ID, "SystemScheme1-"+to_string(SystemScheme.first&0xFF)+'-'+to_string(i)); + Fill(Stream_Other, StreamPos_Last, Other_Type, "Time code"); + Fill(Stream_Other, StreamPos_Last, Other_Format, "SMPTE TC"); + Fill(Stream_Other, StreamPos_Last, Other_MuxingMode, "System scheme 1"); + Fill(Stream_Other, StreamPos_Last, Other_TimeCode_FirstFrame, SystemScheme.second.TimeCodeArray_StartTimecodes[i].ToString()); } } @@ -3012,6 +3007,8 @@ void File_Mxf::Streams_Finish() //Commercial names Streams_Finish_CommercialNames(); + + Merge_Conformance(); } //--------------------------------------------------------------------------- @@ -3272,10 +3269,10 @@ void File_Mxf::Streams_Finish_Essence(int32u EssenceUID, int128u TrackUID) //Fill(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_TimeCode_Source), "SDTI"); } size_t SystemScheme1_TimeCodeArray_StartTimecode_StreamPos_Last; - if (SystemScheme1_TimeCodeArray_StartTimecode.IsSet()) + if (!SystemScheme1s.empty() && !SystemScheme1s.begin()->second.TimeCodeArray_StartTimecodes.empty()) { SystemScheme1_TimeCodeArray_StartTimecode_StreamPos_Last=StreamPos_Last; - Fill(StreamKind_Last, StreamPos_Last, "Delay_SystemScheme1", (int64s)SystemScheme1_TimeCodeArray_StartTimecode.ToMilliseconds()); + Fill(StreamKind_Last, StreamPos_Last, "Delay_SystemScheme1", (int64s)SystemScheme1s.begin()->second.TimeCodeArray_StartTimecodes.front().ToMilliseconds()); if (StreamKind_Last!=Stream_Max) Fill_SetOptions(StreamKind_Last, StreamPos_Last, "Delay_SystemScheme1", "N NT"); @@ -3578,9 +3575,9 @@ void File_Mxf::Streams_Finish_Essence(int32u EssenceUID, int128u TrackUID) TC.SetFramesMax((int16u)(FrameRate-1)); Fill(StreamKind_Last, SDTI_TimeCode_StartTimecode_StreamPos_Last, "Delay_SDTI", (int64s)TC.ToMilliseconds(), true, true); } - if (SystemScheme1_TimeCodeArray_StartTimecode.IsSet()) + if (!SystemScheme1s.empty() && !SystemScheme1s.begin()->second.TimeCodeArray_StartTimecodes.empty()) { - TimeCode TC=SystemScheme1_TimeCodeArray_StartTimecode; + TimeCode TC=SystemScheme1s.begin()->second.TimeCodeArray_StartTimecodes.front(); int32u FrameRate=float32_int32s(Retrieve_Const(StreamKind_Last, StreamPos_Last, Fill_Parameter(StreamKind_Last, Generic_FrameRate)).To_float32()); if (FrameRate) TC.SetFramesMax((int16u)(FrameRate-1)); @@ -4097,10 +4094,17 @@ void File_Mxf::Streams_Finish_Descriptor(const int128u DescriptorUID, const int1 if (StreamKind_Last==Stream_Video && Retrieve(Stream_Video, StreamPos_Last, Video_ScanType_Original).empty()) { //ScanType - if (!Descriptor->second.ScanType.empty() && (Descriptor->second.ScanType!=Retrieve(Stream_Video, StreamPos_Last, Video_ScanType) && !(Descriptor->second.Is_Interlaced() && Retrieve(Stream_Video, StreamPos_Last, Video_ScanType)==__T("MBAFF")))) + auto ScanType=Descriptor->second.Jp2kContentKind==4?__T("Interlaced"):Descriptor->second.ScanType; + if (Retrieve(Stream_Video, StreamPos_Last, Video_ScanType).empty()) + Fill(Stream_Video, StreamPos_Last, Video_ScanType, ScanType); + else if (Descriptor->second.Jp2kContentKind<=1) + { + // Do not trust frame layout info for JP2k 0 a 1, the jp2k parser needs to decide because all is possible (frame layout interlaced of frame, 1 or 2 codestreams per frame) + } + else if (!ScanType.empty() && (ScanType!=Retrieve(Stream_Video, StreamPos_Last, Video_ScanType) && !(Descriptor->second.Is_Interlaced() && Retrieve(Stream_Video, StreamPos_Last, Video_ScanType)==__T("MBAFF")))) { Fill(Stream_Video, StreamPos_Last, Video_ScanType_Original, Retrieve(Stream_Video, StreamPos_Last, Video_ScanType)); - Fill(Stream_Video, StreamPos_Last, Video_ScanType, Descriptor->second.ScanType, true); + Fill(Stream_Video, StreamPos_Last, Video_ScanType, ScanType, true); } //ScanOrder @@ -4386,7 +4390,10 @@ void File_Mxf::Streams_Finish_Component(const int128u ComponentUID, float64 Edit if (Essence->second.StreamKind==Stream_Video && Essence->second.StreamPos-(StreamPos_StartAtZero[Essence->second.StreamKind]?0:1)==StreamPos_Last) { if (Essence->second.Field_Count_InThisBlock_1 && !Essence->second.Field_Count_InThisBlock_2) + { FrameCount/=2; + EditRate/=2; + } break; } @@ -4931,7 +4938,7 @@ void File_Mxf::Read_Buffer_Continue() return; } - Fill(Stream_General, 0, "IsTruncated", "Yes", Unlimited, true, true); + IsTruncated(File_Offset+17+Size, true, "MXF"); } } } @@ -6312,6 +6319,12 @@ void File_Mxf::Data_Parse() { //Clearing InstanceUID=0; + if (!Essences_FirstEssence_Parsed) + { + Frame_Count=(int64u)-1; + Frame_Count_NotParsedIncluded=(int64u)-1; + FrameInfo=frame_info(); + } //Parsing int32u Code_Compare1=Code.hi>>32; @@ -6459,7 +6472,7 @@ void File_Mxf::Data_Parse() Element_Code=Code.lo; Code_Compare4&=0xFFFF0000; //Remove Metadata or Control Element Identifier + Element Number if (0) {} - ELEMENT(SystemScheme1, "SystemScheme1") + ELEMENT(SystemScheme1, "System Scheme 1") } ELEMENT(AS11_AAF_Core, "AS-11 core metadata framework") ELEMENT(AS11_AAF_Segmentation, "AS-11 segmentation metadata framework") @@ -6551,6 +6564,10 @@ void File_Mxf::Data_Parse() } #endif //MEDIAINFO_DEMUX || MEDIAINFO_SEEK + Frame_Count=0; + Frame_Count_NotParsedIncluded=0; + FrameInfo=frame_info(); + FrameInfo.DTS=0; Essences_FirstEssence_Parsed=true; } @@ -6881,9 +6898,10 @@ void File_Mxf::Data_Parse() Element_Begin1("Line"); int32u ArrayCount, ArrayLength; int16u LineNumber, SampleCount; + int8u WrappingType, SampleCoding; Get_B2 (LineNumber, "Line Number"); Element_Info1(LineNumber); - Skip_B1( "Wrapping Type"); - Skip_B1( "Payload Sample Coding"); + Get_B1 (WrappingType, "Wrapping Type"); + Get_B1 (SampleCoding, "Payload Sample Coding"); Get_B2 (SampleCount, "Payload Sample Count"); Get_B4 (ArrayCount, "Payload Array Count"); Get_B4 (ArrayLength, "Payload Array Length"); @@ -6896,6 +6914,16 @@ void File_Mxf::Data_Parse() (*Parser)->FrameInfo.PTS=Essence->second.FrameInfo.PTS; if (Essence->second.FrameInfo.DUR!=(int64u)-1) (*Parser)->FrameInfo.DUR=Essence->second.FrameInfo.DUR; + #if defined(MEDIAINFO_VBI_YES) + if ((*Parser)->ParserName=="Vbi") + { + ((File_Vbi*)(*Parser))->WrappingType=WrappingType; + ((File_Vbi*)(*Parser))->SampleCoding=SampleCoding; + ((File_Vbi*)(*Parser))->LineNumber=LineNumber; + if (Pos+1==Count) + ((File_Vbi*)(*Parser))->IsLast=true; + } + #endif //defined(MEDIAINFO_VBI_YES) #if defined(MEDIAINFO_ANCILLARY_YES) if ((*Parser)->ParserName=="Ancillary") ((File_Ancillary*)(*Parser))->LineNumber=LineNumber; @@ -6920,13 +6948,6 @@ void File_Mxf::Data_Parse() Parsing_Size=Array_Size; // There is a problem (*Parser)->Frame_Count_NotParsedIncluded=Frame_Count_NotParsedIncluded; Open_Buffer_Continue((*Parser), Buffer+Buffer_Offset+(size_t)(Element_Offset), Parsing_Size); - if ((Code_Compare4&0xFF00FF00)==0x17000100 && LineNumber==21 && (*Parser)->Count_Get(Stream_Text)==0) - { - (*Parser)->Accept(); - (*Parser)->Stream_Prepare(Stream_Text); - (*Parser)->Fill(Stream_Text, StreamPos_Last, Text_Format, "EIA-608"); - (*Parser)->Fill(Stream_Text, StreamPos_Last, Text_MuxingMode, "VBI / Line 21"); - } Element_Offset+=Parsing_Size; if (Parsing_Size File_Size) - IsTruncated=true; - else - IsTruncated=false; + auto ExpectedSize=File_Offset+Buffer_Offset-Header_Size+Element_Size_WithPadding; + if ((Code.lo&0xFF0000)==0x020000) //If Header Partition Pack + ExpectedSize+=HeaderByteCount+IndexByteCount; + if (ExpectedSize>File_Size) + IsTruncated(ExpectedSize, true); } - if (IsTruncated) - Fill(Stream_General, 0, "IsTruncated", "Yes", Unlimited, true, true); #endif //MEDIAINFO_ADVANCED } @@ -12216,9 +12215,8 @@ void File_Mxf::Preface_Version() void File_Mxf::Preface_Identifications() { //Parsing - if (Vector(16)==(int32u)-1) - return; - while (Element_OffsetTimeCode_Dumps) { - auto id="SystemScheme1-0-"+to_string(i); + auto id="SystemScheme1-"+to_string(Element_Code&0xFF)+'-'+to_string(i); auto& TimeCode_Dump=(*Config->TimeCode_Dumps)[id]; if (TimeCode_Dump.List.empty()) { @@ -12585,12 +12576,31 @@ void File_Mxf::SystemScheme1_TimeCodeArray() TimeCode_Dump.LastTC=CurrentTC; TimeCode_Dump.List+="/>\n"; TimeCode_Dump.FrameCount++; - i++; } #endif //MEDIAINFO_ADVANCED } - SystemSchemes[Element_Code&0xFFFF].IsTimeCode=true; + if (IsStart && SystemScheme.TimeCodeArray_StartTimecodes.size()>1) + { + bool IsNotContinuous=false; + auto Current=SystemScheme.TimeCodeArray_StartTimecodes.front(); + for (size_t i=1; iStreamKind=Stream_Video; if (Descriptor!=Descriptors.end()) { - Parser->Interlaced=Descriptor->second.Is_Interlaced(); + Parser->Interlaced=Descriptor->second.Is_Interlaced() || Descriptor->second.Jp2kContentKind==4; + Parser->MxfContentKind=Descriptor->second.Jp2kContentKind; #if MEDIAINFO_DEMUX if (Parser->Interlaced) { @@ -18950,7 +18953,7 @@ void File_Mxf::ChooseParser_Mga(const essences::iterator &Essence, const descrip //--------------------------------------------------------------------------- int32u File_Mxf::Vector(int32u ExpectedLength) { - if (Element_Offset+8>Element_Size) + if (Element_Size-Element_Offset<8) { Element_Error("Incoherent element size"); return (int32u)-1; @@ -18960,7 +18963,7 @@ int32u File_Mxf::Vector(int32u ExpectedLength) Get_B4 (Count, "Count"); Get_B4 (Length, "Length"); - if (Count*Length!=Element_Size-Element_Offset) + if (Count*Length>Element_Size-Element_Offset) { Param_Error("Incoherent Count*Length"); return (int32u)-1; @@ -18972,7 +18975,7 @@ int32u File_Mxf::Vector(int32u ExpectedLength) return (int32u)-1; } - return Length; + return Count; } //--------------------------------------------------------------------------- @@ -19190,14 +19193,86 @@ bool File_Mxf::BookMark_Needed() { Frame_Count_NotParsedIncluded=(int64u)-1; - if (MayHaveCaptionsInStream && !IsSub && IsParsingEnd && File_Size!=(int64u)-1 && Config->ParseSpeed>0 && Config->ParseSpeed<1 && IsParsingMiddle_MaxOffset==(int64u)-1 && File_Size/2>0x4000000) //TODO: 64 MB by default; // Do not search in the middle of the file if quick pass or full pass + if (MayHaveCaptionsInStream && !IsSub && IsParsingEnd && IsParsingMiddle_MaxOffset==(int64u)-1) { - IsParsingMiddle_MaxOffset=File_Size/2+0x4000000; //TODO: 64 MB by default; - GoTo(File_Size/2); - Open_Buffer_Unsynch(); - IsParsingEnd=false; - IsCheckingRandomAccessTable=false; - Streams_Count=(size_t)-1; + int64u ProbeCaptionBytePos=(int64u)-1; + int64u ProbeCaptionByteDur=(int64u)-1; + int64u Duration=0; + for (size_t StreamKind=Stream_General; StreamKindsecond.Duration && Component->second.Duration!=(int64u)-1) + Duration=Component->second.Duration/Track.second.EditRate; + } + } + } + auto Probe=Config->File_ProbeCaption_Get(ParserName); + switch (Probe.Start_Type) + { + case config_probe_size: + ProbeCaptionBytePos=Probe.Start; + break; + case config_probe_dur: + if (Duration) + { + Probe.Start=Probe.Start*100/Duration; //TODO: real timestamp + if (!Probe.Start) + Probe.Start=1; + } + else + Probe.Start=50; + // Fall through + case config_probe_percent: + ProbeCaptionBytePos=File_Size/100*Probe.Start; + break; + } + switch (Probe.Duration_Type) { + case config_probe_size: + ProbeCaptionByteDur=Probe.Duration; + break; + case config_probe_dur: + if (Duration) + { + Probe.Duration=Probe.Duration*100/Duration; //TODO: real timestamp + if (!Probe.Duration) + Probe.Duration++; + } + else + Probe.Duration=1; + // Fall through + case config_probe_percent: + ProbeCaptionByteDur=File_Size/100*Probe.Duration; + break; + } + auto MaxOffset=ProbeCaptionBytePos+ProbeCaptionByteDur; + auto CurrentEnd=File_Offset+Buffer_Offset; + if (ProbeCaptionBytePos!=(int64u)-1 && ProbeCaptionByteDur!=(int64u)-1 && File_Size/2>ProbeCaptionByteDur) + { + IsParsingMiddle_MaxOffset=MaxOffset; + GoTo(ProbeCaptionBytePos); + Open_Buffer_Unsynch(); + IsParsingEnd=false; + IsCheckingRandomAccessTable=false; + Streams_Count=(size_t)-1; + } } if (ExtraMetadata_Offset!=(int64u)-1) diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.h index c6c700e88d..5db258ae1f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Mxf.h @@ -885,6 +885,7 @@ protected : int16u BlockAlign; int32u QuantizationBits; int64u Duration; + int8u Jp2kContentKind; int8u ActiveFormat; int8u FieldTopness; int8u FieldDominance; @@ -962,6 +963,7 @@ protected : QuantizationBits=(int32u)-1; Duration=(int64u)-1; ActiveFormat=(int8u)-1; + Jp2kContentKind=(int8u)-1; FieldTopness=(int8u)-1; //Field x is upper field FieldDominance=1; //Default is field 1 temporaly first Type=Type_Unknown; @@ -1287,8 +1289,6 @@ protected : int64u SDTI_PackageMetadataSet_Trace_Count; int64u Padding_Trace_Count; #endif // MEDIAINFO_TRACE - TimeCode SystemScheme1_TimeCodeArray_StartTimecode; - int64u SystemScheme1_FrameRateFromDescriptor; bool Essences_FirstEssence_Parsed; bool MayHaveCaptionsInStream; bool StereoscopicPictureSubDescriptor_IsPresent; @@ -1296,17 +1296,13 @@ protected : int32u Essences_UsedForFrameCount; int32u IndexTable_NSL; int32u IndexTable_NPE; - struct systemscheme + struct systemscheme1 { - bool IsTimeCode; - - systemscheme() - { - IsTimeCode=false; - } + vector TimeCodeArray_StartTimecodes; + string ID; }; - typedef std::map systemschemes; - systemschemes SystemSchemes; + typedef std::map systemscheme1s; + systemscheme1s SystemScheme1s; #if MEDIAINFO_ADVANCED int64u Footer_Position; #endif //MEDIAINFO_ADVANCED diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Nsv.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Nsv.cpp index eb9ea1101b..c7cffd723f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Nsv.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Nsv.cpp @@ -259,7 +259,7 @@ void File_Nsv::FileHeader_Parse() Fill(Stream_Audio, 0, Audio_Duration, file_len_ms); } if (file_size>File_Size) - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(file_size, false, "NSV"); if (metadata_len) { Element_Begin1("metadata"); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp index dd017e2d7b..87112b1632 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Ogg.cpp @@ -38,7 +38,6 @@ File_Ogg::File_Ogg() { //Configuration MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; //In SizedBlocks=false; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.cpp index 76de9c9fef..ba35b1f625 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.cpp @@ -64,6 +64,7 @@ namespace Elements const int32u AIFF_SSND=0x53534E44; const int32u AVI_=0x41564920; const int32u AVI__hdlr_strl_strh_txts=0x74787473; + const int32u BW64=0x42573634; const int32u FORM=0x464F524D; const int32u LIST=0x4C495354; const int32u MThd=0x4D546864; @@ -158,6 +159,7 @@ File_Riff::File_Riff() IsBigEndian=false; IsWave64=false; IsRIFF64=false; + IsBW64=false; IsWaveBroken=false; IsNotWordAligned=false; IsNotWordAligned_Tested=false; @@ -212,7 +214,7 @@ void File_Riff::Streams_Finish () //Global if (IsRIFF64) - Fill(Stream_General, 0, General_Format_Profile, "RF64"); + Fill(Stream_General, 0, General_Format_Profile, IsBW64?"BW64":"RF64"); if (DolbyAudioMetadata) //Before ADM for having content before all ADM stuff Merge(*DolbyAudioMetadata, Stream_Audio, 0, 0); if (Adm) @@ -1089,9 +1091,9 @@ void File_Riff::Header_Parse() } if (File_Offset+Buffer_Offset+8+Size_Complete>File_Size) { - Size_Complete=File_Size-(File_Offset+Buffer_Offset+8); if (Element_Level<=2) //Incoherencies info only at the top level chunk - Fill(Stream_General, 0, "IsTruncated", "Yes"); + IsTruncated(File_Offset+Buffer_Offset+8+Size_Complete, Element_Offset!=8, "RIFF"); + Size_Complete=File_Size-(File_Offset+Buffer_Offset+Element_Offset); } //Alignment @@ -1106,12 +1108,15 @@ void File_Riff::Header_Parse() //Top level chunks if (Name==Elements::LIST || Name==Elements::RIFF + || Name==Elements::BW64 || Name==Elements::RF64 || Name==Elements::ON2_ || Name==Elements::FORM) { if (Name==Elements::RF64) IsRIFF64=true; + if (Name==Elements::BW64) + IsRIFF64=IsBW64=true; Get_C4 (Name, "Real Name"); //Handling buggy files @@ -1196,6 +1201,24 @@ bool File_Riff::BookMark_Needed() return true; } +//--------------------------------------------------------------------------- +#if MEDIAINFO_CONFORMANCE +string File_Riff::CreateElementName() +{ + string Result; + for (size_t i = 1; i < Element_Level; i++) { + Result += Ztring().From_CC4(Element[i].Code).Trim().To_UTF8(); + if (Result.back() >= '0' && Result.back() <= '9') { + Result += '_'; + } + Result += __T(' '); + } + if (!Result.empty()) + Result.pop_back(); + return Result; +} +#endif + //*************************************************************************** // Helpers //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.h index 2671a7ba65..113a9275b2 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff.h @@ -66,6 +66,10 @@ private : bool BookMark_Needed(); + #if MEDIAINFO_CONFORMANCE + string CreateElementName(); + #endif //MEDIAINFO_CONFORMANCE + //Data struct stream { @@ -176,6 +180,7 @@ private : bool IsBigEndian; bool IsWave64; bool IsRIFF64; + bool IsBW64; bool IsWaveBroken; bool IsNotWordAligned; bool IsNotWordAligned_Tested; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp index 227c8b88cf..980dde615b 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Riff_Elements.cpp @@ -3741,7 +3741,7 @@ void File_Riff::WAVE_axml() Element_Name("AXML"); //Parsing - Adm->TotalSize = Element_TotalSize_Get(); + Adm->TotalSize=Buffer_DataToParse_End?(Buffer_DataToParse_End-(File_Offset+Buffer_Offset)):Element_TotalSize_Get(); WAVE_axml_Continue(); } } @@ -3750,7 +3750,18 @@ void File_Riff::WAVE_axml_Continue() { //Parsing Open_Buffer_Continue(Adm, Buffer+Buffer_Offset, (size_t)Element_Size); - Element_Offset=Adm->NeedToJumpToEnd?(File_Size-(File_Offset+Buffer_Offset)):Element_Size; + if (Adm->NeedToJumpToEnd) + { + auto Size=Element_TotalSize_Get(); + if (Size>=16*1024*1024) + { + Size-=16*1024*1024; + GoTo(File_Offset+Buffer_Offset+Size); + } + else + Adm->NeedToJumpToEnd=false; + } + Element_Offset=Element_Size; } //--------------------------------------------------------------------------- diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Swf.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Swf.cpp index 9b863ae74f..e3e40227c2 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Swf.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Swf.cpp @@ -688,9 +688,12 @@ bool File_Swf::Decompress() File_Swf MI; MI.FileLength=FileLength; MI.Version=Version; + auto File_Size_Sav=File_Size; + File_Size=Dest_Size; Open_Buffer_Init(&MI); - MI.Open_Buffer_Continue(Dest, FileLength-8); + MI.Open_Buffer_Continue(Dest, Dest_Size); MI.Open_Buffer_Finalize(); + File_Size=File_Size_Sav; Merge(MI, Stream_General, 0, 0); Merge(MI); delete[] Dest; //Dest=NULL; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.cpp b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.cpp index a7a7da447f..0a36d97008 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.cpp @@ -21,11 +21,19 @@ //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- +#include #include "MediaInfo/Multiple/File_Vbi.h" +#if defined(MEDIAINFO_EIA608_YES) + #include "MediaInfo/Text/File_Eia608.h" +#endif +#if defined(MEDIAINFO_TIMECODE_YES) + #include "MediaInfo/Multiple/File_Gxf_TimeCode.h" +#endif #if defined(MEDIAINFO_TELETEXT_YES) #include "MediaInfo/Text/File_Teletext.h" #endif #include "MediaInfo/MediaInfo_Config_MediaInfo.h" +using namespace std; //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- @@ -45,35 +53,75 @@ File_Vbi::File_Vbi() ParserName="Vbi"; PTS_DTS_Needed=true; - #if defined(MEDIAINFO_TELETEXT_YES) - Teletext_Parser=NULL; - #endif //defined(MEDIAINFO_TELETEXT_YES) -} - -//--------------------------------------------------------------------------- -File_Vbi::~File_Vbi() -{ - #if defined(MEDIAINFO_TELETEXT_YES) - if (Teletext_Parser) - delete Teletext_Parser; - #endif //defined(MEDIAINFO_TELETEXT_YES) + LineNumber=0; + IsLast=false; } //--------------------------------------------------------------------------- void File_Vbi::Streams_Finish() { - #if defined(MEDIAINFO_TELETEXT_YES) - if (Teletext_Parser && !Teletext_Parser->Status[IsFinished] && Teletext_Parser->Status[IsAccepted]) - { - Finish(Teletext_Parser); - for (size_t StreamKind=Stream_General+1; StreamKindCount_Get((stream_t)StreamKind); StreamPos++) - { - Merge(*Teletext_Parser, (stream_t)StreamKind, StreamPos, StreamPos); - Fill((stream_t)StreamKind, StreamPos, "MuxingMode", "VBI", Unlimited, true); + for (auto& Stream : Streams) { + if (!Stream.second.Parser) { + continue; + } + Finish(Stream.second.Parser); + } + + for (auto& Stream : Streams) { + if (!Stream.second.Parser) { + continue; + } + size_t Start[Stream_Max]; + for (size_t StreamKind = Stream_General + 1; StreamKind < Stream_Max; StreamKind++) { + Start[StreamKind] = Count_Get((stream_t)StreamKind); + } + Merge(*Stream.second.Parser); + for (size_t StreamKind = Stream_General + 1; StreamKind < Stream_Max; StreamKind++) { + auto End = Count_Get((stream_t)StreamKind); + for (size_t StreamPos = Start[StreamKind]; StreamPos < End; StreamPos++) { + auto ID = Stream.first >= 313 ? (Stream.first - 313) : Stream.first >= 263 ? (Stream.first - 263) : Stream.first; + auto ID_String = Ztring::ToZtring(ID); + const auto& SubID = Retrieve_Const((stream_t)StreamKind, StreamPos, General_ID); + if (!SubID.empty()) { + ID_String += __T('-'); + ID_String += SubID; } + Fill((stream_t)StreamKind, StreamPos, General_ID, ID_String, true); + if (Stream.second.Type) { + Fill((stream_t)StreamKind, StreamPos, "MuxingMode", "VBI"); + if (Stream.second.Type == VbiType_Vitc) { + Fill(Stream_Other, StreamPos, Other_Format, "SMPTE TC"); // TODO: in timecode parser directly + Fill(Stream_Other, StreamPos, Other_BitRate_Mode, "CBR"); // TODO: in timecode parser directly + auto Field2 = Streams.find(ID + 263); // NTSC + if (Field2 == Streams.end() || Field2->second.Type != Stream.second.Type) { + Field2 = Streams.find(ID + 313); //PAL + } + if (Field2 != Streams.end() && Field2->second.Type == Stream.second.Type) { + const auto& TimeCode_FirstFrame1 = Stream.second.Parser->Retrieve_Const(Stream_Other, 0, Other_TimeCode_FirstFrame); + const auto& TimeCode_FirstFrame2 = Field2->second.Parser->Retrieve_Const(Stream_Other, 0, Other_TimeCode_FirstFrame); + if (TimeCode_FirstFrame2 != TimeCode_FirstFrame1) { + Fill(Stream_Other, StreamPos, Other_TimeCode_FirstFrame, TimeCode_FirstFrame2); + } + Streams.erase(Field2); + } + } + if (Stream.second.Type == VbiType_Teletext) { + auto Field2 = Streams.find(ID + 263); // NTSC + if (Field2 == Streams.end() || Field2->second.Type != Stream.second.Type) { + Field2 = Streams.find(ID + 313); //PAL + } + if (Field2 != Streams.end() && Field2->second.Type == Stream.second.Type) { + const auto& ID_FirstFrame1 = Stream.second.Parser->Retrieve_Const(StreamKind_Last, 0, General_ID); + const auto& ID_FirstFrame2 = Field2->second.Parser->Retrieve_Const(StreamKind_Last, 0, General_ID); + if (ID_FirstFrame1 == ID_FirstFrame2) { + Streams.erase(Field2); + } + } + } + } + } } - #endif //defined(MEDIAINFO_TELETEXT_YES) + } } //*************************************************************************** @@ -86,29 +134,477 @@ void File_Vbi::Read_Buffer_Continue() if (!Status[IsAccepted]) Accept(); //No way to detect non-VBI content - Buffer_Offset=Buffer_Size; //This is per frame + if (WrappingType && WrappingType <= 4 && SampleCoding == 4) { // 8-bit component luma samples, the only one currently supported + if (WrappingType == 3 && LineNumber <= 263) { + LineNumber += 263; // Some muxers indicate field line, some others interlaced frame line + } + Parse(); + } + + if (Element_Offset < Element_Size) + Skip_XX(Element_Size - Element_Offset, "Unknown"); - Frame_Count++; - Frame_Count_InThisBlock++; - if (Frame_Count_NotParsedIncluded!=(int64u)-1) - Frame_Count_NotParsedIncluded++; - if (!Status[IsFilled] && Config->ParseSpeed<=0) - Fill(); + if (IsLast) + { + Frame_Count++; + Frame_Count_InThisBlock++; + if (Frame_Count_NotParsedIncluded != (int64u)-1) + Frame_Count_NotParsedIncluded++; + if (!Status[IsFilled] && Config->ParseSpeed <= 0) + Fill(); + IsLast = false; + } } //--------------------------------------------------------------------------- void File_Vbi::Read_Buffer_Unsynched() { - #if defined(MEDIAINFO_TELETEXT_YES) - if (Teletext_Parser) - Teletext_Parser->Open_Buffer_Unsynch(); - #endif //defined(MEDIAINFO_TELETEXT_YES) + for (auto& Stream : Streams) { + if (Stream.second.Parser) { + Stream.second.Parser->Open_Buffer_Unsynch(); + } + } } //*************************************************************************** -// Helpers +// Elements //*************************************************************************** +//--------------------------------------------------------------------------- +void File_Vbi::Parse() +{ + auto Stream = Streams.find(LineNumber); + if (Stream != Streams.end()) { + switch (Stream->second.Type) { + case VbiType_Line21: Line21(); break; + case VbiType_Vitc: Vitc(); break; + case VbiType_Teletext: Teletext(); break; + default:; + } + } + else { + Line21(); + Vitc(); + Teletext(); + } +} + +//--------------------------------------------------------------------------- +void File_Vbi::Line21() +{ + // Check luminance min & max + int8u Level_Min = (int8u)-1; + int8u Level_Max = 0; + for (int i = 0; i < Buffer_Size; i++) { + auto Value = Buffer[i]; + Level_Min = min(Level_Min, Value); + Level_Max = max(Level_Max, Value); + } + if (Level_Max - Level_Min < 16) + return; // Not enough difference in luminance for having an actual signal + int8u Diff4 = (Level_Max - Level_Min) >> 2; + int8u Level_0 = Level_Min + Diff4; + int8u Level_1 = Level_Max - Diff4; + + // Find Clock Run-In + int ClockRunIn_Pos = 0; + size_t ClockRunIn_0_x2 = 0; + size_t Step_x12 = 0; // Step between each bit + size_t Current_Pos_Min = 0; // Min index of the lowest (0) or highest (1) current value + size_t Current_Pos_Max = 0; // Max index of the lowest (0) or highest (1) current value + int8u Current_Value = (int8u)-1; + bool Is1 = false; + for (int i = 0; i < Buffer_Size; i++) { + auto Value = Buffer[i]; + if (Value <= Level_0) { + // Is 0 + if (Is1) { + // New 0 + if (!ClockRunIn_Pos) { + ClockRunIn_0_x2 = Current_Pos_Min + Current_Pos_Max; // First Clock Run-In is found + } + ClockRunIn_Pos++; + if (ClockRunIn_Pos == 7) { + break; // The 7 Clock Run-In are found + } + Current_Value = Value; + Current_Pos_Min = i; + Current_Pos_Max = i; + Is1 = false; + } + else { + // Another 0 + } + } + if (Value >= Level_1) { + // Is 1 + if (Is1) { + // Another 1 + } + else { + // New 1 + Current_Value = Value; + Current_Pos_Min = i; + Current_Pos_Max = i; + Is1 = true; + } + } + if (Is1) { + if (Current_Value < Value) { + Current_Value = Value; + Current_Pos_Min = i; + Current_Pos_Max = i; + } + else if (Current_Value == Value) { + Current_Pos_Max = i; + } + } + else { + if (Current_Value > Value) { + Current_Value = Value; + Current_Pos_Min = i; + Current_Pos_Max = i; + } + else if (Current_Value == Value) { + Current_Pos_Max = i; + } + } + } + + // Compute step between bits + Step_x12 = Current_Pos_Min + Current_Pos_Max - ClockRunIn_0_x2; + if (ClockRunIn_Pos != 7 || Step_x12 / 12 > ClockRunIn_0_x2 || Step_x12 * 25 >= Buffer_Size * 12 - ClockRunIn_0_x2 * 6) { + return; // Clock Run-In elements are not found or not enough place for 26 elements + } + auto Get_Buffer_Index = [&](int i) { // i is up to 25 + return (ClockRunIn_0_x2 * 6 + Step_x12 * i) / 12; + }; + + // Check Clock Run-In coherence + for (int i = 0; i < 7; i++) { + auto Idx = Get_Buffer_Index(i); + if (Buffer[Idx] < Level_1) { + return; // One of Clock Run-In highest is not at the right place + } + } + ClockRunIn_0_x2 -= Step_x12 / 12; // From middle of a bit to start of a bit + for (int i = 0; i < 7; i++) { + auto Idx = Get_Buffer_Index(i); + if (Buffer[Idx] > Level_0) { + return; // One of Clock Run-In lowest is not at the right place + } + } + + // Check Start Bits + auto Idx_Min = Get_Buffer_Index(7); // Begin of S1 + ClockRunIn_0_x2 += Step_x12 / 12; // From start of a bit to middle of a bit + auto Idx_Max = Get_Buffer_Index(8); // Middle of S2 + for (int Idx = Idx_Min; Idx < Idx_Max; Idx++) { + if (Buffer[Idx] > Level_0) { + return; // Issue between begin of S1 and middle of S2, not 0 + } + } + auto Idx = Get_Buffer_Index(9); + if (Buffer[Idx] < Level_1) { + return; // S3 is not 1 + } + + // Read 2 8-bit characters + unsigned Pair = 0; + int8u CC_Parity[2] = {}; + for (int i = 0; i < 16; i++) { + Pair <<= 1; + auto Idx = Get_Buffer_Index(10 + i); + if (Buffer[Idx] >= Level_1) { + Pair++; + CC_Parity[i>>3]++; + } + else if (Buffer[Idx] > Level_0) { + return; // Not 0 and not 1, unstable + } + } + if (!(CC_Parity[0] & 1) || !(CC_Parity[1] & 1)) { + return; // Parity fail + } + + // Parse the characters + int8u CC_Buffer[2]; + CC_Buffer[0] = ReverseBits(Pair >> 8); + CC_Buffer[1] = ReverseBits(Pair & 0xFF); + auto& Stream = Streams[LineNumber]; + if (!Stream.Parser) + { + Stream.Parser = new File_Eia608; + Stream.Type = VbiType_Line21; + Open_Buffer_Init(Stream.Parser); + } + Open_Buffer_Continue(Stream.Parser, CC_Buffer, 2); + Element_Offset = Element_Size; +} + +//--------------------------------------------------------------------------- +void File_Vbi::Vitc() +{ + // Check luminance min & max + int8u Level_Min = (int8u)-1; + int8u Level_Max = 0; + for (int i = 0; i < Buffer_Size; i++) { + auto Value = Buffer[i]; + Level_Min = min(Level_Min, Value); + Level_Max = max(Level_Max, Value); + } + if (Level_Max - Level_Min < 16) + return; // Not enough difference in luminance for having an actual signal + int8u Diff4 = (Level_Max - Level_Min) >> 2; + int8u Level_0 = Level_Min + Diff4; + int8u Level_1 = Level_Max - Diff4; + + // Find first sync + int Sync_Pos = 0; + size_t Sync_0_Begin = 0; + size_t Sync_0_End = 0; + size_t Step_x81 = 0; // Step between each bit + size_t Current_Pos_PreviousChange = 0; // Min index of the 0 level or the 1 level + bool Is1 = false; + for (int i = 0; i < Buffer_Size; i++) { + auto Value = Buffer[i]; + if (Value <= Level_0) { + // Is 0 + if (Is1) { + // New 0 + if (!Sync_Pos) { + Sync_0_Begin = Current_Pos_PreviousChange; // First 1 sync + Sync_0_End = i; + } + Sync_Pos++; + Step_x81 = i - Sync_0_Begin; + if (Sync_Pos == 9) { + break; // The 9 1 sync are found + } + Step_x81--; // Minus 1 because it is better to sync with the previous bit (its value is not important for catching 1 sync) than being too far, especially useful for the 2nd sync + Current_Pos_PreviousChange = i; + i = Sync_0_Begin + (10 * Sync_Pos) * Step_x81 / (1 + 10 * (Sync_Pos - 1)); + Is1 = false; + } + else { + // Another 0 + } + } + if (Value >= Level_1) { + // Is 1 + if (Is1) { + // Another 1 + } + else { + // New 1 + Current_Pos_PreviousChange = i; + Is1 = true; + } + } + } + + // Compute step between bits + auto Sync_0 = (Sync_0_Begin + Sync_0_End) / 2; // From start of a bit to middle of a bit + if (Sync_Pos != 9 || Step_x81 * 90 >= (Buffer_Size - Sync_0_Begin) * 81) { + return; // Sync elements are not found or not enough place for 90 elements + } + auto Get_Buffer_Index = [&](int i) { // i is up to 89 + return Sync_0 + (Step_x81 * i) / 81; + }; + + // Check sync bits coherence + for (int i = 0; i < 9; i++) { + auto Idx1 = Get_Buffer_Index(i * 10); + auto Idx0 = Get_Buffer_Index(i * 10 + 1); + if (Buffer[Idx1] < Level_1 || Buffer[Idx0] > Level_0) { + return; // One of Clock Run-In highest is not at the right place + } + } + + // Read 2 8-bit characters + uint64_t TimeCode_UserBits = 0; + uint8_t Parity = 1; // 1 of the CRC bits uses 3x a sync code instead of 2x + for (int i = 0; i < 72; i++) { + if (i < 64) { + TimeCode_UserBits <<= 1; + } + auto i_Div = i / 8; + auto i_Mod = i % 8; + auto Pos = 2 + i_Div * 10 + i_Mod; + auto Idx = Get_Buffer_Index(Pos); + if (Buffer[Idx] >= Level_1) { + if (i < 64) { + TimeCode_UserBits++; + } + Parity ^= 1 << (Pos % 8); + } + else if (Buffer[Idx] > Level_0) { + return; // Not 0 and not 1, unstable + } + } + if (Parity) { + return; // Parity fail + } + + // Parse the characters + int8u TimeCode_UserBits_Buffer[8]; + for (int i = 0; i < 8; i++) { + TimeCode_UserBits_Buffer[i] = ReverseBits((TimeCode_UserBits >> (8 * i)) & 0xFF); + } + auto& Stream = Streams[LineNumber]; + if (!Stream.Parser) + { + Stream.Parser = new File_Gxf_TimeCode; + ((File_Gxf_TimeCode*)Stream.Parser)->IsTimeCodeTrack = true; + ((File_Gxf_TimeCode*)Stream.Parser)->IsBigEndian = true; + Stream.Type = VbiType_Vitc; + Open_Buffer_Init(Stream.Parser); + } + Open_Buffer_Continue(Stream.Parser, TimeCode_UserBits_Buffer, 8); + Element_Offset = Element_Size; +} + +//--------------------------------------------------------------------------- +void File_Vbi::Teletext() +{ + // Check luminance min & max + int8u Level_Min = (int8u)-1; + int8u Level_Max = 0; + for (int i = 0; i < Buffer_Size; i++) { + auto Value = Buffer[i]; + Level_Min = min(Level_Min, Value); + Level_Max = max(Level_Max, Value); + } + if (Level_Max - Level_Min < 16) + return; // Not enough difference in luminance for having an actual signal + int8u Middle = (Level_Min + Level_Max) >> 1; + + // Find first and last 1 bit + int8u First_Highest = 0; + size_t First_Pos = 0; + for (; First_Pos < Buffer_Size; First_Pos++) { + auto Value = Buffer[First_Pos]; + if (Value <= First_Highest && First_Highest >= Middle) { + First_Pos--; + break; + } + First_Highest = Value; + } + int8u Last_Highest = 0; + size_t Last_Pos = Buffer_Size - 1; + for (; Last_Pos; Last_Pos--) { + auto Value = Buffer[Last_Pos]; + if (Value <= Last_Highest && Last_Highest >= Middle) { + Last_Pos++; + break; + } + Last_Highest = Value; + } + if (Last_Pos <= First_Pos) { + return; + } + + // Guess the precise position of the peak based on adjacent bytes + auto Get_PrecisePos = [&](const int8u* Buffer, size_t i) { + if (i + 1 >= Buffer_Size) { + return (float)Buffer[i]; + } + if (i && Buffer[i - 1] > Buffer[i + 1]) { + auto Diff0 = Level_Max - Buffer[i - 1]; + auto Diff1 = Level_Max - Buffer[i]; + float Sum = Diff0 + Diff1; + float Pos = i; + if (Sum) { + Pos -= Diff1 / Sum; + } + return Pos; + } + else { + auto Diff0 = Level_Max - Buffer[i]; + auto Diff1 = Level_Max - Buffer[i + 1]; + float Sum = Diff0 + Diff1; + float Pos = i; + if (Sum) { + Pos += Diff0 / Sum; + } + return Pos; + } + }; + + // Guess precise first 1 bit and last 1 bit + auto First1BitPos = Get_PrecisePos(Buffer, First_Pos); + auto Last1BitPos = Get_PrecisePos(Buffer, Last_Pos); + + // Compute step between bits + auto Step = (Last1BitPos - First1BitPos) / 357; // Most frames have first 1 bit the first clock bit and last 1 bit the checksum of 0 padding so 3rd last bit + if (Step < 1 || Step > 2 || First1BitPos + Step * 359 + 0.5 >= Buffer_Size) { + return; // Not enough place for 360 elements + } + auto Get_Value = [&](int i) { // i is up to 359 + auto Idx = First1BitPos + Step * i; + auto Idx_Int = (size_t)Idx; + auto Value = Buffer[Idx_Int]; + Idx_Int++; + if (Idx_Int < Buffer_Size) { + auto Diff = (float)Buffer[Idx_Int] - Value; + Idx -= (size_t)Idx; + Value += Idx * Diff; + } + return Value; + }; + + //auto ID = LineNumber >= 313 ? (LineNumber - 313) : LineNumber >= 263 ? (LineNumber - 263) : LineNumber; + //auto& Stream = Streams[ID]; + auto& Stream = Streams[LineNumber]; + + // Read 45 8-bit characters + int8u Teletext_Buffer[45]; + auto Dump = [&]() { + int8u Current = 0; + for (int i = 0; i < 360; i++) { + auto Value = Get_Value(i); + Current <<= 1; + if (Value >= Middle) { + Current++; + } + if ((i % 8) == 7) { + Teletext_Buffer[i / 8] = ReverseBits(Current); + } + } + }; + Dump(); + if (BigEndian2int24u(Teletext_Buffer) == 0x555527 && BigEndian2int32u(Teletext_Buffer + 41) == 0x20202020) { + // Store pos when Clock Run-In and Framing Code as well of last 0 padding bytes are found + // 0 = frame count, 1 = sum of first 1 bit, 2 = sum of last 1 bit + Stream.Private[0]++; + Stream.Private[1] += First1BitPos; + Stream.Private[2] += Last1BitPos; + } + else if (Stream.Private[0]) { + // Ever it is not Teletext or no last 0 padding bytes so more difficult to find the exact step, using previous values + First1BitPos = Stream.Private[1] / Stream.Private[0]; + Last1BitPos = Stream.Private[2] / Stream.Private[0]; + Step = (Last1BitPos - First1BitPos) / 357; + Dump(); + if (BigEndian2int24u(Teletext_Buffer) != 0x555527) { + return; // Clock Run-In and Framing Code not found + } + } + else { + return; // Clock Run-In and Framing Code not found + } + + // Parse the characters + if (!Stream.Parser) + { + Stream.Parser = new File_Teletext; + Stream.Type = VbiType_Teletext; + Open_Buffer_Init(Stream.Parser); + } + Open_Buffer_Continue(Stream.Parser, Teletext_Buffer, 45); + Element_Offset = Element_Size; +} + //*************************************************************************** // C++ //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.h b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.h index 2fa0121fb1..fb2f238ddc 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Multiple/File_Vbi.h @@ -23,6 +23,15 @@ namespace MediaInfoLib { +//--------------------------------------------------------------------------- +enum vbi_type { + VbiType_Unknown, + VbiType_Line21, + VbiType_Vitc, + VbiType_Teletext, + VbiType_Max +}; + //*************************************************************************** // Class File_Vbi //*************************************************************************** @@ -30,14 +39,13 @@ namespace MediaInfoLib class File_Vbi : public File__Analyze { public : - - #if defined(MEDIAINFO_TELETEXT_YES) - File__Analyze* Teletext_Parser; - #endif //defined(MEDIAINFO_TELETEXT_YES) - + int8u WrappingType; + int8u SampleCoding; + int16u LineNumber; + bool IsLast; + //Constructor/Destructor File_Vbi(); - ~File_Vbi(); private : //Streams management @@ -46,6 +54,24 @@ private : //Buffer - Global void Read_Buffer_Continue(); void Read_Buffer_Unsynched(); + + //Elements + void Parse(); + void Line21(); + void Vitc(); + void Teletext(); + + //Stream + struct stream { + File__Analyze* Parser = nullptr; + vbi_type Type = VbiType_Unknown; + float Private[4] = {}; + + ~stream() { + delete Parser; //Parser=NULL; + } + }; + std::map Streams; }; } //NameSpace diff --git a/src/ExtLib/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp b/src/ExtLib/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp index 8eb1b91e8d..a1da516008 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Tag/File_Id3v2.cpp @@ -508,16 +508,30 @@ void File_Id3v2::Header_Parse() Element_WaitForMoreData(); return; } - for (size_t Element_Offset_Unsynch=0; Element_Offset_Unsynch+2Buffer_Size) + auto Buffer_Cur2=Buffer_Cur+1; + if (!*Buffer_Cur2) { - Element_WaitForMoreData(); - return; + Unsynch_List.push_back(Buffer_Cur2-Buffer_Beg); + if (Id3v2_Version<4) + { + Size++; + Buffer_End++; + if (Buffer_Offset+(size_t)Element_Offset+Size>Buffer_Size) + { + Element_WaitForMoreData(); + return; + } + } } } + } } //Filling @@ -554,19 +568,6 @@ void File_Id3v2::Data_Parse() int64u Save_File_Offset=File_Offset; size_t Save_Buffer_Offset=Buffer_Offset; int64u Save_Element_Size=Element_Size; - std::vector Unsynch_List; - if ((Unsynchronisation_Global || Unsynchronisation_Frame) && Element_Size-Element_Offset>1) - { - auto Buffer_Beg=Buffer+Buffer_Offset; - auto Buffer_Cur=Buffer_Beg+(size_t)Element_Offset; - Buffer_Beg--; - auto Buffer_End=Buffer_Beg+(size_t)Element_Size; - for (; Buffer_Cur=Element_Size) - { - Unsynch_List.resize(Pos-1); - break; - } size_t Save_Buffer_Begin =Pos1; size_t Size= Pos0-Pos1; - auto NextPos=Buffer_Unsynch_Begin+Size; - if (NextPos>Element_Size) - Size=Element_Size-Buffer_Unsynch_Begin; std::memcpy(Buffer_Unsynch+Buffer_Unsynch_Begin, Save_Buffer+Save_Buffer_Offset+Save_Buffer_Begin, Size); } Buffer=Buffer_Unsynch; @@ -788,6 +781,7 @@ void File_Id3v2::Data_Parse() delete[] Buffer; Buffer=Save_Buffer; Buffer_Unsynch=NULL; //Same as Buffer... Element_Offset+=Unsynch_List.size(); + Unsynch_List.clear(); } if (Element_Offset Unsynch_List; //Helpers void Fill_Name(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp b/src/ExtLib/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp index 2b47894b57..2ba0071cd7 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Tag/File_VorbisCom.cpp @@ -37,6 +37,26 @@ extern std::string ExtensibleWave_ChannelMask (int32u ChannelMask); //In Multipl extern std::string ExtensibleWave_ChannelMask2 (int32u ChannelMask); //In Multiple/File_Riff_Elements.cpp extern std::string ExtensibleWave_ChannelMask_ChannelLayout(int32u ChannelMask); //In Multiple/File_Riff_Elements.cpp +//--------------------------------------------------------------------------- +const char* VorbisCom_ToIgnore[]= +{ + "BUYCDURL", + "MUSICBRAINZ_ALBUMID", + "MUSICBRAINZ_ALBUMARTISTID", + "MUSICBRAINZ_ARTISTID", + "MUSICBRAINZ_TRACKID", + "MUSICBRAINZ_DISCID", + "NULL", + "REPLAYGAIN_REFERENCE_LOUDNESS", +}; +bool VorbisCom_CheckToIgnore(const string& Key) +{ + for (const auto ToIgnore : VorbisCom_ToIgnore) + if (ToIgnore==Key) + return true; + return false; +} + //*************************************************************************** // Constructor/Destructor //*************************************************************************** @@ -219,7 +239,6 @@ void File_VorbisCom::Data_Parse() else if (Key==__T("ALBUMARTIST")) AlbumArtists.push_back(Value); else if (Key==__T("ARTIST")) Artists.push_back(Value); else if (Key==__T("AUTHOR")) Fill(StreamKind_Common, 0, "WrittenBy", Value); - else if (Key==__T("BUYCDURL")) {} else if (Key==__T("BWFVERSION")) // bext { Fill(Stream_General, 0, "bext_Present", "Yes"); @@ -264,13 +283,7 @@ void File_VorbisCom::Data_Parse() else if (Key==__T("LYRICS")) Fill(StreamKind_Common, 0, "Lyrics", Value); else if (Key==__T("LWING_GAIN")) Fill(StreamKind_Multiple, 0, "ReplayGain_Gain", Value.To_float64(), 2); else if (Key==__T("LOCATION")) Fill(StreamKind_Common, 0, "Recorded/Location", Value); - else if (Key==__T("MUSICBRAINZ_ALBUMID")) {} - else if (Key==__T("MUSICBRAINZ_ALBUMARTISTID")) {} - else if (Key==__T("MUSICBRAINZ_ARTISTID")) {} - else if (Key==__T("MUSICBRAINZ_TRACKID")) {} else if (Key==__T("MUSICBRAINZ_SORTNAME")) Fill(StreamKind_Common, 0, "Performer/Sort", Value); - else if (Key==__T("MUSICBRAINZ_DISCID")) {} - else if (Key==__T("NULL")) {} else if (Key==__T("ORGANIZATION")) Fill(StreamKind_Common, 0, "Producer", Value); else if (Key==__T("ORIGINATOR")) Fill(StreamKind_Common, 0, "Producer", Value); else if (Key==__T("PERFORMER")) Performers.push_back(Value); @@ -279,7 +292,6 @@ void File_VorbisCom::Data_Parse() else if (Key==__T("RATING")) Fill(StreamKind_Multiple, 0, "Rating", Value); else if (Key==__T("REPLAYGAIN_ALBUM_GAIN")) Fill(StreamKind_Common, 0, "Album_ReplayGain_Gain", Value.To_float64(), 2); else if (Key==__T("REPLAYGAIN_ALBUM_PEAK")) Fill(StreamKind_Common, 0, "Album_ReplayGain_Peak", Value.To_float64(), 6); - else if (Key==__T("REPLAYGAIN_REFERENCE_LOUDNESS")) {} else if (Key==__T("REPLAYGAIN_TRACK_GAIN")) Fill(StreamKind_Specific, 0, "ReplayGain_Gain", Value.To_float64(), 2); else if (Key==__T("REPLAYGAIN_TRACK_PEAK")) Fill(StreamKind_Specific, 0, "ReplayGain_Peak", Value.To_float64(), 6); else if (Key==__T("REFERENCE")) Fill(StreamKind_Common, 0, "Producer_Reference", Value); @@ -408,6 +420,13 @@ void File_VorbisCom::Data_Parse() } Fill(Stream_Menu, StreamPos_Last, Menu_Chapters_Pos_End, Count_Get(Stream_Menu, StreamPos_Last), 10, true); } + else if (VorbisCom_CheckToIgnore(Key.To_UTF8())) + { + #if MEDIAINFO_ADVANCED + Fill(Stream_General, 0, Key.To_UTF8().c_str(), Value); + Fill_SetOptions(Stream_General, 0, Key.To_UTF8().c_str(), "N NTY"); + #endif //MEDIAINFO_ADVANCED + } else Fill(Stream_General, 0, comment.SubString(__T(""), __T("=")).To_UTF8().c_str(), Value); FILLING_END(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Cdp.cpp b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Cdp.cpp index d185f0c7da..fd08c4691e 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Cdp.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Cdp.cpp @@ -354,7 +354,8 @@ void File_Cdp::Data_Parse() } FILLING_BEGIN(); - Frame_Count++; + if (!Status[IsFilled] && Frame_Count>=1024 && Config->ParseSpeed<1.0) + Fill(); if (!IsSub && Config->ParseSpeed<1.0 && Frame_Count>=300) Finish(); FILLING_END(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia608.cpp b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia608.cpp index 81b99ab880..8295ea5075 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia608.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia608.cpp @@ -114,7 +114,7 @@ void File_Eia608::Streams_Fill() } for (size_t Pos=0; PosFile_Eia608_DisplayEmptyStream_Get())) + if ((Streams[Pos] && (DataDetected[1+Pos] || !Config->File_CommandOnlyMeansEmpty_Get())) || (Pos<2 && Config->File_Eia608_DisplayEmptyStream_Get())) { Stream_Prepare(Stream_Text); Fill(Stream_Text, StreamPos_Last, Text_Format, "EIA-608"); @@ -339,6 +339,9 @@ void File_Eia608::Read_Buffer_AfterParsing() FrameInfo.DTS=(int64u)-1; FrameInfo.PTS=(int64u)-1; } + + if (Status[IsFilled] && Frame_Count>=1024 && Config->ParseSpeed<1.0) + Fill(); } //--------------------------------------------------------------------------- @@ -711,10 +714,9 @@ void File_Eia608::PreambleAddressCode(int8u cc_data_1, int8u cc_data_2) { Streams[StreamPos]->Count_PaintOn++; Streams[StreamPos]->Count_CurrentHasContent=false; - if (Streams[StreamPos]->FirstDisplay_Delay_Type==(int8u)-1) + if (!HasJumped && Streams[StreamPos]->FirstDisplay_Delay_Type==(int8u)-1) { - if (!HasJumped) - Streams[StreamPos]->FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; + Streams[StreamPos]->FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; Streams[StreamPos]->FirstDisplay_Delay_Type=2; } } @@ -1033,10 +1035,9 @@ void File_Eia608::Special_14(int8u cc_data_2) { Stream.Count_PaintOn++; Stream.Count_CurrentHasContent=false; - if (Stream.FirstDisplay_Delay_Type==(int8u)-1) + if (!HasJumped && Stream.FirstDisplay_Delay_Type==(int8u)-1) { - if (!HasJumped) - Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; + Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; Stream.FirstDisplay_Delay_Type=2; } } @@ -1057,10 +1058,9 @@ void File_Eia608::Special_14(int8u cc_data_2) if (Stream.RollUpLines && Stream.Count_CurrentHasContent) { Stream.Count_RollUp++; - if (Stream.FirstDisplay_Delay_Type==(int8u)-1) + if (!HasJumped && Stream.FirstDisplay_Delay_Type==(int8u)-1) { - if (HasJumped) - Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; + Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; Stream.FirstDisplay_Delay_Type=1; } } @@ -1097,10 +1097,9 @@ void File_Eia608::Special_14(int8u cc_data_2) HasChanged(); Stream.Synched=false; Stream.Count_PopOn++; - if (Stream.FirstDisplay_Delay_Type==(int8u)-1) + if (!HasJumped && Stream.FirstDisplay_Delay_Type==(int8u)-1) { - if (!HasJumped) - Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; + Stream.FirstDisplay_Delay_Frames=Frame_Count_NotParsedIncluded; Stream.FirstDisplay_Delay_Type=0; } } diff --git a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia708.cpp b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia708.cpp index 03c4d1a52a..df4220fa6f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia708.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Eia708.cpp @@ -90,7 +90,7 @@ void File_Eia708::Streams_Fill() } for (size_t Pos=0; PosFile_Eia708_DisplayEmptyStream_Get())) + if ((Streams[Pos] && ((DataDetected&((int64u)1)<File_CommandOnlyMeansEmpty_Get())) || (Pos && Pos<2 && Config->File_Eia708_DisplayEmptyStream_Get())) { Stream_Prepare(Stream_Text); Fill(Stream_Text, StreamPos_Last, Text_ID, Pos); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Teletext.cpp b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Teletext.cpp index 69bcb094c7..0690ef630c 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Text/File_Teletext.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Text/File_Teletext.cpp @@ -70,6 +70,7 @@ File_Teletext::File_Teletext() //--------------------------------------------------------------------------- File_Teletext::~File_Teletext() { + delete Parser; //Parser=NULL; } //*************************************************************************** diff --git a/src/ExtLib/MediaInfo/MediaInfo/TimeCode.h b/src/ExtLib/MediaInfo/MediaInfo/TimeCode.h index f6e8fe2297..e07fc9ae5a 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/TimeCode.h +++ b/src/ExtLib/MediaInfo/MediaInfo/TimeCode.h @@ -23,12 +23,12 @@ namespace ZenLib // Class bitset8 //*************************************************************************** -#if __cplusplus >= 201400 || (_MSC_VER >= 1910 && _MSVC_LANG >= 201400) +#if __cplusplus >= 201400 || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSVC_LANG >= 201400) #define constexpr14 constexpr #else #define constexpr14 #endif -#if __cplusplus >= 202000 || (_MSC_VER >= 1910 && _MSVC_LANG >= 202000) +#if __cplusplus >= 202000 || (defined(_MSC_VER) && _MSC_VER >= 1910 && _MSVC_LANG >= 202000) #define constexpr20 constexpr #else #define constexpr20 @@ -268,7 +268,7 @@ class TimeCode return GetHours() == tc.GetHours() && GetMinutes() == tc.GetMinutes() && GetSeconds() == tc.GetSeconds() - && GetFrames() == tc.GetFrames(); + && GetFrames() * (tc.GetFramesMax() + 1) == tc.GetFrames() * (GetFramesMax() + 1); } bool operator!= (const TimeCode& tc) const { diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.cpp index d0ae1a89da..66ffd8fe00 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.cpp @@ -78,6 +78,14 @@ const char* Av1_frame_type[4] = "Switch", }; +//--------------------------------------------------------------------------- +static const char* Av1_chroma_sample_position[3] = +{ + "Type 0", + "Type 2", + "3", +}; + //*************************************************************************** // Constructor/Destructor //*************************************************************************** @@ -251,7 +259,7 @@ void File_Av1::sequence_header() { //Parsing int32u max_frame_width_minus_1, max_frame_height_minus_1; - int8u seq_profile, seq_level_idx[33], operating_points_cnt_minus_1, buffer_delay_length_minus_1, frame_width_bits_minus_1, frame_height_bits_minus_1, seq_force_screen_content_tools, BitDepth, color_primaries, transfer_characteristics, matrix_coefficients; + int8u seq_profile, seq_level_idx[33], operating_points_cnt_minus_1, buffer_delay_length_minus_1, frame_width_bits_minus_1, frame_height_bits_minus_1, seq_force_screen_content_tools, BitDepth, color_primaries, transfer_characteristics, matrix_coefficients, chroma_sample_position; bool reduced_still_picture_header, seq_tier[33], timing_info_present_flag, decoder_model_info_present_flag, seq_choose_screen_content_tools, mono_chrome, color_range, color_description_present_flag, subsampling_x, subsampling_y; BS_Begin(); Get_S1 ( 3, seq_profile, "seq_profile"); Param_Info1(Av1_seq_profile(seq_profile)); @@ -408,7 +416,7 @@ void File_Av1::sequence_header() } } if (subsampling_x && subsampling_y) - Skip_S1( 2, "chroma_sample_position"); + Get_S1 ( 2, chroma_sample_position, "chroma_sample_position"); } Skip_SB( "separate_uv_delta_q"); Element_End0(); @@ -430,7 +438,11 @@ void File_Av1::sequence_header() Fill(Stream_Video, 0, Video_BitDepth, BitDepth); Fill(Stream_Video, 0, Video_ColorSpace, mono_chrome?"Y":((color_primaries==1 && transfer_characteristics==13 && matrix_coefficients==0)?"RGB":"YUV")); if (Retrieve(Stream_Video, 0, Video_ColorSpace)==__T("YUV")) + { Fill(Stream_Video, 0, Video_ChromaSubsampling, subsampling_x?(subsampling_y?"4:2:0":"4:2:2"):"4:4:4"); // "!subsampling_x && subsampling_y" (4:4:0) not possible + if (subsampling_x && subsampling_y && chroma_sample_position) + Fill(Stream_Video, 0, Video_ChromaSubsampling_Position, Av1_chroma_sample_position[chroma_sample_position-1]); + } if (color_description_present_flag) { Fill(Stream_Video, 0, Video_colour_description_present, "Yes"); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.h b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.h index f88f465a95..c991f4191f 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Av1.h @@ -27,7 +27,6 @@ class File_Av1 : public File__Analyze public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; //Constructor/Destructor File_Av1(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.cpp index 21c2827fb2..2020049706 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.cpp @@ -657,7 +657,6 @@ File_Avc::File_Avc() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; PTS_DTS_Needed=true; StreamSource=IsStream; Frame_Count_NotParsedIncluded=0; @@ -1879,19 +1878,13 @@ void File_Avc::Header_Parse() Size=Size_; } break; + default: Trusted_IsNot("No size of NALU defined"); + Header_Fill_Size(Buffer_Size-Buffer_Offset); + return; } - if (Size>Element_Size-Element_Offset) - { - if (File_Offset+Buffer_Size==File_Size) - Size=Element_Size-Element_Offset; //Partial but end of file so we do with what we have - else - { - Size=Element_Size-Element_Offset; //If Size is 0 or Size biger than sample size, it is not normal, we skip the complete frame - Element_Offset=Element_Size; - } - } - Size+=Element_Offset; - Header_Fill_Size(Size); + if (Element_Size<(int64u)SizeOfNALU_Minus1+1+1 || Size>Element_Size-Element_Offset) + return RanOutOfData("AVC"); + Header_Fill_Size(Element_Offset+Size); BS_Begin(); Mark_0 (); Get_S1 ( 2, nal_ref_idc, "nal_ref_idc"); @@ -4786,6 +4779,10 @@ void File_Avc::SPS_PPS() MustParse_SPS_PPS=false; if (!Status[IsAccepted]) Accept("AVC"); + FILLING_ELSE(); + Frame_Count_NotParsedIncluded--; + RanOutOfData("AVC"); + Frame_Count_NotParsedIncluded++; FILLING_END(); } diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.h b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.h index feed61e994..a739e6a31b 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Avc.h @@ -33,7 +33,6 @@ class File_Avc : public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; bool MustParse_SPS_PPS; bool SizedBlocks; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.cpp index c6bddac189..716ca619c6 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.cpp @@ -170,7 +170,6 @@ File_AvsV::File_AvsV() { //Config MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; //In Frame_Count_Valid=30; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.h b/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.h index 11480b6f13..ad0c73f3d0 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_AvsV.h @@ -32,7 +32,6 @@ class File_AvsV : public File__Analyze public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; //constructor/Destructor File_AvsV(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Dirac.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Dirac.cpp index 42e21fac0a..3dac305603 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Dirac.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Dirac.cpp @@ -407,7 +407,6 @@ File_Dirac::File_Dirac() { //Configuration MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; //In Frame_Count_Valid=1; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.cpp index d380c45626..230c05b552 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.cpp @@ -483,6 +483,8 @@ File_Ffv1::File_Ffv1() sample_aspect_ratio_den = 0; KeyFramePassed = false; memset(context_count, 0, MAX_QUANT_TABLES*sizeof(int32u)); + + Frame_Count_NotParsedIncluded=0; } //--------------------------------------------------------------------------- @@ -699,6 +701,8 @@ void File_Ffv1::Read_Buffer_OutOfBand() if (CRC_32) Param_Error("FFV1-HEADER-configuration_record_crc_parity:1"); Element_End0(); + + Merge_Conformance(true); } //--------------------------------------------------------------------------- @@ -707,10 +711,13 @@ void File_Ffv1::Skip_Frame() Skip_XX(Element_Size-Element_Offset, "Data"); Frame_Count++; + if (Frame_Count_NotParsedIncluded!=(int64u)-1) + Frame_Count_NotParsedIncluded++; delete RC; RC = NULL; + Merge_Conformance(); Fill(); if (Config->ParseSpeed<1.0) Finish(); @@ -722,6 +729,13 @@ void File_Ffv1::Read_Buffer_Continue() if (!Buffer_Size) return; + if (Frame_Count==0) + { + #if MEDIAINFO_MACROBLOCKS + ParseCompletely=Config->File_Macroblocks_Parse_Get(); + #endif //MEDIAINFO_MACROBLOCKS + } + if (ConfigurationRecord_IsPresent && !Parameters_IsValid) { Skip_Frame(); @@ -743,20 +757,8 @@ void File_Ffv1::Read_Buffer_Continue() KeyFramePassed=true; if (!ConfigurationRecord_IsPresent && keyframe) - { - #if MEDIAINFO_TRACE - bool Trace_Activated_Save=Trace_Activated; - if (Trace_Activated && Frame_Count) - Trace_Activated=false; // Trace is relatively huge, temporarary deactivating it. TODO: an option for it - #endif //MEDIAINFO_TRACE - Parameters(); - #if MEDIAINFO_TRACE - Trace_Activated=Trace_Activated_Save; // Trace is too huge, reactivating it. - #endif //MEDIAINFO_TRACE - } - if (!Parameters_IsValid || !KeyFramePassed) { Skip_Frame(); @@ -830,13 +832,13 @@ void File_Ffv1::Read_Buffer_Continue() ParseContent=true; //SliceContent - #if MEDIAINFO_TRACE - if (ParseContent && (!Frame_Count || Trace_Activated) && current_slice->w && current_slice->h) // Parse slice only if trace feature is activated + #if MEDIAINFO_TRACE || MEDIAINFO_MACROBLOCKS + if (ParseContent && (ParseCompletely || Trace_Activated) && current_slice->w && current_slice->h) // Parse slice only if trace feature is activated { SliceContent(States); } else - #endif //MEDIAINFO_TRACE + #endif //MEDIAINFO_TRACE || MEDIAINFO_MACROBLOCKS Skip_XX(Element_Size-Element_Offset, "SliceContent"); if (version<=1 && Element_Offset+5==Element_Size) { @@ -900,7 +902,7 @@ void File_Ffv1::Read_Buffer_Continue() } //Integrity test - if (!BuggySlices && version>=3 && slices) + if (!BuggySlices && version>=3 && slices && (ParseCompletely || Trace_Activated)) { vector SlicesPlaces; size_t SlicesPlaces_Size=num_h_slices*num_v_slices; @@ -934,11 +936,14 @@ void File_Ffv1::Read_Buffer_Continue() } Frame_Count++; + if (Frame_Count_NotParsedIncluded!=(int64u)-1) + Frame_Count_NotParsedIncluded++; FILLING_END(); delete RC; RC = NULL; + Merge_Conformance(); Fill(); if (Config->ParseSpeed<1.0) Finish(); @@ -996,8 +1001,8 @@ void File_Ffv1::Parameters() Element_End0(); return; } - if (Frame_Count==0) - Accept(); //TODO: better check without removing error info in trace + if (!Status[IsAccepted]) + Accept(); Get_RU (States, coder_type, "coder_type"); if (coder_type>2) { @@ -1198,7 +1203,7 @@ void File_Ffv1::Parameters() } //Filling - if (Frame_Count==0) + if (Retrieve_Const(Stream_Video, 0, Video_BitDepth).empty()) { Fill(Stream_Video, 0, "coder_type", Ffv1_coder_type(coder_type)); Fill(Stream_Video, 0, Video_BitDepth, bits_per_raw_sample); @@ -1251,9 +1256,9 @@ void File_Ffv1::Parameters() ChromaSubsampling+=":4"; Fill(Stream_Video, 0, Video_ChromaSubsampling, ChromaSubsampling); } - - Parameters_IsValid=true; } + + Parameters_IsValid=true; FILLING_END(); } @@ -1323,6 +1328,10 @@ void File_Ffv1::SliceContent(states &States) RC->get_rac(&s); } + #if MEDIAINFO_TRACE + Trace_Activated=Trace_Activated_Save; // Trace is too huge, reactivating after during pixel decoding + #endif //MEDIAINFO_TRACE + if (BS->BufferUnderRun || RC->Underrun()) Element_Error("FFV1-SLICE-SliceContent:1"); @@ -1335,9 +1344,6 @@ void File_Ffv1::SliceContent(states &States) //Decode(Buffer, Buffer_Size); #endif //MEDIAINFO_DECODE - #if MEDIAINFO_TRACE - Trace_Activated=Trace_Activated_Save; // Trace is too huge, reactivating after during pixel decoding - #endif //MEDIAINFO_TRACE Element_End0(); } @@ -1671,7 +1677,14 @@ int32s File_Ffv1::pixel_GR(int32s context) if (current_slice->run_mode == RUN_MODE_STOP) { if (context) + { + if (context >= Context_GR_Size) + { + BS->Skip(BS->Remain()); + return 0; + } return get_symbol_with_bias_correlation(&Context_GR[context]); // If not running, get the symbol + } current_slice->run_mode = RUN_MODE_PROCESSING; // New symbol, go to "run mode" } @@ -1761,6 +1774,7 @@ void File_Ffv1::line(int pos, pixel_t *sample[2]) current_slice->run_mode_init(); Context_GR = current_slice->contexts[pos]; + Context_GR_Size = context_count[pos]; x = 0; while (s0c < s0e) diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.h b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.h index f361a47f0d..5ed50fed00 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Ffv1.h @@ -244,7 +244,13 @@ private : #define Info_RC(_STATE, _INFO, _NAME) Skip_RC_(_STATE) #define Info_RU(_STATE, _INFO, _NAME) Skip_RU_(_STATE) #define Info_RS(_STATE, _INFO, _NAME) Skip_RS_(_STATE) + static constexpr auto Trace_Activated=false; #endif //MEDIAINFO_TRACE + #if MEDIAINFO_MACROBLOCKS + int ParseCompletely; + #else //MEDIAINFO_MACROBLOCKS + static constexpr int ParseCompletely=0; + #endif //MEDIAINFO_MACROBLOCKS RangeCoder* RC; Slice *slices; Slice *current_slice; @@ -289,6 +295,7 @@ private : int32s bits_mask3; states_context_plane Context_RC; // Range Coder context Slice::ContextPtr Context_GR; // Rice Golomb context + size_t Context_GR_Size; size_t x; states_context_plane plane_states[MAX_QUANT_TABLES]; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.cpp index 9cfa2ab365..acc335e42a 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.cpp @@ -38,14 +38,14 @@ namespace MediaInfoLib //--------------------------------------------------------------------------- static const char* H263_Source_Format[]= { - "", + nullptr, "sub-QCIF", "QCIF", "CIF", "4CIF", "16CIF", - "", - "", + nullptr, + nullptr, }; //--------------------------------------------------------------------------- @@ -129,8 +129,9 @@ File_H263::File_H263() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; StreamSource=IsStream; + Buffer_TotalBytes_FirstSynched_Max=1024*1024; + Trusted_Multiplier=2; //In Frame_Count_Valid=0; @@ -164,12 +165,15 @@ void File_H263::Streams_Fill() Fill(Stream_Video, 0, Video_Format, "H.263"); Fill(Stream_Video, 0, Video_Codec, "H.263"); - Fill(Stream_Video, 0, Video_Width, H263_Source_Format_Width[Source_Format]); - Fill(Stream_Video, 0, Video_Height, H263_Source_Format_Height[Source_Format]); + if (H263_Source_Format_Width[Source_Format]) + Fill(Stream_Video, 0, Video_Width, H263_Source_Format_Width[Source_Format]); + if (H263_Source_Format_Height[Source_Format]) + Fill(Stream_Video, 0, Video_Height, H263_Source_Format_Height[Source_Format]); Fill(Stream_Video, 0, Video_ColorSpace, "YUV"); Fill(Stream_Video, 0, Video_ChromaSubsampling, "4:2:0"); Fill(Stream_Video, 0, Video_BitDepth, 8); - Fill(Stream_Video, 0, Video_PixelAspectRatio, ((float32)PAR_W)/PAR_H, 3); + if (PAR_W && PAR_H) + Fill(Stream_Video, 0, Video_PixelAspectRatio, ((float32)PAR_W)/PAR_H, 3); } //--------------------------------------------------------------------------- @@ -185,9 +189,11 @@ void File_H263::Streams_Finish() bool File_H263::Synchronize() { //Synchronizing - while(Buffer_Offset+3<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00 + while(Buffer_Offset+5<=Buffer_Size && (Buffer[Buffer_Offset ]!=0x00 || Buffer[Buffer_Offset+1]!=0x00 - || (Buffer[Buffer_Offset+2]&0xFC)!=0x80)) + || (Buffer[Buffer_Offset+2]&0xFC)!=0x80 + || (Buffer[Buffer_Offset+3]&0x03)!=0x02 + || (Buffer[Buffer_Offset+4]&0x1C)==0x00)) { Buffer_Offset+=2; while(Buffer_OffsetBuffer_Size) + if (Buffer_Offset+5>Buffer_Size) + { + if (Frame_Count==0 && Buffer_TotalBytes+Buffer_Offset>Buffer_TotalBytes_FirstSynched_Max) + Reject(); return false; + } //Synched is OK Synched=true; @@ -219,14 +234,23 @@ bool File_H263::Synchronize() bool File_H263::Synched_Test() { //Must have enough buffer for having header - if (Buffer_Offset+4>Buffer_Size) + if (Buffer_Size-Buffer_Offset<=4) return false; //Quick test of synchro if (Buffer[Buffer_Offset ]!=0x00 || Buffer[Buffer_Offset+1]!=0x00 - || (Buffer[Buffer_Offset+2]&0xFC)!=0x80) + || (Buffer[Buffer_Offset+2]&0xFC)!=0x80 + || (Buffer[Buffer_Offset+3]&0x03)!=0x02 + || (Buffer[Buffer_Offset+4]&0x1C)==0x00 + || (Buffer_Size>=0x100000 && !Header_Parser_Fill_Size())) //Preventing waiting too much after a false positive sync { + if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max) + Trusted=0; + if (!Status[IsFilled]) + Frame_Count=0; // Back to start of sync + Trusted_IsNot("Sync issue"); + Buffer_Offset++; Synched=false; return true; } @@ -315,21 +339,23 @@ void File_H263::Data_Parse() Temporal_Reference=Temporal_Reference_Temp; Temporal_Reference_IsValid=true; } - else - Temporal_Reference++; - if (Temporal_Reference_Temp!=Temporal_Reference) + if (Temporal_Reference_Temp==Temporal_Reference || ((int8u)(Temporal_Reference_Temp-Temporal_Reference)>8 && (int8u)(Temporal_Reference-Temporal_Reference_Temp)>8)) { + if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max) + Trusted=0; + if (!Status[IsFilled]) + Frame_Count=0; // Back to start of sync Trusted_IsNot("Out of Order"); - Open_Buffer_Unsynch(); return; } + Temporal_Reference=Temporal_Reference_Temp; Element_Begin1("Type Information (PTYPE)"); Mark_1(); Mark_0(); Skip_SB( "Split screen indicator"); Skip_SB( "Document camera indicator"); Skip_SB( "Full Picture Freeze Release"); - Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]); + Get_S1 (3, Source_Format, "Source Format"); Param_Info1C(H263_Source_Format[Source_Format], H263_Source_Format[Source_Format]); if (Source_Format!=7) { Skip_SB( "Picture Coding Type"); @@ -350,7 +376,7 @@ void File_H263::Data_Parse() break; case 1 : Element_Begin1("Optional Part of PLUSPTYPE (OPPTYPE)"); - Get_S1 (3, Source_Format, "Source Format"); Param_Info1(H263_Source_Format[Source_Format]); + Get_S1 (3, Source_Format, "Source Format"); Param_Info1C(H263_Source_Format[Source_Format], H263_Source_Format[Source_Format]); Skip_SB( "Custom PCF"); Skip_SB( "Unrestricted Motion Vector (UMV) mode"); Skip_SB( "Syntax-based Arithmetic Coding (SAC) mode"); @@ -410,6 +436,16 @@ void File_H263::Data_Parse() Skip_XX(Element_Size-Element_Offset, "Other data"); FILLING_BEGIN(); + if (!H263_Source_Format[Source_Format]) + { + if (Frame_Count==0 && Buffer_TotalBytes>Buffer_TotalBytes_FirstSynched_Max) + Trusted=0; + if (!Status[IsFilled]) + Frame_Count=0; // Back to start of sync + Trusted_IsNot("Source_Format"); + return; + } + Element_Info1(Frame_Count); Frame_Count++; diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.h b/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.h index 5d1339cf7b..9f9037afb0 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.h +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_H263.h @@ -31,7 +31,6 @@ class File_H263 : public File__Analyze public : //In int64u Frame_Count_Valid; - bool FrameIsAlwaysComplete; //Constructor/Destructor File_H263(); diff --git a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Hevc.cpp b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Hevc.cpp index 02b5432377..1c8250faf5 100644 --- a/src/ExtLib/MediaInfo/MediaInfo/Video/File_Hevc.cpp +++ b/src/ExtLib/MediaInfo/MediaInfo/Video/File_Hevc.cpp @@ -189,7 +189,6 @@ File_Hevc::File_Hevc() Trace_Layers_Update(8); //Stream #endif //MEDIAINFO_TRACE MustSynchronize=true; - Buffer_TotalBytes_FirstSynched_Max=64*1024; PTS_DTS_Needed=true; StreamSource=IsStream; Frame_Count_NotParsedIncluded=0; @@ -1124,13 +1123,11 @@ void File_Hevc::Header_Parse() case 3: Get_B4 (Size, "size"); break; default: Trusted_IsNot("No size of NALU defined"); - Size=(int32u)(Buffer_Size-Buffer_Offset); + Header_Fill_Size(Buffer_Size-Buffer_Offset); + return; } - Size+=lengthSizeMinusOne+1; - - //Coherency checking - if (SizeBuffer_Size || (Buffer_Offset+Size!=Buffer_Size && Buffer_Offset+Size+lengthSizeMinusOne+1>Buffer_Size)) - Size=Buffer_Size-Buffer_Offset; + if (Element_Size<(int64u)lengthSizeMinusOne+1+2 || Size>Element_Size-Element_Offset) + return RanOutOfData("HEVC"); //In case there are more than 1 NAL in the block (in Stream format), trying to find the first NAL being a slice size_t Buffer_Offset_Temp=Buffer_Offset+lengthSizeMinusOne+1; @@ -1150,9 +1147,11 @@ void File_Hevc::Header_Parse() if (Buffer_Offset_Temp+3<=Buffer_Offset+Size) { SizedBlocks_FileThenStream=File_Offset+Buffer_Offset+Size; - Size=Buffer_Offset_Temp-Buffer_Offset; + Size=Buffer_Offset_Temp-(Buffer_Offset+Element_Offset); } + Header_Fill_Size(Element_Offset+Size); + BS_Begin(); Mark_0 (); Get_S1 (6, nal_unit_type, "nal_unit_type"); @@ -1162,10 +1161,6 @@ void File_Hevc::Header_Parse() //if (nuh_temporal_id_plus1==0) // Found 1 stream with nuh_temporal_id_plus1==0, lets disable this coherency test for the moment // Trusted_IsNot("nuh_temporal_id_plus1"); - - FILLING_BEGIN(); - Header_Fill_Size(Size); - FILLING_END(); } //Filling @@ -1711,6 +1706,8 @@ void File_Hevc::video_parameter_set() int8u ViewOrderIdx[64]; //int8u DependencyId[64]; //int8u AuxId[64]; + memset(ScalabilityId, -1, 64 * 16 * sizeof(int8u)); + memset(ViewOrderIdx, -1, 64 * sizeof(int8u)); for (int i = 0; i <= MaxLayersMinus1; i++) { auto lId = layer_id_in_nuh[i]; @@ -1738,7 +1735,10 @@ void File_Hevc::video_parameter_set() { view_id_val.resize(64, -1); for (int i=0; i Date: Tue, 4 Jun 2024 13:59:05 +0200 Subject: [PATCH 37/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20Little-CMS=20git-lcms2.16-59-g2daf5?= =?UTF-8?q?c5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 1 + docs/Changelog.txt | 1 + src/ExtLib/lcms2/src/cmscgats.c | 157 ++-- src/ExtLib/lcms2/src/cmsgmt.c | 1318 +++++++++++++++---------------- src/ExtLib/lcms2/src/cmsio0.c | 5 + src/ExtLib/lcms2/src/cmsmd5.c | 8 +- src/ExtLib/lcms2/src/cmsps2.c | 19 +- 7 files changed, 784 insertions(+), 725 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 57be707903..23a9d93e7a 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -30,6 +30,7 @@ MPCVideoDec Обновлены библиотеки: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; + Little-CMS git-lcms2.16-59-g2daf5c5; MediaInfo git-v24.05-gd9ba2b6c; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index aba9b48e52..e5aecd1f77 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -30,6 +30,7 @@ Updated Spanish translation (by IPeluchito). Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; + Little-CMS git-lcms2.16-59-g2daf5c5; MediaInfo git-v24.05-gd9ba2b6c; vvdec git-v2.3.0-5-gffe3010. diff --git a/src/ExtLib/lcms2/src/cmscgats.c b/src/ExtLib/lcms2/src/cmscgats.c index 52b1094da5..ae2f63cb79 100644 --- a/src/ExtLib/lcms2/src/cmscgats.c +++ b/src/ExtLib/lcms2/src/cmscgats.c @@ -414,11 +414,12 @@ string* StringAlloc(cmsIT8* it8, int max) static void StringClear(string* s) { - s->len = 0; + s->len = 0; + s->begin[0] = 0; } static -void StringAppend(string* s, char c) +cmsBool StringAppend(string* s, char c) { if (s->len + 1 >= s->max) { @@ -426,6 +427,8 @@ void StringAppend(string* s, char c) s->max *= 10; new_ptr = (char*) AllocChunk(s->it8, s->max); + if (new_ptr == NULL) return FALSE; + if (new_ptr != NULL && s->begin != NULL) memcpy(new_ptr, s->begin, s->len); @@ -437,6 +440,8 @@ void StringAppend(string* s, char c) s->begin[s->len++] = c; s->begin[s->len] = 0; } + + return TRUE; } static @@ -446,13 +451,15 @@ char* StringPtr(string* s) } static -void StringCat(string* s, const char* c) +cmsBool StringCat(string* s, const char* c) { while (*c) { - StringAppend(s, *c); + if (!StringAppend(s, *c)) return FALSE; c++; } + + return TRUE; } @@ -801,7 +808,12 @@ void InStringSymbol(cmsIT8* it8) if (it8->ch == '\n' || it8->ch == '\r' || it8->ch == 0) break; else { - StringAppend(it8->str, (char)it8->ch); + if (!StringAppend(it8->str, (char)it8->ch)) { + + SynError(it8, "Out of memory"); + return; + } + NextCh(it8); } } @@ -831,7 +843,11 @@ void InSymbol(cmsIT8* it8) do { - StringAppend(it8->id, (char) it8->ch); + if (!StringAppend(it8->id, (char)it8->ch)) { + + SynError(it8, "Out of memory"); + return; + } NextCh(it8); @@ -875,7 +891,6 @@ void InSymbol(cmsIT8* it8) if ((cmsFloat64Number) it8->inum * 16.0 + (cmsFloat64Number) j > (cmsFloat64Number)+2147483647.0) { SynError(it8, "Invalid hexadecimal number"); - it8->sy = SEOF; return; } @@ -896,8 +911,7 @@ void InSymbol(cmsIT8* it8) if ((cmsFloat64Number) it8->inum * 2.0 + j > (cmsFloat64Number)+2147483647.0) { - SynError(it8, "Invalid binary number"); - it8->sy = SEOF; + SynError(it8, "Invalid binary number"); return; } @@ -950,11 +964,19 @@ void InSymbol(cmsIT8* it8) } StringClear(it8->id); - StringCat(it8->id, buffer); + if (!StringCat(it8->id, buffer)) { + + SynError(it8, "Out of memory"); + return; + } do { - StringAppend(it8->id, (char) it8->ch); + if (!StringAppend(it8->id, (char)it8->ch)) { + + SynError(it8, "Out of memory"); + return; + } NextCh(it8); @@ -1008,8 +1030,7 @@ void InSymbol(cmsIT8* it8) default: - SynError(it8, "Unrecognized character: 0x%x", it8 ->ch); - it8->sy = SEOF; + SynError(it8, "Unrecognized character: 0x%x", it8 ->ch); return; } @@ -1023,25 +1044,22 @@ void InSymbol(cmsIT8* it8) if(it8 -> IncludeSP >= (MAXINCLUDE-1)) { - SynError(it8, "Too many recursion levels"); - it8->sy = SEOF; + SynError(it8, "Too many recursion levels"); return; } InStringSymbol(it8); - if (!Check(it8, SSTRING, "Filename expected")) - { - it8->sy = SEOF; + if (!Check(it8, SSTRING, "Filename expected")) return; - } + FileNest = it8 -> FileStack[it8 -> IncludeSP + 1]; if(FileNest == NULL) { FileNest = it8 ->FileStack[it8 -> IncludeSP + 1] = (FILECTX*)AllocChunk(it8, sizeof(FILECTX)); if (FileNest == NULL) { - SynError(it8, "Out of memory"); - it8->sy = SEOF; + + SynError(it8, "Out of memory"); return; } } @@ -1049,16 +1067,15 @@ void InSymbol(cmsIT8* it8) if (BuildAbsolutePath(StringPtr(it8->str), it8->FileStack[it8->IncludeSP]->FileName, FileNest->FileName, cmsMAX_PATH-1) == FALSE) { - SynError(it8, "File path too long"); - it8->sy = SEOF; + + SynError(it8, "File path too long"); return; } FileNest->Stream = fopen(FileNest->FileName, "rt"); if (FileNest->Stream == NULL) { - SynError(it8, "File %s not found", FileNest->FileName); - it8->sy = SEOF; + SynError(it8, "File %s not found", FileNest->FileName); return; } it8->IncludeSP++; @@ -1073,10 +1090,10 @@ void InSymbol(cmsIT8* it8) static cmsBool CheckEOLN(cmsIT8* it8) { - if (!Check(it8, SEOLN, "Expected separator")) return FALSE; - while (it8 -> sy == SEOLN) - InSymbol(it8); - return TRUE; + if (!Check(it8, SEOLN, "Expected separator")) return FALSE; + while (it8->sy == SEOLN) + InSymbol(it8); + return TRUE; } @@ -1085,8 +1102,8 @@ cmsBool CheckEOLN(cmsIT8* it8) static void Skip(cmsIT8* it8, SYMBOL sy) { - if (it8->sy == sy && it8->sy != SEOF) - InSymbol(it8); + if (it8->sy == sy && it8->sy != SEOF && it8->sy != SSYNERROR) + InSymbol(it8); } @@ -1095,7 +1112,7 @@ static void SkipEOLN(cmsIT8* it8) { while (it8->sy == SEOLN) { - InSymbol(it8); + InSymbol(it8); } } @@ -1206,9 +1223,12 @@ void* AllocChunk(cmsIT8* it8, cmsUInt32Number size) cmsUInt8Number* ptr; size = _cmsALIGNMEM(size); + if (size == 0) return NULL; if (size > Free) { + cmsUInt8Number* new_block; + if (it8 -> Allocator.BlockSize == 0) it8 -> Allocator.BlockSize = 20*1024; @@ -1219,7 +1239,11 @@ void* AllocChunk(cmsIT8* it8, cmsUInt32Number size) it8 ->Allocator.BlockSize = size; it8 ->Allocator.Used = 0; - it8 ->Allocator.Block = (cmsUInt8Number*) AllocBigBlock(it8, it8 ->Allocator.BlockSize); + new_block = (cmsUInt8Number*)AllocBigBlock(it8, it8->Allocator.BlockSize); + if (new_block == NULL) + return NULL; + + it8->Allocator.Block = new_block; } if (it8->Allocator.Block == NULL) @@ -1229,7 +1253,6 @@ void* AllocChunk(cmsIT8* it8, cmsUInt32Number size) it8 ->Allocator.Used += size; return (void*) ptr; - } @@ -1237,9 +1260,12 @@ void* AllocChunk(cmsIT8* it8, cmsUInt32Number size) static char *AllocString(cmsIT8* it8, const char* str) { - cmsUInt32Number Size = (cmsUInt32Number) strlen(str)+1; + cmsUInt32Number Size; char *ptr; + if (str == NULL) return NULL; + + Size = (cmsUInt32Number)strlen(str) + 1; ptr = (char *) AllocChunk(it8, Size); if (ptr) memcpy(ptr, str, Size-1); @@ -1375,10 +1401,13 @@ KEYVALUE* AddAvailableSampleID(cmsIT8* it8, const char* Key) static -void AllocTable(cmsIT8* it8) +cmsBool AllocTable(cmsIT8* it8) { TABLE* t; + if (it8->TablesCount >= (MAXTABLES-1)) + return FALSE; + t = it8 ->Tab + it8 ->TablesCount; t->HeaderList = NULL; @@ -1386,6 +1415,7 @@ void AllocTable(cmsIT8* it8) t->Data = NULL; it8 ->TablesCount++; + return TRUE; } @@ -1397,7 +1427,10 @@ cmsInt32Number CMSEXPORT cmsIT8SetTable(cmsHANDLE IT8, cmsUInt32Number nTable) if (nTable == it8 ->TablesCount) { - AllocTable(it8); + if (!AllocTable(it8)) { + SynError(it8, "Too many tables"); + return -1; + } } else { SynError(it8, "Table %d is out of sequence", nTable); @@ -1591,22 +1624,26 @@ cmsInt32Number satoi(const char* b) static cmsBool AllocateDataFormat(cmsIT8* it8) { + cmsUInt32Number size; + TABLE* t = GetTable(it8); - if (t -> DataFormat) return TRUE; // Already allocated + if (t->DataFormat) return TRUE; // Already allocated - t -> nSamples = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); + t->nSamples = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); - if (t -> nSamples <= 0) { + if (t->nSamples <= 0 || t->nSamples > 0x7ffe) { - SynError(it8, "AllocateDataFormat: Unknown NUMBER_OF_FIELDS"); - return FALSE; - } + SynError(it8, "Wrong NUMBER_OF_FIELDS"); + return FALSE; + } + + size = ((cmsUInt32Number)t->nSamples + 1) * sizeof(char*); - t -> DataFormat = (char**) AllocChunk (it8, ((cmsUInt32Number) t->nSamples + 1) * sizeof(char *)); + t->DataFormat = (char**)AllocChunk(it8, size); if (t->DataFormat == NULL) { - SynError(it8, "AllocateDataFormat: Unable to allocate dataFormat array"); + SynError(it8, "Unable to allocate dataFormat array"); return FALSE; } @@ -1635,7 +1672,7 @@ cmsBool SetDataFormat(cmsIT8* it8, int n, const char *label) return FALSE; } - if (n > t -> nSamples) { + if (n >= t -> nSamples) { SynError(it8, "More than NUMBER_OF_FIELDS fields."); return FALSE; } @@ -1684,7 +1721,8 @@ cmsBool AllocateDataSet(cmsIT8* it8) t-> nSamples = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_FIELDS")); t-> nPatches = satoi(cmsIT8GetProperty(it8, "NUMBER_OF_SETS")); - if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe) + if (t -> nSamples < 0 || t->nSamples > 0x7ffe || t->nPatches < 0 || t->nPatches > 0x7ffe || + (t->nPatches * t->nSamples) > 200000) { SynError(it8, "AllocateDataSet: too much data"); return FALSE; @@ -1719,7 +1757,10 @@ char* GetData(cmsIT8* it8, int nSet, int nField) static cmsBool SetData(cmsIT8* it8, int nSet, int nField, const char *Val) { + char* ptr; + TABLE* t = GetTable(it8); + if (!t->Data) { if (!AllocateDataSet(it8)) return FALSE; @@ -1737,7 +1778,11 @@ cmsBool SetData(cmsIT8* it8, int nSet, int nField, const char *Val) } - t->Data [nSet * t -> nSamples + nField] = AllocString(it8, Val); + ptr = AllocString(it8, Val); + if (ptr == NULL) + return FALSE; + + t->Data [nSet * t -> nSamples + nField] = ptr; return TRUE; } @@ -2092,7 +2137,7 @@ cmsBool DataSection (cmsIT8* it8) if (!AllocateDataSet(it8)) return FALSE; } - while (it8->sy != SEND_DATA && it8->sy != SEOF) + while (it8->sy != SEND_DATA && it8->sy != SEOF && it8->sy != SSYNERROR) { if (iField >= t -> nSamples) { iField = 0; @@ -2100,7 +2145,7 @@ cmsBool DataSection (cmsIT8* it8) } - if (it8->sy != SEND_DATA && it8->sy != SEOF) { + if (it8->sy != SEND_DATA && it8->sy != SEOF && it8->sy != SSYNERROR) { switch (it8->sy) { @@ -2196,8 +2241,8 @@ cmsBool HeaderSection(cmsIT8* it8) if (!GetVal(it8, Buffer, MAXSTR - 1, "Property data expected")) return FALSE; if (Key->WriteAs != WRITE_PAIR) { - AddToList(it8, &GetTable(it8)->HeaderList, VarName, NULL, Buffer, - (it8->sy == SSTRING) ? WRITE_STRINGIFY : WRITE_UNCOOKED); + if (AddToList(it8, &GetTable(it8)->HeaderList, VarName, NULL, Buffer, + (it8->sy == SSTRING) ? WRITE_STRINGIFY : WRITE_UNCOOKED) == NULL) return FALSE; } else { const char *Subkey; @@ -2303,9 +2348,10 @@ cmsBool ParseIT8(cmsIT8* it8, cmsBool nosheet) if (!DataSection(it8)) return FALSE; - if (it8 -> sy != SEOF) { + if (it8 -> sy != SEOF && it8->sy != SSYNERROR) { + + if (!AllocTable(it8)) return FALSE; - AllocTable(it8); it8 ->nTable = it8 ->TablesCount - 1; // Read sheet type if present. We only support identifier and string. @@ -3035,7 +3081,8 @@ cmsBool ParseCube(cmsIT8* cube, cmsStage** Shaper, cmsStage** CLUT, char title[] InSymbol(cube); - while (cube->sy != SEOF) { + while (cube->sy != SEOF && cube->sy != SSYNERROR) { + switch (cube->sy) { // Set profile description diff --git a/src/ExtLib/lcms2/src/cmsgmt.c b/src/ExtLib/lcms2/src/cmsgmt.c index a27a3a3b4a..7067cf11c7 100644 --- a/src/ExtLib/lcms2/src/cmsgmt.c +++ b/src/ExtLib/lcms2/src/cmsgmt.c @@ -1,659 +1,659 @@ -//--------------------------------------------------------------------------------- -// -// Little Color Management System -// Copyright (c) 1998-2021 Marti Maria Saguer -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the "Software"), -// to deal in the Software without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Software, and to permit persons to whom the Software -// is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -//--------------------------------------------------------------------------------- -// - -#include "lcms2_internal.h" - - -// Auxiliary: append a Lab identity after the given sequence of profiles -// and return the transform. Lab profile is closed, rest of profiles are kept open. -cmsHTRANSFORM _cmsChain2Lab(cmsContext ContextID, - cmsUInt32Number nProfiles, - cmsUInt32Number InputFormat, - cmsUInt32Number OutputFormat, - const cmsUInt32Number Intents[], - const cmsHPROFILE hProfiles[], - const cmsBool BPC[], - const cmsFloat64Number AdaptationStates[], - cmsUInt32Number dwFlags) -{ - cmsHTRANSFORM xform; - cmsHPROFILE hLab; - cmsHPROFILE ProfileList[256]; - cmsBool BPCList[256]; - cmsFloat64Number AdaptationList[256]; - cmsUInt32Number IntentList[256]; - cmsUInt32Number i; - - // This is a rather big number and there is no need of dynamic memory - // since we are adding a profile, 254 + 1 = 255 and this is the limit - if (nProfiles > 254) return NULL; - - // The output space - hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); - if (hLab == NULL) return NULL; - - // Create a copy of parameters - for (i=0; i < nProfiles; i++) { - - ProfileList[i] = hProfiles[i]; - BPCList[i] = BPC[i]; - AdaptationList[i] = AdaptationStates[i]; - IntentList[i] = Intents[i]; - } - - // Place Lab identity at chain's end. - ProfileList[nProfiles] = hLab; - BPCList[nProfiles] = 0; - AdaptationList[nProfiles] = 1.0; - IntentList[nProfiles] = INTENT_RELATIVE_COLORIMETRIC; - - // Create the transform - xform = cmsCreateExtendedTransform(ContextID, nProfiles + 1, ProfileList, - BPCList, - IntentList, - AdaptationList, - NULL, 0, - InputFormat, - OutputFormat, - dwFlags); - - cmsCloseProfile(hLab); - - return xform; -} - - -// Compute K -> L* relationship. Flags may include black point compensation. In this case, -// the relationship is assumed from the profile with BPC to a black point zero. -static -cmsToneCurve* ComputeKToLstar(cmsContext ContextID, - cmsUInt32Number nPoints, - cmsUInt32Number nProfiles, - const cmsUInt32Number Intents[], - const cmsHPROFILE hProfiles[], - const cmsBool BPC[], - const cmsFloat64Number AdaptationStates[], - cmsUInt32Number dwFlags) -{ - cmsToneCurve* out = NULL; - cmsUInt32Number i; - cmsHTRANSFORM xform; - cmsCIELab Lab; - cmsFloat32Number cmyk[4]; - cmsFloat32Number* SampledPoints; - - xform = _cmsChain2Lab(ContextID, nProfiles, TYPE_CMYK_FLT, TYPE_Lab_DBL, Intents, hProfiles, BPC, AdaptationStates, dwFlags); - if (xform == NULL) return NULL; - - SampledPoints = (cmsFloat32Number*) _cmsCalloc(ContextID, nPoints, sizeof(cmsFloat32Number)); - if (SampledPoints == NULL) goto Error; - - for (i=0; i < nPoints; i++) { - - cmyk[0] = 0; - cmyk[1] = 0; - cmyk[2] = 0; - cmyk[3] = (cmsFloat32Number) ((i * 100.0) / (nPoints-1)); - - cmsDoTransform(xform, cmyk, &Lab, 1); - SampledPoints[i]= (cmsFloat32Number) (1.0 - Lab.L / 100.0); // Negate K for easier operation - } - - out = cmsBuildTabulatedToneCurveFloat(ContextID, nPoints, SampledPoints); - -Error: - - cmsDeleteTransform(xform); - if (SampledPoints) _cmsFree(ContextID, SampledPoints); - - return out; -} - - -// Compute Black tone curve on a CMYK -> CMYK transform. This is done by -// using the proof direction on both profiles to find K->L* relationship -// then joining both curves. dwFlags may include black point compensation. -cmsToneCurve* _cmsBuildKToneCurve(cmsContext ContextID, - cmsUInt32Number nPoints, - cmsUInt32Number nProfiles, - const cmsUInt32Number Intents[], - const cmsHPROFILE hProfiles[], - const cmsBool BPC[], - const cmsFloat64Number AdaptationStates[], - cmsUInt32Number dwFlags) -{ - cmsToneCurve *in, *out, *KTone; - - // Make sure CMYK -> CMYK - if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData || - cmsGetColorSpace(hProfiles[nProfiles-1])!= cmsSigCmykData) return NULL; - - - // Make sure last is an output profile - if (cmsGetDeviceClass(hProfiles[nProfiles - 1]) != cmsSigOutputClass) return NULL; - - // Create individual curves. BPC works also as each K to L* is - // computed as a BPC to zero black point in case of L* - in = ComputeKToLstar(ContextID, nPoints, nProfiles - 1, Intents, hProfiles, BPC, AdaptationStates, dwFlags); - if (in == NULL) return NULL; - - out = ComputeKToLstar(ContextID, nPoints, 1, - Intents + (nProfiles - 1), - &hProfiles [nProfiles - 1], - BPC + (nProfiles - 1), - AdaptationStates + (nProfiles - 1), - dwFlags); - if (out == NULL) { - cmsFreeToneCurve(in); - return NULL; - } - - // Build the relationship. This effectively limits the maximum accuracy to 16 bits, but - // since this is used on black-preserving LUTs, we are not losing accuracy in any case - KTone = cmsJoinToneCurve(ContextID, in, out, nPoints); - - // Get rid of components - cmsFreeToneCurve(in); cmsFreeToneCurve(out); - - // Something went wrong... - if (KTone == NULL) return NULL; - - // Make sure it is monotonic - if (!cmsIsToneCurveMonotonic(KTone)) { - cmsFreeToneCurve(KTone); - return NULL; - } - - return KTone; -} - - -// Gamut LUT Creation ----------------------------------------------------------------------------------------- - -// Used by gamut & softproofing - -typedef struct { - - cmsHTRANSFORM hInput; // From whatever input color space. 16 bits to DBL - cmsHTRANSFORM hForward, hReverse; // Transforms going from Lab to colorant and back - cmsFloat64Number Threshold; // The threshold after which is considered out of gamut - - } GAMUTCHAIN; - -// This sampler does compute gamut boundaries by comparing original -// values with a transform going back and forth. Values above ERR_THRESHOLD -// of maximum are considered out of gamut. - -#define ERR_THRESHOLD 5 - - -static -int GamutSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo) -{ - GAMUTCHAIN* t = (GAMUTCHAIN* ) Cargo; - cmsCIELab LabIn1, LabOut1; - cmsCIELab LabIn2, LabOut2; - cmsUInt16Number Proof[cmsMAXCHANNELS], Proof2[cmsMAXCHANNELS]; - cmsFloat64Number dE1, dE2, ErrorRatio; - - // Assume in-gamut by default. NEVER READ, USED FOR DEBUG PURPOSES. - ErrorRatio = 1.0; - - // Convert input to Lab - cmsDoTransform(t -> hInput, In, &LabIn1, 1); - - // converts from PCS to colorant. This always - // does return in-gamut values, - cmsDoTransform(t -> hForward, &LabIn1, Proof, 1); - - // Now, do the inverse, from colorant to PCS. - cmsDoTransform(t -> hReverse, Proof, &LabOut1, 1); - - memmove(&LabIn2, &LabOut1, sizeof(cmsCIELab)); - - // Try again, but this time taking Check as input - cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); - cmsDoTransform(t -> hReverse, Proof2, &LabOut2, 1); - - // Take difference of direct value - dE1 = cmsDeltaE(&LabIn1, &LabOut1); - - // Take difference of converted value - dE2 = cmsDeltaE(&LabIn2, &LabOut2); - - - // if dE1 is small and dE2 is small, value is likely to be in gamut - if (dE1 < t->Threshold && dE2 < t->Threshold) - Out[0] = 0; - else { - - // if dE1 is small and dE2 is big, undefined. Assume in gamut - if (dE1 < t->Threshold && dE2 > t->Threshold) - Out[0] = 0; - else - // dE1 is big and dE2 is small, clearly out of gamut - if (dE1 > t->Threshold && dE2 < t->Threshold) - Out[0] = (cmsUInt16Number) _cmsQuickFloor((dE1 - t->Threshold) + .5); - else { - - // dE1 is big and dE2 is also big, could be due to perceptual mapping - // so take error ratio - if (dE2 == 0.0) - ErrorRatio = dE1; - else - ErrorRatio = dE1 / dE2; - - if (ErrorRatio > t->Threshold) - Out[0] = (cmsUInt16Number) _cmsQuickFloor((ErrorRatio - t->Threshold) + .5); - else - Out[0] = 0; - } - } - - - return TRUE; -} - -// Does compute a gamut LUT going back and forth across pcs -> relativ. colorimetric intent -> pcs -// the dE obtained is then annotated on the LUT. Values truly out of gamut are clipped to dE = 0xFFFE -// and values changed are supposed to be handled by any gamut remapping, so, are out of gamut as well. -// -// **WARNING: This algorithm does assume that gamut remapping algorithms does NOT move in-gamut colors, -// of course, many perceptual and saturation intents does not work in such way, but relativ. ones should. - -cmsPipeline* _cmsCreateGamutCheckPipeline(cmsContext ContextID, - cmsHPROFILE hProfiles[], - cmsBool BPC[], - cmsUInt32Number Intents[], - cmsFloat64Number AdaptationStates[], - cmsUInt32Number nGamutPCSposition, - cmsHPROFILE hGamut) -{ - cmsHPROFILE hLab; - cmsPipeline* Gamut; - cmsStage* CLUT; - cmsUInt32Number dwFormat; - GAMUTCHAIN Chain; - cmsUInt32Number nGridpoints; - cmsInt32Number nChannels; - cmsColorSpaceSignature ColorSpace; - cmsUInt32Number i; - cmsHPROFILE ProfileList[256]; - cmsBool BPCList[256]; - cmsFloat64Number AdaptationList[256]; - cmsUInt32Number IntentList[256]; - - memset(&Chain, 0, sizeof(GAMUTCHAIN)); - - - if (nGamutPCSposition <= 0 || nGamutPCSposition > 255) { - cmsSignalError(ContextID, cmsERROR_RANGE, "Wrong position of PCS. 1..255 expected, %d found.", nGamutPCSposition); - return NULL; - } - - hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); - if (hLab == NULL) return NULL; - - - // The figure of merit. On matrix-shaper profiles, should be almost zero as - // the conversion is pretty exact. On LUT based profiles, different resolutions - // of input and output CLUT may result in differences. - - if (cmsIsMatrixShaper(hGamut)) { - - Chain.Threshold = 1.0; - } - else { - Chain.Threshold = ERR_THRESHOLD; - } - - - // Create a copy of parameters - for (i=0; i < nGamutPCSposition; i++) { - ProfileList[i] = hProfiles[i]; - BPCList[i] = BPC[i]; - AdaptationList[i] = AdaptationStates[i]; - IntentList[i] = Intents[i]; - } - - // Fill Lab identity - ProfileList[nGamutPCSposition] = hLab; - BPCList[nGamutPCSposition] = 0; - AdaptationList[nGamutPCSposition] = 1.0; - IntentList[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; - - - ColorSpace = cmsGetColorSpace(hGamut); - nChannels = cmsChannelsOfColorSpace(ColorSpace); - nGridpoints = _cmsReasonableGridpointsByColorspace(ColorSpace, cmsFLAGS_HIGHRESPRECALC); - dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); - - // 16 bits to Lab double - Chain.hInput = cmsCreateExtendedTransform(ContextID, - nGamutPCSposition + 1, - ProfileList, - BPCList, - IntentList, - AdaptationList, - NULL, 0, - dwFormat, TYPE_Lab_DBL, - cmsFLAGS_NOCACHE); - - - // Does create the forward step. Lab double to device - dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); - Chain.hForward = cmsCreateTransformTHR(ContextID, - hLab, TYPE_Lab_DBL, - hGamut, dwFormat, - INTENT_RELATIVE_COLORIMETRIC, - cmsFLAGS_NOCACHE); - - // Does create the backwards step - Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat, - hLab, TYPE_Lab_DBL, - INTENT_RELATIVE_COLORIMETRIC, - cmsFLAGS_NOCACHE); - - - // All ok? - if (Chain.hInput && Chain.hForward && Chain.hReverse) { - - // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing - // dE when doing a transform back and forth on the colorimetric intent. - - Gamut = cmsPipelineAlloc(ContextID, 3, 1); - if (Gamut != NULL) { - - CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); - if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) { - cmsPipelineFree(Gamut); - Gamut = NULL; - } - else { - cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); - } - } - } - else - Gamut = NULL; // Didn't work... - - // Free all needed stuff. - if (Chain.hInput) cmsDeleteTransform(Chain.hInput); - if (Chain.hForward) cmsDeleteTransform(Chain.hForward); - if (Chain.hReverse) cmsDeleteTransform(Chain.hReverse); - if (hLab) cmsCloseProfile(hLab); - - // And return computed hull - return Gamut; -} - -// Total Area Coverage estimation ---------------------------------------------------------------- - -typedef struct { - cmsUInt32Number nOutputChans; - cmsHTRANSFORM hRoundTrip; - cmsFloat32Number MaxTAC; - cmsFloat32Number MaxInput[cmsMAXCHANNELS]; - -} cmsTACestimator; - - -// This callback just accounts the maximum ink dropped in the given node. It does not populate any -// memory, as the destination table is NULL. Its only purpose it to know the global maximum. -static -int EstimateTAC(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void * Cargo) -{ - cmsTACestimator* bp = (cmsTACestimator*) Cargo; - cmsFloat32Number RoundTrip[cmsMAXCHANNELS]; - cmsUInt32Number i; - cmsFloat32Number Sum; - - - // Evaluate the xform - cmsDoTransform(bp->hRoundTrip, In, RoundTrip, 1); - - // All all amounts of ink - for (Sum=0, i=0; i < bp ->nOutputChans; i++) - Sum += RoundTrip[i]; - - // If above maximum, keep track of input values - if (Sum > bp ->MaxTAC) { - - bp ->MaxTAC = Sum; - - for (i=0; i < bp ->nOutputChans; i++) { - bp ->MaxInput[i] = In[i]; - } - } - - return TRUE; - - cmsUNUSED_PARAMETER(Out); -} - - -// Detect Total area coverage of the profile -cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile) -{ - cmsTACestimator bp; - cmsUInt32Number dwFormatter; - cmsUInt32Number GridPoints[MAX_INPUT_DIMENSIONS]; - cmsHPROFILE hLab; - cmsContext ContextID = cmsGetProfileContextID(hProfile); - - // TAC only works on output profiles - if (cmsGetDeviceClass(hProfile) != cmsSigOutputClass) { - return 0; - } - - // Create a fake formatter for result - dwFormatter = cmsFormatterForColorspaceOfProfile(hProfile, 4, TRUE); - - // Unsupported color space? - if (dwFormatter == 0) return 0; - - bp.nOutputChans = T_CHANNELS(dwFormatter); - bp.MaxTAC = 0; // Initial TAC is 0 - - // for safety - if (bp.nOutputChans >= cmsMAXCHANNELS) return 0; - - hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); - if (hLab == NULL) return 0; - // Setup a roundtrip on perceptual intent in output profile for TAC estimation - bp.hRoundTrip = cmsCreateTransformTHR(ContextID, hLab, TYPE_Lab_16, - hProfile, dwFormatter, INTENT_PERCEPTUAL, cmsFLAGS_NOOPTIMIZE|cmsFLAGS_NOCACHE); - - cmsCloseProfile(hLab); - if (bp.hRoundTrip == NULL) return 0; - - // For L* we only need black and white. For C* we need many points - GridPoints[0] = 6; - GridPoints[1] = 74; - GridPoints[2] = 74; - - - if (!cmsSliceSpace16(3, GridPoints, EstimateTAC, &bp)) { - bp.MaxTAC = 0; - } - - cmsDeleteTransform(bp.hRoundTrip); - - // Results in % - return bp.MaxTAC; -} - - -// Carefully, clamp on CIELab space. - -cmsBool CMSEXPORT cmsDesaturateLab(cmsCIELab* Lab, - double amax, double amin, - double bmax, double bmin) -{ - - // Whole Luma surface to zero - - if (Lab -> L < 0) { - - Lab-> L = Lab->a = Lab-> b = 0.0; - return FALSE; - } - - // Clamp white, DISCARD HIGHLIGHTS. This is done - // in such way because icc spec doesn't allow the - // use of L>100 as a highlight means. - - if (Lab->L > 100) - Lab -> L = 100; - - // Check out gamut prism, on a, b faces - - if (Lab -> a < amin || Lab->a > amax|| - Lab -> b < bmin || Lab->b > bmax) { - - cmsCIELCh LCh; - double h, slope; - - // Falls outside a, b limits. Transports to LCh space, - // and then do the clipping - - - if (Lab -> a == 0.0) { // Is hue exactly 90? - - // atan will not work, so clamp here - Lab -> b = Lab->b < 0 ? bmin : bmax; - return TRUE; - } - - cmsLab2LCh(&LCh, Lab); - - slope = Lab -> b / Lab -> a; - h = LCh.h; - - // There are 4 zones - - if ((h >= 0. && h < 45.) || - (h >= 315 && h <= 360.)) { - - // clip by amax - Lab -> a = amax; - Lab -> b = amax * slope; - } - else - if (h >= 45. && h < 135.) - { - // clip by bmax - Lab -> b = bmax; - Lab -> a = bmax / slope; - } - else - if (h >= 135. && h < 225.) { - // clip by amin - Lab -> a = amin; - Lab -> b = amin * slope; - - } - else - if (h >= 225. && h < 315.) { - // clip by bmin - Lab -> b = bmin; - Lab -> a = bmin / slope; - } - else { - cmsSignalError(0, cmsERROR_RANGE, "Invalid angle"); - return FALSE; - } - - } - - return TRUE; -} - -// Detect whatever a given ICC profile works in linear (gamma 1.0) space -// Actually, doing that "well" is quite hard, since every component may behave completely different. -// Since the true point of this function is to detect suitable optimizations, I am imposing some requirements -// that simplifies things: only RGB, and only profiles that can got in both directions. -// The algorithm obtains Y from a synthetical gray R=G=B. Then least squares fitting is used to estimate gamma. -// For gamma close to 1.0, RGB is linear. On profiles not supported, -1 is returned. - -cmsFloat64Number CMSEXPORT cmsDetectRGBProfileGamma(cmsHPROFILE hProfile, cmsFloat64Number threshold) -{ - cmsContext ContextID; - cmsHPROFILE hXYZ; - cmsHTRANSFORM xform; - cmsToneCurve* Y_curve; - cmsUInt16Number rgb[256][3]; - cmsCIEXYZ XYZ[256]; - cmsFloat32Number Y_normalized[256]; - cmsFloat64Number gamma; - cmsProfileClassSignature cl; - int i; - - if (cmsGetColorSpace(hProfile) != cmsSigRgbData) - return -1; - - cl = cmsGetDeviceClass(hProfile); - if (cl != cmsSigInputClass && cl != cmsSigDisplayClass && - cl != cmsSigOutputClass && cl != cmsSigColorSpaceClass) - return -1; - - ContextID = cmsGetProfileContextID(hProfile); - hXYZ = cmsCreateXYZProfileTHR(ContextID); - if (hXYZ == NULL) - return -1; - xform = cmsCreateTransformTHR(ContextID, hProfile, TYPE_RGB_16, hXYZ, TYPE_XYZ_DBL, - INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE); - - if (xform == NULL) { // If not RGB or forward direction is not supported, regret with the previous error - - cmsCloseProfile(hXYZ); - return -1; - } - - for (i = 0; i < 256; i++) { - rgb[i][0] = rgb[i][1] = rgb[i][2] = FROM_8_TO_16(i); - } - - cmsDoTransform(xform, rgb, XYZ, 256); - - cmsDeleteTransform(xform); - cmsCloseProfile(hXYZ); - - for (i = 0; i < 256; i++) { - Y_normalized[i] = (cmsFloat32Number) XYZ[i].Y; - } - - Y_curve = cmsBuildTabulatedToneCurveFloat(ContextID, 256, Y_normalized); - if (Y_curve == NULL) - return -1; - - gamma = cmsEstimateGamma(Y_curve, threshold); - - cmsFreeToneCurve(Y_curve); - - return gamma; -} - +//--------------------------------------------------------------------------------- +// +// Little Color Management System +// Copyright (c) 1998-2024 Marti Maria Saguer +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the Software +// is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +// THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//--------------------------------------------------------------------------------- +// + +#include "lcms2_internal.h" + + +// Auxiliary: append a Lab identity after the given sequence of profiles +// and return the transform. Lab profile is closed, rest of profiles are kept open. +cmsHTRANSFORM _cmsChain2Lab(cmsContext ContextID, + cmsUInt32Number nProfiles, + cmsUInt32Number InputFormat, + cmsUInt32Number OutputFormat, + const cmsUInt32Number Intents[], + const cmsHPROFILE hProfiles[], + const cmsBool BPC[], + const cmsFloat64Number AdaptationStates[], + cmsUInt32Number dwFlags) +{ + cmsHTRANSFORM xform; + cmsHPROFILE hLab; + cmsHPROFILE ProfileList[256]; + cmsBool BPCList[256]; + cmsFloat64Number AdaptationList[256]; + cmsUInt32Number IntentList[256]; + cmsUInt32Number i; + + // This is a rather big number and there is no need of dynamic memory + // since we are adding a profile, 254 + 1 = 255 and this is the limit + if (nProfiles > 254) return NULL; + + // The output space + hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); + if (hLab == NULL) return NULL; + + // Create a copy of parameters + for (i=0; i < nProfiles; i++) { + + ProfileList[i] = hProfiles[i]; + BPCList[i] = BPC[i]; + AdaptationList[i] = AdaptationStates[i]; + IntentList[i] = Intents[i]; + } + + // Place Lab identity at chain's end. + ProfileList[nProfiles] = hLab; + BPCList[nProfiles] = 0; + AdaptationList[nProfiles] = 1.0; + IntentList[nProfiles] = INTENT_RELATIVE_COLORIMETRIC; + + // Create the transform + xform = cmsCreateExtendedTransform(ContextID, nProfiles + 1, ProfileList, + BPCList, + IntentList, + AdaptationList, + NULL, 0, + InputFormat, + OutputFormat, + dwFlags); + + cmsCloseProfile(hLab); + + return xform; +} + + +// Compute K -> L* relationship. Flags may include black point compensation. In this case, +// the relationship is assumed from the profile with BPC to a black point zero. +static +cmsToneCurve* ComputeKToLstar(cmsContext ContextID, + cmsUInt32Number nPoints, + cmsUInt32Number nProfiles, + const cmsUInt32Number Intents[], + const cmsHPROFILE hProfiles[], + const cmsBool BPC[], + const cmsFloat64Number AdaptationStates[], + cmsUInt32Number dwFlags) +{ + cmsToneCurve* out = NULL; + cmsUInt32Number i; + cmsHTRANSFORM xform; + cmsCIELab Lab; + cmsFloat32Number cmyk[4]; + cmsFloat32Number* SampledPoints; + + xform = _cmsChain2Lab(ContextID, nProfiles, TYPE_CMYK_FLT, TYPE_Lab_DBL, Intents, hProfiles, BPC, AdaptationStates, dwFlags); + if (xform == NULL) return NULL; + + SampledPoints = (cmsFloat32Number*) _cmsCalloc(ContextID, nPoints, sizeof(cmsFloat32Number)); + if (SampledPoints == NULL) goto Error; + + for (i=0; i < nPoints; i++) { + + cmyk[0] = 0; + cmyk[1] = 0; + cmyk[2] = 0; + cmyk[3] = (cmsFloat32Number) ((i * 100.0) / (nPoints-1)); + + cmsDoTransform(xform, cmyk, &Lab, 1); + SampledPoints[i]= (cmsFloat32Number) (1.0 - Lab.L / 100.0); // Negate K for easier operation + } + + out = cmsBuildTabulatedToneCurveFloat(ContextID, nPoints, SampledPoints); + +Error: + + cmsDeleteTransform(xform); + if (SampledPoints) _cmsFree(ContextID, SampledPoints); + + return out; +} + + +// Compute Black tone curve on a CMYK -> CMYK transform. This is done by +// using the proof direction on both profiles to find K->L* relationship +// then joining both curves. dwFlags may include black point compensation. +cmsToneCurve* _cmsBuildKToneCurve(cmsContext ContextID, + cmsUInt32Number nPoints, + cmsUInt32Number nProfiles, + const cmsUInt32Number Intents[], + const cmsHPROFILE hProfiles[], + const cmsBool BPC[], + const cmsFloat64Number AdaptationStates[], + cmsUInt32Number dwFlags) +{ + cmsToneCurve *in, *out, *KTone; + + // Make sure CMYK -> CMYK + if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData || + cmsGetColorSpace(hProfiles[nProfiles-1])!= cmsSigCmykData) return NULL; + + + // Make sure last is an output profile + if (cmsGetDeviceClass(hProfiles[nProfiles - 1]) != cmsSigOutputClass) return NULL; + + // Create individual curves. BPC works also as each K to L* is + // computed as a BPC to zero black point in case of L* + in = ComputeKToLstar(ContextID, nPoints, nProfiles - 1, Intents, hProfiles, BPC, AdaptationStates, dwFlags); + if (in == NULL) return NULL; + + out = ComputeKToLstar(ContextID, nPoints, 1, + Intents + (nProfiles - 1), + &hProfiles [nProfiles - 1], + BPC + (nProfiles - 1), + AdaptationStates + (nProfiles - 1), + dwFlags); + if (out == NULL) { + cmsFreeToneCurve(in); + return NULL; + } + + // Build the relationship. This effectively limits the maximum accuracy to 16 bits, but + // since this is used on black-preserving LUTs, we are not losing accuracy in any case + KTone = cmsJoinToneCurve(ContextID, in, out, nPoints); + + // Get rid of components + cmsFreeToneCurve(in); cmsFreeToneCurve(out); + + // Something went wrong... + if (KTone == NULL) return NULL; + + // Make sure it is monotonic + if (!cmsIsToneCurveMonotonic(KTone)) { + cmsFreeToneCurve(KTone); + return NULL; + } + + return KTone; +} + + +// Gamut LUT Creation ----------------------------------------------------------------------------------------- + +// Used by gamut & softproofing + +typedef struct { + + cmsHTRANSFORM hInput; // From whatever input color space. 16 bits to DBL + cmsHTRANSFORM hForward, hReverse; // Transforms going from Lab to colorant and back + cmsFloat64Number Threshold; // The threshold after which is considered out of gamut + + } GAMUTCHAIN; + +// This sampler does compute gamut boundaries by comparing original +// values with a transform going back and forth. Values above ERR_THRESHOLD +// of maximum are considered out of gamut. + +#define ERR_THRESHOLD 5 + + +static +int GamutSampler(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void* Cargo) +{ + GAMUTCHAIN* t = (GAMUTCHAIN* ) Cargo; + cmsCIELab LabIn1, LabOut1; + cmsCIELab LabIn2, LabOut2; + cmsUInt16Number Proof[cmsMAXCHANNELS], Proof2[cmsMAXCHANNELS]; + cmsFloat64Number dE1, dE2, ErrorRatio; + + // Assume in-gamut by default. NEVER READ, USED FOR DEBUG PURPOSES. + ErrorRatio = 1.0; + + // Convert input to Lab + cmsDoTransform(t -> hInput, In, &LabIn1, 1); + + // converts from PCS to colorant. This always + // does return in-gamut values, + cmsDoTransform(t -> hForward, &LabIn1, Proof, 1); + + // Now, do the inverse, from colorant to PCS. + cmsDoTransform(t -> hReverse, Proof, &LabOut1, 1); + + memmove(&LabIn2, &LabOut1, sizeof(cmsCIELab)); + + // Try again, but this time taking Check as input + cmsDoTransform(t -> hForward, &LabOut1, Proof2, 1); + cmsDoTransform(t -> hReverse, Proof2, &LabOut2, 1); + + // Take difference of direct value + dE1 = cmsDeltaE(&LabIn1, &LabOut1); + + // Take difference of converted value + dE2 = cmsDeltaE(&LabIn2, &LabOut2); + + + // if dE1 is small and dE2 is small, value is likely to be in gamut + if (dE1 < t->Threshold && dE2 < t->Threshold) + Out[0] = 0; + else { + + // if dE1 is small and dE2 is big, undefined. Assume in gamut + if (dE1 < t->Threshold && dE2 > t->Threshold) + Out[0] = 0; + else + // dE1 is big and dE2 is small, clearly out of gamut + if (dE1 > t->Threshold && dE2 < t->Threshold) + Out[0] = (cmsUInt16Number) _cmsQuickFloor((dE1 - t->Threshold) + .5); + else { + + // dE1 is big and dE2 is also big, could be due to perceptual mapping + // so take error ratio + if (dE2 == 0.0) + ErrorRatio = dE1; + else + ErrorRatio = dE1 / dE2; + + if (ErrorRatio > t->Threshold) + Out[0] = (cmsUInt16Number) _cmsQuickFloor((ErrorRatio - t->Threshold) + .5); + else + Out[0] = 0; + } + } + + + return TRUE; +} + +// Does compute a gamut LUT going back and forth across pcs -> relativ. colorimetric intent -> pcs +// the dE obtained is then annotated on the LUT. Values truly out of gamut are clipped to dE = 0xFFFE +// and values changed are supposed to be handled by any gamut remapping, so, are out of gamut as well. +// +// **WARNING: This algorithm does assume that gamut remapping algorithms does NOT move in-gamut colors, +// of course, many perceptual and saturation intents does not work in such way, but relativ. ones should. + +cmsPipeline* _cmsCreateGamutCheckPipeline(cmsContext ContextID, + cmsHPROFILE hProfiles[], + cmsBool BPC[], + cmsUInt32Number Intents[], + cmsFloat64Number AdaptationStates[], + cmsUInt32Number nGamutPCSposition, + cmsHPROFILE hGamut) +{ + cmsHPROFILE hLab; + cmsPipeline* Gamut; + cmsStage* CLUT; + cmsUInt32Number dwFormat; + GAMUTCHAIN Chain; + cmsUInt32Number nGridpoints; + cmsInt32Number nChannels; + cmsColorSpaceSignature ColorSpace; + cmsUInt32Number i; + cmsHPROFILE ProfileList[256]; + cmsBool BPCList[256]; + cmsFloat64Number AdaptationList[256]; + cmsUInt32Number IntentList[256]; + + memset(&Chain, 0, sizeof(GAMUTCHAIN)); + + + if (nGamutPCSposition <= 0 || nGamutPCSposition > 255) { + cmsSignalError(ContextID, cmsERROR_RANGE, "Wrong position of PCS. 1..255 expected, %d found.", nGamutPCSposition); + return NULL; + } + + hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); + if (hLab == NULL) return NULL; + + + // The figure of merit. On matrix-shaper profiles, should be almost zero as + // the conversion is pretty exact. On LUT based profiles, different resolutions + // of input and output CLUT may result in differences. + + if (cmsIsMatrixShaper(hGamut)) { + + Chain.Threshold = 1.0; + } + else { + Chain.Threshold = ERR_THRESHOLD; + } + + + // Create a copy of parameters + for (i=0; i < nGamutPCSposition; i++) { + ProfileList[i] = hProfiles[i]; + BPCList[i] = BPC[i]; + AdaptationList[i] = AdaptationStates[i]; + IntentList[i] = Intents[i]; + } + + // Fill Lab identity + ProfileList[nGamutPCSposition] = hLab; + BPCList[nGamutPCSposition] = 0; + AdaptationList[nGamutPCSposition] = 1.0; + IntentList[nGamutPCSposition] = INTENT_RELATIVE_COLORIMETRIC; + + + ColorSpace = cmsGetColorSpace(hGamut); + nChannels = cmsChannelsOfColorSpace(ColorSpace); + nGridpoints = _cmsReasonableGridpointsByColorspace(ColorSpace, cmsFLAGS_HIGHRESPRECALC); + dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); + + // 16 bits to Lab double + Chain.hInput = cmsCreateExtendedTransform(ContextID, + nGamutPCSposition + 1, + ProfileList, + BPCList, + IntentList, + AdaptationList, + NULL, 0, + dwFormat, TYPE_Lab_DBL, + cmsFLAGS_NOCACHE); + + + // Does create the forward step. Lab double to device + dwFormat = (CHANNELS_SH(nChannels)|BYTES_SH(2)); + Chain.hForward = cmsCreateTransformTHR(ContextID, + hLab, TYPE_Lab_DBL, + hGamut, dwFormat, + INTENT_RELATIVE_COLORIMETRIC, + cmsFLAGS_NOCACHE); + + // Does create the backwards step + Chain.hReverse = cmsCreateTransformTHR(ContextID, hGamut, dwFormat, + hLab, TYPE_Lab_DBL, + INTENT_RELATIVE_COLORIMETRIC, + cmsFLAGS_NOCACHE); + + + // All ok? + if (Chain.hInput && Chain.hForward && Chain.hReverse) { + + // Go on, try to compute gamut LUT from PCS. This consist on a single channel containing + // dE when doing a transform back and forth on the colorimetric intent. + + Gamut = cmsPipelineAlloc(ContextID, 3, 1); + if (Gamut != NULL) { + + CLUT = cmsStageAllocCLut16bit(ContextID, nGridpoints, nChannels, 1, NULL); + if (!cmsPipelineInsertStage(Gamut, cmsAT_BEGIN, CLUT)) { + cmsPipelineFree(Gamut); + Gamut = NULL; + } + else { + cmsStageSampleCLut16bit(CLUT, GamutSampler, (void*) &Chain, 0); + } + } + } + else + Gamut = NULL; // Didn't work... + + // Free all needed stuff. + if (Chain.hInput) cmsDeleteTransform(Chain.hInput); + if (Chain.hForward) cmsDeleteTransform(Chain.hForward); + if (Chain.hReverse) cmsDeleteTransform(Chain.hReverse); + if (hLab) cmsCloseProfile(hLab); + + // And return computed hull + return Gamut; +} + +// Total Area Coverage estimation ---------------------------------------------------------------- + +typedef struct { + cmsUInt32Number nOutputChans; + cmsHTRANSFORM hRoundTrip; + cmsFloat32Number MaxTAC; + cmsFloat32Number MaxInput[cmsMAXCHANNELS]; + +} cmsTACestimator; + + +// This callback just accounts the maximum ink dropped in the given node. It does not populate any +// memory, as the destination table is NULL. Its only purpose it to know the global maximum. +static +int EstimateTAC(CMSREGISTER const cmsUInt16Number In[], CMSREGISTER cmsUInt16Number Out[], CMSREGISTER void * Cargo) +{ + cmsTACestimator* bp = (cmsTACestimator*) Cargo; + cmsFloat32Number RoundTrip[cmsMAXCHANNELS]; + cmsUInt32Number i; + cmsFloat32Number Sum; + + + // Evaluate the xform + cmsDoTransform(bp->hRoundTrip, In, RoundTrip, 1); + + // All all amounts of ink + for (Sum=0, i=0; i < bp ->nOutputChans; i++) + Sum += RoundTrip[i]; + + // If above maximum, keep track of input values + if (Sum > bp ->MaxTAC) { + + bp ->MaxTAC = Sum; + + for (i=0; i < bp ->nOutputChans; i++) { + bp ->MaxInput[i] = In[i]; + } + } + + return TRUE; + + cmsUNUSED_PARAMETER(Out); +} + + +// Detect Total area coverage of the profile +cmsFloat64Number CMSEXPORT cmsDetectTAC(cmsHPROFILE hProfile) +{ + cmsTACestimator bp; + cmsUInt32Number dwFormatter; + cmsUInt32Number GridPoints[MAX_INPUT_DIMENSIONS]; + cmsHPROFILE hLab; + cmsContext ContextID = cmsGetProfileContextID(hProfile); + + // TAC only works on output profiles + if (cmsGetDeviceClass(hProfile) != cmsSigOutputClass) { + return 0; + } + + // Create a fake formatter for result + dwFormatter = cmsFormatterForColorspaceOfProfile(hProfile, 4, TRUE); + + // Unsupported color space? + if (dwFormatter == 0) return 0; + + bp.nOutputChans = T_CHANNELS(dwFormatter); + bp.MaxTAC = 0; // Initial TAC is 0 + + // for safety + if (bp.nOutputChans >= cmsMAXCHANNELS) return 0; + + hLab = cmsCreateLab4ProfileTHR(ContextID, NULL); + if (hLab == NULL) return 0; + // Setup a roundtrip on perceptual intent in output profile for TAC estimation + bp.hRoundTrip = cmsCreateTransformTHR(ContextID, hLab, TYPE_Lab_16, + hProfile, dwFormatter, INTENT_PERCEPTUAL, cmsFLAGS_NOOPTIMIZE|cmsFLAGS_NOCACHE); + + cmsCloseProfile(hLab); + if (bp.hRoundTrip == NULL) return 0; + + // For L* we only need black and white. For C* we need many points + GridPoints[0] = 6; + GridPoints[1] = 74; + GridPoints[2] = 74; + + + if (!cmsSliceSpace16(3, GridPoints, EstimateTAC, &bp)) { + bp.MaxTAC = 0; + } + + cmsDeleteTransform(bp.hRoundTrip); + + // Results in % + return bp.MaxTAC; +} + + +// Carefully, clamp on CIELab space. + +cmsBool CMSEXPORT cmsDesaturateLab(cmsCIELab* Lab, + double amax, double amin, + double bmax, double bmin) +{ + + // Whole Luma surface to zero + + if (Lab -> L < 0) { + + Lab-> L = Lab->a = Lab-> b = 0.0; + return FALSE; + } + + // Clamp white, DISCARD HIGHLIGHTS. This is done + // in such way because icc spec doesn't allow the + // use of L>100 as a highlight means. + + if (Lab->L > 100) + Lab -> L = 100; + + // Check out gamut prism, on a, b faces + + if (Lab -> a < amin || Lab->a > amax|| + Lab -> b < bmin || Lab->b > bmax) { + + cmsCIELCh LCh; + double h, slope; + + // Falls outside a, b limits. Transports to LCh space, + // and then do the clipping + + + if (Lab -> a == 0.0) { // Is hue exactly 90? + + // atan will not work, so clamp here + Lab -> b = Lab->b < 0 ? bmin : bmax; + return TRUE; + } + + cmsLab2LCh(&LCh, Lab); + + slope = Lab -> b / Lab -> a; + h = LCh.h; + + // There are 4 zones + + if ((h >= 0. && h < 45.) || + (h >= 315 && h <= 360.)) { + + // clip by amax + Lab -> a = amax; + Lab -> b = amax * slope; + } + else + if (h >= 45. && h < 135.) + { + // clip by bmax + Lab -> b = bmax; + Lab -> a = bmax / slope; + } + else + if (h >= 135. && h < 225.) { + // clip by amin + Lab -> a = amin; + Lab -> b = amin * slope; + + } + else + if (h >= 225. && h < 315.) { + // clip by bmin + Lab -> b = bmin; + Lab -> a = bmin / slope; + } + else { + cmsSignalError(0, cmsERROR_RANGE, "Invalid angle"); + return FALSE; + } + + } + + return TRUE; +} + +// Detect whatever a given ICC profile works in linear (gamma 1.0) space +// Actually, doing that "well" is quite hard, since every component may behave completely different. +// Since the true point of this function is to detect suitable optimizations, I am imposing some requirements +// that simplifies things: only RGB, and only profiles that can got in both directions. +// The algorithm obtains Y from a synthetical gray R=G=B. Then least squares fitting is used to estimate gamma. +// For gamma close to 1.0, RGB is linear. On profiles not supported, -1 is returned. + +cmsFloat64Number CMSEXPORT cmsDetectRGBProfileGamma(cmsHPROFILE hProfile, cmsFloat64Number threshold) +{ + cmsContext ContextID; + cmsHPROFILE hXYZ; + cmsHTRANSFORM xform; + cmsToneCurve* Y_curve; + cmsUInt16Number rgb[256][3]; + cmsCIEXYZ XYZ[256]; + cmsFloat32Number Y_normalized[256]; + cmsFloat64Number gamma; + cmsProfileClassSignature cl; + int i; + + if (cmsGetColorSpace(hProfile) != cmsSigRgbData) + return -1; + + cl = cmsGetDeviceClass(hProfile); + if (cl != cmsSigInputClass && cl != cmsSigDisplayClass && + cl != cmsSigOutputClass && cl != cmsSigColorSpaceClass) + return -1; + + ContextID = cmsGetProfileContextID(hProfile); + hXYZ = cmsCreateXYZProfileTHR(ContextID); + if (hXYZ == NULL) + return -1; + xform = cmsCreateTransformTHR(ContextID, hProfile, TYPE_RGB_16, hXYZ, TYPE_XYZ_DBL, + INTENT_RELATIVE_COLORIMETRIC, cmsFLAGS_NOOPTIMIZE); + + if (xform == NULL) { // If not RGB or forward direction is not supported, regret with the previous error + + cmsCloseProfile(hXYZ); + return -1; + } + + for (i = 0; i < 256; i++) { + rgb[i][0] = rgb[i][1] = rgb[i][2] = FROM_8_TO_16(i); + } + + cmsDoTransform(xform, rgb, XYZ, 256); + + cmsDeleteTransform(xform); + cmsCloseProfile(hXYZ); + + for (i = 0; i < 256; i++) { + Y_normalized[i] = (cmsFloat32Number) XYZ[i].Y; + } + + Y_curve = cmsBuildTabulatedToneCurveFloat(ContextID, 256, Y_normalized); + if (Y_curve == NULL) + return -1; + + gamma = cmsEstimateGamma(Y_curve, threshold); + + cmsFreeToneCurve(Y_curve); + + return gamma; +} + diff --git a/src/ExtLib/lcms2/src/cmsio0.c b/src/ExtLib/lcms2/src/cmsio0.c index f19c5ec2d4..859def3f0a 100644 --- a/src/ExtLib/lcms2/src/cmsio0.c +++ b/src/ExtLib/lcms2/src/cmsio0.c @@ -277,6 +277,11 @@ cmsIOHANDLER* CMSEXPORT cmsOpenIOhandlerFromMem(cmsContext ContextID, void *Buff fm = (FILEMEM*) _cmsMallocZero(ContextID, sizeof(FILEMEM)); if (fm == NULL) goto Error; + if (Buffer == NULL) { + cmsSignalError(ContextID, cmsERROR_WRITE, "Couldn't write profile to NULL pointer"); + goto Error; + } + fm ->Block = (cmsUInt8Number*) Buffer; fm ->FreeBlockOnClose = FALSE; fm ->Size = size; diff --git a/src/ExtLib/lcms2/src/cmsmd5.c b/src/ExtLib/lcms2/src/cmsmd5.c index 4105d525bf..b6cac682f8 100644 --- a/src/ExtLib/lcms2/src/cmsmd5.c +++ b/src/ExtLib/lcms2/src/cmsmd5.c @@ -251,8 +251,8 @@ void CMSEXPORT cmsMD5finish(cmsProfileID* ProfileID, cmsHANDLE Handle) // Assuming io points to an ICC profile, compute and store MD5 checksum -// In the header, rendering intentent, attributes and ID should be set to zero -// before computing MD5 checksum (per 6.1.13 in ICC spec) +// In the header, rendering intentent, flags and ID should be set to zero +// before computing MD5 checksum (per 7.2.18 of ICC spec 4.4) cmsBool CMSEXPORT cmsMD5computeID(cmsHPROFILE hProfile) { @@ -270,8 +270,8 @@ cmsBool CMSEXPORT cmsMD5computeID(cmsHPROFILE hProfile) // Save a copy of the profile header memmove(&Keep, Icc, sizeof(_cmsICCPROFILE)); - // Set RI, attributes and ID - memset(&Icc ->attributes, 0, sizeof(Icc ->attributes)); + // Set RI, flags and ID + Icc ->flags = 0; Icc ->RenderingIntent = 0; memset(&Icc ->ProfileID, 0, sizeof(Icc ->ProfileID)); diff --git a/src/ExtLib/lcms2/src/cmsps2.c b/src/ExtLib/lcms2/src/cmsps2.c index 2ffb8acaf4..9db4bbc0ad 100644 --- a/src/ExtLib/lcms2/src/cmsps2.c +++ b/src/ExtLib/lcms2/src/cmsps2.c @@ -1263,7 +1263,7 @@ void EmitXYZ2Lab(cmsIOHANDLER* m) // 8 bits. static -int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags) +cmsBool WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number dwFlags) { cmsHPROFILE hLab; cmsHTRANSFORM xform; @@ -1281,7 +1281,7 @@ int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent cmsStage* first; hLab = cmsCreateLab4ProfileTHR(m ->ContextID, NULL); - if (hLab == NULL) return 0; + if (hLab == NULL) return FALSE; OutputFormat = cmsFormatterForColorspaceOfProfile(hProfile, 2, FALSE); nChannels = T_CHANNELS(OutputFormat); @@ -1306,7 +1306,7 @@ int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent if (xform == NULL) { cmsSignalError(m ->ContextID, cmsERROR_COLORSPACE_CHECK, "Cannot create transform Lab -> Profile in CRD creation"); - return 0; + return FALSE; } // Get a copy of the internal devicelink @@ -1314,17 +1314,22 @@ int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent DeviceLink = cmsPipelineDup(v ->Lut); if (DeviceLink == NULL) { cmsDeleteTransform(xform); - return 0; + cmsSignalError(m->ContextID, cmsERROR_CORRUPTION_DETECTED, "Cannot access link for CRD"); + return FALSE; } // We need a CLUT dwFlags |= cmsFLAGS_FORCE_CLUT; - _cmsOptimizePipeline(m->ContextID, &DeviceLink, RelativeEncodingIntent, &InFrm, &OutputFormat, &dwFlags); + if (!_cmsOptimizePipeline(m->ContextID, &DeviceLink, RelativeEncodingIntent, &InFrm, &OutputFormat, &dwFlags)) { + cmsPipelineFree(DeviceLink); + cmsDeleteTransform(xform); + cmsSignalError(m->ContextID, cmsERROR_CORRUPTION_DETECTED, "Cannot create CLUT table for CRD"); + return FALSE; + } _cmsIOPrintf(m, "<<\n"); _cmsIOPrintf(m, "/ColorRenderingType 1\n"); - cmsDetectBlackPoint(&BlackPointAdaptedToD50, hProfile, Intent, 0); // Emit headers, etc. @@ -1368,7 +1373,7 @@ int WriteOutputLUT(cmsIOHANDLER* m, cmsHPROFILE hProfile, cmsUInt32Number Intent cmsPipelineFree(DeviceLink); cmsDeleteTransform(xform); - return 1; + return TRUE; } From dfa92468cdfb96e8067432cf010483dc659a4bb9 Mon Sep 17 00:00:00 2001 From: alexins Date: Tue, 4 Jun 2024 13:59:45 +0200 Subject: [PATCH 38/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5:=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D1=8B=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D0=B8=20ffmpeg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ExtLib/ffmpeg/config.asm | 6 ++++++ src/ExtLib/ffmpeg/config.h | 6 ++++++ src/ExtLib/ffmpeg/config_components.h | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/ExtLib/ffmpeg/config.asm b/src/ExtLib/ffmpeg/config.asm index 8c5d5d286b..bed81d0157 100644 --- a/src/ExtLib/ffmpeg/config.asm +++ b/src/ExtLib/ffmpeg/config.asm @@ -51,6 +51,7 @@ %define HAVE_VSX_EXTERNAL 0 %define HAVE_RV_EXTERNAL 0 %define HAVE_RVV_EXTERNAL 0 +%define HAVE_RV_ZVBB_EXTERNAL 0 %define HAVE_VFPV3_EXTERNAL 0 %define HAVE_MIPSFPU_EXTERNAL 0 %define HAVE_MIPS32R2_EXTERNAL 0 @@ -94,6 +95,7 @@ %define HAVE_VSX_INLINE 0 %define HAVE_RV_INLINE 0 %define HAVE_RVV_INLINE 0 +%define HAVE_RV_ZVBB_INLINE 0 %define HAVE_VFPV3_INLINE 0 %define HAVE_MIPSFPU_INLINE 0 %define HAVE_MIPS32R2_INLINE 0 @@ -163,6 +165,7 @@ %define HAVE_VSX 0 %define HAVE_RV 0 %define HAVE_RVV 0 +%define HAVE_RV_ZVBB 0 %define HAVE_VFP 0 %define HAVE_VFPV3 0 %define HAVE_SETEND 0 @@ -201,6 +204,7 @@ %define HAVE_ALSA_ASOUNDLIB_H 0 %define HAVE_ALTIVEC_H 0 %define HAVE_ARPA_INET_H 0 +%define HAVE_ASM_HWPROBE_H 0 %define HAVE_ASM_TYPES_H 0 %define HAVE_CDIO_PARANOIA_H 0 %define HAVE_CDIO_PARANOIA_PARANOIA_H 0 @@ -324,6 +328,7 @@ %define HAVE_POD2MAN 1 %define HAVE_POLL_H 0 %define HAVE_PTHREAD_NP_H 0 +%define HAVE_SYS_HWPROBE_H 0 %define HAVE_POSIX_MEMALIGN 0 %define HAVE_PRCTL 0 %define HAVE_PRAGMA_DEPRECATED 1 @@ -362,6 +367,7 @@ %define HAVE_STRUCT_SOCKADDR_STORAGE 0 %define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 0 %define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +%define HAVE_STRUCT_MFXCONFIGINTERFACE 0 %define HAVE_SYMVER 1 %define HAVE_SYMVER_ASM_LABEL 1 %define HAVE_SYMVER_GNU_ASM 0 diff --git a/src/ExtLib/ffmpeg/config.h b/src/ExtLib/ffmpeg/config.h index 8160422cbc..c759492631 100644 --- a/src/ExtLib/ffmpeg/config.h +++ b/src/ExtLib/ffmpeg/config.h @@ -211,6 +211,7 @@ #define HAVE_VSX 0 #define HAVE_RV 0 #define HAVE_RVV 0 +#define HAVE_RV_ZVBB 0 #define HAVE_VFP 0 #define HAVE_VFPV3 0 #define HAVE_SETEND 0 @@ -238,6 +239,7 @@ #define HAVE_VSX_EXTERNAL 0 #define HAVE_RV_EXTERNAL 0 #define HAVE_RVV_EXTERNAL 0 +#define HAVE_RV_ZVBB_EXTERNAL 0 #define HAVE_VFPV3_EXTERNAL 0 #define HAVE_MIPSFPU_EXTERNAL 0 #define HAVE_MIPS32R2_EXTERNAL 0 @@ -263,6 +265,7 @@ #define HAVE_VSX_INLINE 0 #define HAVE_RV_INLINE 0 #define HAVE_RVV_INLINE 0 +#define HAVE_RV_ZVBB_INLINE 0 #define HAVE_VFPV3_INLINE 0 #define HAVE_MIPSFPU_INLINE 0 #define HAVE_MIPS32R2_INLINE 0 @@ -299,6 +302,7 @@ #define HAVE_ALSA_ASOUNDLIB_H 0 #define HAVE_ALTIVEC_H 0 #define HAVE_ARPA_INET_H 0 +#define HAVE_ASM_HWPROBE_H 0 #define HAVE_ASM_TYPES_H 0 #define HAVE_CDIO_PARANOIA_H 0 #define HAVE_CDIO_PARANOIA_PARANOIA_H 0 @@ -413,6 +417,7 @@ #define HAVE_POD2MAN 1 #define HAVE_POLL_H 0 #define HAVE_PTHREAD_NP_H 0 +#define HAVE_SYS_HWPROBE_H 0 #define HAVE_POSIX_MEMALIGN 0 #define HAVE_PRCTL 0 #define HAVE_PRAGMA_DEPRECATED 1 @@ -449,6 +454,7 @@ #define HAVE_STRUCT_SOCKADDR_STORAGE 0 #define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 0 #define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +#define HAVE_STRUCT_MFXCONFIGINTERFACE 0 #define HAVE_SYMVER 1 #define HAVE_SYMVER_ASM_LABEL 1 #define HAVE_SYMVER_GNU_ASM 0 diff --git a/src/ExtLib/ffmpeg/config_components.h b/src/ExtLib/ffmpeg/config_components.h index bf45c17fc4..2d3c7b2e66 100644 --- a/src/ExtLib/ffmpeg/config_components.h +++ b/src/ExtLib/ffmpeg/config_components.h @@ -11,6 +11,7 @@ #define CONFIG_DTS2PTS_BSF 0 #define CONFIG_DV_ERROR_MARKER_BSF 0 #define CONFIG_EAC3_CORE_BSF 0 +#define CONFIG_EVC_FRAME_MERGE_BSF 0 #define CONFIG_EXTRACT_EXTRADATA_BSF 1 #define CONFIG_FILTER_UNITS_BSF 0 #define CONFIG_H264_METADATA_BSF 0 @@ -44,7 +45,6 @@ #define CONFIG_VP9_SUPERFRAME_SPLIT_BSF 0 #define CONFIG_VVC_METADATA_BSF 1 #define CONFIG_VVC_MP4TOANNEXB_BSF 1 -#define CONFIG_EVC_FRAME_MERGE_BSF 0 #define CONFIG_AASC_DECODER 0 #define CONFIG_AIC_DECODER 1 #define CONFIG_ALIAS_PIX_DECODER 0 @@ -1568,6 +1568,8 @@ #define CONFIG_HSTACK_QSV_FILTER 0 #define CONFIG_VSTACK_QSV_FILTER 0 #define CONFIG_XSTACK_QSV_FILTER 0 +#define CONFIG_PAD_VAAPI_FILTER 0 +#define CONFIG_DRAWBOX_VAAPI_FILTER 0 #define CONFIG_ALLRGB_FILTER 0 #define CONFIG_ALLYUV_FILTER 0 #define CONFIG_CELLAUTO_FILTER 0 @@ -1763,6 +1765,7 @@ #define CONFIG_KUX_DEMUXER 0 #define CONFIG_KVAG_DEMUXER 0 #define CONFIG_LAF_DEMUXER 0 +#define CONFIG_LC3_DEMUXER 0 #define CONFIG_LMLM4_DEMUXER 0 #define CONFIG_LOAS_DEMUXER 0 #define CONFIG_LUODAT_DEMUXER 0 @@ -2057,6 +2060,7 @@ #define CONFIG_JACOSUB_MUXER 0 #define CONFIG_KVAG_MUXER 0 #define CONFIG_LATM_MUXER 0 +#define CONFIG_LC3_MUXER 0 #define CONFIG_LRC_MUXER 0 #define CONFIG_M4V_MUXER 0 #define CONFIG_MD5_MUXER 0 From 375b0f2cb48549aacea138a855d45acf28caa1ec Mon Sep 17 00:00:00 2001 From: v0lt Date: Wed, 5 Jun 2024 06:49:12 +0300 Subject: [PATCH 39/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=20MPC=5Fcomponents.=20MPC=20Video=20Renderer=200.8.3=20?= =?UTF-8?q?=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=20=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=81=D1=82=D0=B0=D0=BB=D0=BB=D1=8F=D1=82=D0=BE=D1=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- distrib/MPC_components | 2 +- distrib/mpc-be_setup.iss | 2 +- docs/Changelog.Rus.txt | 3 +++ docs/Changelog.txt | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/distrib/MPC_components b/distrib/MPC_components index a61a22eb5f..1a24dfdabd 160000 --- a/distrib/MPC_components +++ b/distrib/MPC_components @@ -1 +1 @@ -Subproject commit a61a22eb5ffe0536c2055b51e664e18a4d0d8e58 +Subproject commit 1a24dfdabda82cba5ed6e4b16fb470c6388bd11f diff --git a/distrib/mpc-be_setup.iss b/distrib/mpc-be_setup.iss index 1ef24ecee7..4426df329e 100644 --- a/distrib/mpc-be_setup.iss +++ b/distrib/mpc-be_setup.iss @@ -68,7 +68,7 @@ #define Description = app_name + " x64 " + app_version #define VisualElementsManifest = "VisualElements\mpc-be64.VisualElementsManifest.xml" #endif -#define mpcvr_desc = "MPC Video Renderer 0.8.1" +#define mpcvr_desc = "MPC Video Renderer 0.8.3" [Setup] #ifdef Win32Build diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 23a9d93e7a..a3bb4f92f7 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -21,6 +21,9 @@ MPCVideoDec При сохранении только звука с YouTube добавляем к аудиофайлу обложку с помощью доступного FFmpeg. Добавлена настройка времени тайм-аута при получении данных из сети. +Инсталлятор +MPC Video Renderer 0.8.3 включен в инсталлятор. + Обновлен венгерский перевод (автор mickey). Обновлен китайский (Simplified) перевод (автор wushantao). Обновлен немецкий перевод (автор Klaus1189). diff --git a/docs/Changelog.txt b/docs/Changelog.txt index e5aecd1f77..8d43026a36 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -21,6 +21,9 @@ Playback speed can now be changed in 1% increments. When saving only audio from YouTube, add cover art to the audio file using the available FFmpeg. Added timeout time setting when receiving data from the network. +Installer +MPC Video Renderer 0.8.3 is included in the installer. + Updated Hungarian translation (by mickey). Updated Chinese (Simplified) translation (by wushantao). Updated German translation (by Klaus1189). From 25fb85a846ecd6aad524b4536d6b154ab153583d Mon Sep 17 00:00:00 2001 From: v0lt Date: Wed, 5 Jun 2024 17:25:17 +0300 Subject: [PATCH 40/57] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4?= =?UTF-8?q?=D1=83=D0=BB=D1=8C=20rapidjson=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=20=D0=B4=D0=BE=20v1.1.0-752-gab1842a2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 1 + docs/Changelog.txt | 1 + src/ExtLib/rapidjson | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index a3bb4f92f7..f52d6d1637 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -35,6 +35,7 @@ MPC Video Renderer 0.8.3 включен в инсталлятор. ffmpeg git-n7.1-dev-1050-g2c38ca3d37; Little-CMS git-lcms2.16-59-g2daf5c5; MediaInfo git-v24.05-gd9ba2b6c; + rapidjson git-v1.1.0-752-gab1842a2; vvdec git-v2.3.0-5-gffe3010. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 8d43026a36..824e09d103 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -35,6 +35,7 @@ Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; Little-CMS git-lcms2.16-59-g2daf5c5; MediaInfo git-v24.05-gd9ba2b6c; + rapidjson git-v1.1.0-752-gab1842a2; vvdec git-v2.3.0-5-gffe3010. diff --git a/src/ExtLib/rapidjson b/src/ExtLib/rapidjson index 3f73edae00..ab1842a2da 160000 --- a/src/ExtLib/rapidjson +++ b/src/ExtLib/rapidjson @@ -1 +1 @@ -Subproject commit 3f73edae00aba5b0112a80b4d41e6f1ff7d92a3d +Subproject commit ab1842a2dae061284c0a62dca1cc6d5e7e37e346 From 989c78c7591d280668c00d9b02884e48308a7804 Mon Sep 17 00:00:00 2001 From: v0lt Date: Thu, 6 Jun 2024 17:49:06 +0300 Subject: [PATCH 41/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=8F=D0=BF=D0=BE=D0=BD=D1=81=D0=BA=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=20tsubasanouta).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 1 + docs/Changelog.txt | 1 + src/apps/mpcresources/mplayerc.ja.rc | 12 ++++++------ src/apps/mpcresources/text/mplayerc.ja.rc.txt | 12 ++++++------ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index f52d6d1637..52e8108634 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -30,6 +30,7 @@ MPC Video Renderer 0.8.3 включен в инсталлятор. Обновлен турецкий перевод (автор cmhrky). Обновлен итальянский перевод (автор mapi68). Обновлен испанский перевод (автор IPeluchito). +Обновлен японский перевод (автор tsubasanouta). Обновлены библиотеки: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 824e09d103..bfbbc8daa0 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -30,6 +30,7 @@ Updated German translation (by Klaus1189). Updated Turkish translation (by cmhrky). Updated Italian translation (by mapi68). Updated Spanish translation (by IPeluchito). +Updated Japanese translation (by tsubasanouta). Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; diff --git a/src/apps/mpcresources/mplayerc.ja.rc b/src/apps/mpcresources/mplayerc.ja.rc index bc55647f3b..bc72268078 100644 --- a/src/apps/mpcresources/mplayerc.ja.rc +++ b/src/apps/mpcresources/mplayerc.ja.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "シーク タイムを表示する",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "「ディスクを開く」のメニューを無効にする",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "プロセスの優先度を 通常以上 にする",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "ネットワーク タイムアウト",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "接続:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "秒",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "データの受信:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "秒",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 @@ -3232,8 +3232,8 @@ BEGIN IDS_CMD_MONITOR "/monitor N\tN 番目 (N は 1 から始まる) のモニターで起動する" IDS_CMD_AUDIORENDERER "/audiorenderer N\tN 番目 (N は 1 から始まる) の音声レンダラーを使用する\n\t\t(「音声」設定を参照)" IDS_CMD_VOLUME "/volume N\t音量を設定する、N は 0 から 100 の範囲で指定する" - IDS_CMD_CLIPBOARD "/clipboard\t\tクリップボードからパス/リンクを開く" - IDS_CMD_DEVICE "/device\t\tOpen the default video device" + IDS_CMD_CLIPBOARD "/clipboard\tクリップボードからパス/リンクを開く" + IDS_CMD_DEVICE "/device\t\t既定のビデオ デバイスを開く" IDS_CMD_RESET "/reset\t\t初期設定に戻す" END diff --git a/src/apps/mpcresources/text/mplayerc.ja.rc.txt b/src/apps/mpcresources/text/mplayerc.ja.rc.txt index 1e8a32f3e0..40ef192021 100644 --- a/src/apps/mpcresources/text/mplayerc.ja.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ja.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "シーク タイムを表示する" 38 "「ディスクを開く」のメニューを無効にする" 39 "プロセスの優先度を 通常以上 にする" -40 "Network timeouts" -41 "Connection:" +40 "ネットワーク タイムアウト" +41 "接続:" 44 "秒" -45 "Receiving data:" -48 "sec." +45 "データの受信:" +48 "秒" END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 @@ -1383,10 +1383,10 @@ STRING IDS_CLEAR "クリア" STRING IDS_CMD_ADD "/add\t\t""pathname"" をプレイリストに追加する\n\t\t/open および /play と同時に使用可能" STRING IDS_CMD_AUDIORENDERER "/audiorenderer N\tN 番目 (N は 1 から始まる) の音声レンダラーを使用する\n\t\t(「音声」設定を参照)" STRING IDS_CMD_CD "/cd\t\t音声 CD または (S)VCD の全トラックを読み込む\n\t\t""pathname"" はドライブ パスを表す (オプション)" -STRING IDS_CMD_CLIPBOARD "/clipboard\t\tクリップボードからパス/リンクを開く" +STRING IDS_CMD_CLIPBOARD "/clipboard\tクリップボードからパス/リンクを開く" STRING IDS_CMD_CLOSE "/close\t\t再生終了後にプレーヤーを終了する (/play 使用時のみ有効)" STRING IDS_CMD_D3DFS "/d3dfs\t\t排他フルスクリーン モードでレンダリングを開始する" -STRING IDS_CMD_DEVICE "/device\t\tOpen the default video device" +STRING IDS_CMD_DEVICE "/device\t\t既定のビデオ デバイスを開く" STRING IDS_CMD_DUB "/dub ""dubname""\t追加の音声ファイルを読み込む" STRING IDS_CMD_DUBDELAY "/dubdelay ""file""\t追加の音声ファイルを XXms シフトして読み込む\n\t\t(ファイルが ""...DELAY XXms..."" を含んでいる場合)" STRING IDS_CMD_DVD "/dvd\t\tDVD モードで起動する\n\t\t""pathname"" は DVD フォルダーを表す (オプション)" From a7a65723697eff56bdaa0e00fe9df19127c3b822 Mon Sep 17 00:00:00 2001 From: v0lt Date: Fri, 7 Jun 2024 06:45:35 +0300 Subject: [PATCH 42/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=B3=D0=BE=D0=BB=D0=BB=D0=B0=D0=BD=D0=B4?= =?UTF-8?q?=D1=81=D0=BA=D0=B8=D0=B9=20=D0=B8=20=D0=BA=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=D0=B9=D1=81=D0=BA=D0=B8=D0=B9=20(Traditional)=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D1=8B=20(=D0=B0=D0=B2=D1=82?= =?UTF-8?q?=D0=BE=D1=80=20beter).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 3 ++- docs/Changelog.txt | 1 + src/apps/mpcresources/mplayerc.nl.rc | 6 +++--- src/apps/mpcresources/mplayerc.tc.rc | 8 ++++---- src/apps/mpcresources/text/mplayerc.nl.rc.txt | 6 +++--- src/apps/mpcresources/text/mplayerc.tc.rc.txt | 8 ++++---- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 52e8108634..669bd9a8cf 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -31,6 +31,7 @@ MPC Video Renderer 0.8.3 включен в инсталлятор. Обновлен итальянский перевод (автор mapi68). Обновлен испанский перевод (автор IPeluchito). Обновлен японский перевод (автор tsubasanouta). +Обновлены голландский и китайский (Traditional) переводы (автор beter). Обновлены библиотеки: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; @@ -71,7 +72,7 @@ MPC Video Renderer 0.8.1 включен в инсталлятор. Обновлен испанский перевод (автор IPeluchito). Обновлен японский перевод (автор tsubasanouta). Обновлен румынский перевод (автор AndreiMiloiu). -Обновлены голландский и китайский (Traditional) переводы (автор beter) +Обновлены голландский и китайский (Traditional) переводы (автор beter). Обновлены библиотеки: dav1d git-1.4.1-45-gfc4763c; diff --git a/docs/Changelog.txt b/docs/Changelog.txt index bfbbc8daa0..74395928ef 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -31,6 +31,7 @@ Updated Turkish translation (by cmhrky). Updated Italian translation (by mapi68). Updated Spanish translation (by IPeluchito). Updated Japanese translation (by tsubasanouta). +Updated Dutch and Chinese (Traditional) translation (by beter). Updated libraries: ffmpeg git-n7.1-dev-1050-g2c38ca3d37; diff --git a/src/apps/mpcresources/mplayerc.nl.rc b/src/apps/mpcresources/mplayerc.nl.rc index a14518d56e..ecf4cddb05 100644 --- a/src/apps/mpcresources/mplayerc.nl.rc +++ b/src/apps/mpcresources/mplayerc.nl.rc @@ -293,12 +293,12 @@ BEGIN CONTROL "Toon gezochte tijd",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Menu ""Schijf openen"" uitschakelen",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Procesprioriteit ""hoger dan normaal""",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Netwerktime-outs",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Time-out voor verbinding:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "sec.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Time-out voor ontvangen:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 LTEXT "sec.",IDC_STATIC,263,249,26,8 diff --git a/src/apps/mpcresources/mplayerc.tc.rc b/src/apps/mpcresources/mplayerc.tc.rc index 9c2c08fdad..5f5a7d20ae 100644 --- a/src/apps/mpcresources/mplayerc.tc.rc +++ b/src/apps/mpcresources/mplayerc.tc.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "顯示搜尋時間",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "停用「開啟光碟」選單",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "程式優先順序調成標準以上",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "網路逾時",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "連線逾時:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "秒",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "接收逾時:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "秒",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264 diff --git a/src/apps/mpcresources/text/mplayerc.nl.rc.txt b/src/apps/mpcresources/text/mplayerc.nl.rc.txt index e35e9d9ddd..4e72c8e7a5 100644 --- a/src/apps/mpcresources/text/mplayerc.nl.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.nl.rc.txt @@ -434,10 +434,10 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Toon gezochte tijd" 38 "Menu ""Schijf openen"" uitschakelen" 39 "Procesprioriteit ""hoger dan normaal""" -40 "Network timeouts" -41 "Connection:" +40 "Netwerktime-outs" +41 "Time-out voor verbinding:" 44 "sec." -45 "Receiving data:" +45 "Time-out voor ontvangen:" 48 "sec." END diff --git a/src/apps/mpcresources/text/mplayerc.tc.rc.txt b/src/apps/mpcresources/text/mplayerc.tc.rc.txt index ff644edd29..8df0b93d55 100644 --- a/src/apps/mpcresources/text/mplayerc.tc.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.tc.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "顯示搜尋時間" 38 "停用「開啟光碟」選單" 39 "程式優先順序調成標準以上" -40 "Network timeouts" -41 "Connection:" +40 "網路逾時" +41 "連線逾時:" 44 "秒" -45 "Receiving data:" -48 "sec." +45 "接收逾時:" +48 "秒" END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From ce9420a7c6921d0156b04f4071e8904b02837b5e Mon Sep 17 00:00:00 2001 From: v0lt Date: Fri, 7 Jun 2024 06:58:52 +0300 Subject: [PATCH 43/57] =?UTF-8?q?=D0=A0=D0=B5=D0=BB=D0=B8=D0=B7=201.7.2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- include/Version.h | 4 ++-- src/apps/mplayerc/res/mpc-be.exe.manifest.conf | 2 +- src/apps/mplayerc/res/mpc-be.exe.manifest.template | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 669bd9a8cf..2439d091c2 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -1,6 +1,6 @@ В этом файле отображаются только ключевые изменения между разными версиями Media Player Classic - BE. -1.7.1.x dev +1.7.2 - 2024-06-07 ============================= AudioSplitter Исправлено чтения картинок из ID3v2.3. diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 74395928ef..c12914f9a3 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -1,6 +1,6 @@ This file includes only a short list of the changes between Media Player Classic - BE's versions. -1.7.1.x dev +1.7.2 - 2024-06-07 ============================= AudioSplitter Fixed reading pictures from ID3v2.3. diff --git a/include/Version.h b/include/Version.h index 593eb08377..5aed7c2ea2 100644 --- a/include/Version.h +++ b/include/Version.h @@ -45,9 +45,9 @@ #define MPC_VERSION_MAJOR 1 #define MPC_VERSION_MINOR 7 -#define MPC_VERSION_PATCH 1 +#define MPC_VERSION_PATCH 2 -#define MPC_VERSION_STATUS 0 +#define MPC_VERSION_STATUS 1 // MPC_VERSION_STATUS: 0 - dev; 1 - stable #define MPC_YEAR_COMMENTS "2002-2024" diff --git a/src/apps/mplayerc/res/mpc-be.exe.manifest.conf b/src/apps/mplayerc/res/mpc-be.exe.manifest.conf index 459e768340..05506b3756 100644 --- a/src/apps/mplayerc/res/mpc-be.exe.manifest.conf +++ b/src/apps/mplayerc/res/mpc-be.exe.manifest.conf @@ -3,7 +3,7 @@ MPC-BE diff --git a/src/apps/mplayerc/res/mpc-be.exe.manifest.template b/src/apps/mplayerc/res/mpc-be.exe.manifest.template index be58d160ee..942ef4b3e4 100644 --- a/src/apps/mplayerc/res/mpc-be.exe.manifest.template +++ b/src/apps/mplayerc/res/mpc-be.exe.manifest.template @@ -3,7 +3,7 @@ MPC-BE From 46d255537db60707b06a56bd06a06b7cfa5cc315 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 08:02:37 +0300 Subject: [PATCH 44/57] =?UTF-8?q?=D0=A1=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D0=BD=D0=B0=201.7.2.x=20dev.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 4 ++++ docs/Changelog.txt | 4 ++++ include/Version.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 2439d091c2..70701c7e6a 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -1,5 +1,9 @@ В этом файле отображаются только ключевые изменения между разными версиями Media Player Classic - BE. +1.7.2.x dev +============================= + + 1.7.2 - 2024-06-07 ============================= AudioSplitter diff --git a/docs/Changelog.txt b/docs/Changelog.txt index c12914f9a3..026a62df54 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -1,5 +1,9 @@ This file includes only a short list of the changes between Media Player Classic - BE's versions. +1.7.2.x dev +============================= + + 1.7.2 - 2024-06-07 ============================= AudioSplitter diff --git a/include/Version.h b/include/Version.h index 5aed7c2ea2..f5fe524406 100644 --- a/include/Version.h +++ b/include/Version.h @@ -47,7 +47,7 @@ #define MPC_VERSION_MINOR 7 #define MPC_VERSION_PATCH 2 -#define MPC_VERSION_STATUS 1 +#define MPC_VERSION_STATUS 0 // MPC_VERSION_STATUS: 0 - dev; 1 - stable #define MPC_YEAR_COMMENTS "2002-2024" From 44e27ef7fc33334294db14ee0dc381ad81698761 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 08:06:08 +0300 Subject: [PATCH 45/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20ffmpeg=20git-n7.1-dev-1103-gba56a300?= =?UTF-8?q?a9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 + docs/Changelog.txt | 2 + src/ExtLib/ffmpeg/ffmpeg.mak | 5 +- src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c | 371 ++-- src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h | 219 ++- src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.c | 208 +++ src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.h | 54 + .../libavcodec/aac/aacdec_dsp_template.c | 162 +- .../ffmpeg/libavcodec/aac/aacdec_fixed.c | 2 + .../ffmpeg/libavcodec/aac/aacdec_float.c | 4 + .../ffmpeg/libavcodec/aac/aacdec_latm.h | 14 +- src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.c | 198 ++ src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.h | 33 + .../ffmpeg/libavcodec/aac/aacdec_usac.c | 1625 +++++++++++++++++ .../ffmpeg/libavcodec/aac/aacdec_usac.h | 37 + src/ExtLib/ffmpeg/libavcodec/aactab.c | 560 ++++++ src/ExtLib/ffmpeg/libavcodec/aactab.h | 22 + src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c | 10 +- src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c | 18 +- src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c | 23 +- src/ExtLib/ffmpeg/libavcodec/hevc_filter.c | 73 +- src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c | 20 +- src/ExtLib/ffmpeg/libavcodec/hevc_refs.c | 53 +- src/ExtLib/ffmpeg/libavcodec/hevcdec.c | 235 +-- src/ExtLib/ffmpeg/libavcodec/hevcdec.h | 14 +- .../ffmpeg/libavcodec/hevcpred_template.c | 6 +- src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c | 8 +- src/ExtLib/ffmpeg/libavcodec/rv34.c | 2 + .../libavcodec/sinewin_fixed_tablegen.h | 4 + src/ExtLib/ffmpeg/libavcodec/speedhqdec.c | 208 ++- src/ExtLib/ffmpeg/libavcodec/version.h | 4 +- src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c | 6 +- src/ExtLib/ffmpeg/libavcodec/wavpack.c | 4 +- src/ExtLib/ffmpeg/libavutil/channel_layout.c | 4 + src/ExtLib/ffmpeg/libavutil/channel_layout.h | 8 + src/ExtLib/ffmpeg/libavutil/version.h | 2 +- src/ExtLib/ffmpeg/libavutil/x86/float_dsp.asm | 52 + .../ffmpeg/libavutil/x86/float_dsp_init.c | 5 + 38 files changed, 3701 insertions(+), 576 deletions(-) create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.c create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.h create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.c create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.h create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c create mode 100644 src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.h diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 70701c7e6a..0f74d593cf 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -2,6 +2,8 @@ 1.7.2.x dev ============================= +Обновлены библиотеки: + ffmpeg git-n7.1-dev-1103-gba56a300a9. 1.7.2 - 2024-06-07 diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 026a62df54..9cb7a4a648 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -2,6 +2,8 @@ 1.7.2.x dev ============================= +Updated libraries: + ffmpeg git-n7.1-dev-1103-gba56a300a9. 1.7.2 - 2024-06-07 diff --git a/src/ExtLib/ffmpeg/ffmpeg.mak b/src/ExtLib/ffmpeg/ffmpeg.mak index a91ce5454d..316ce10642 100644 --- a/src/ExtLib/ffmpeg/ffmpeg.mak +++ b/src/ExtLib/ffmpeg/ffmpeg.mak @@ -420,9 +420,12 @@ SRCS_LC = \ libavcodec/nellymoserdec.c \ \ libavcodec/aac/aacdec.c \ + libavcodec/aac/aacdec_ac.c \ libavcodec/aac/aacdec_fixed.c \ libavcodec/aac/aacdec_float.c \ - libavcodec/aac/aacdec_tab.c + libavcodec/aac/aacdec_lpd.c \ + libavcodec/aac/aacdec_tab.c \ + libavcodec/aac/aacdec_usac.c SRCS_LC_B = \ libavcodec/nvdec.c \ diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c index 7457fe6c97..2b8322fc68 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c @@ -40,6 +40,7 @@ #include "aacdec.h" #include "aacdec_tab.h" +#include "aacdec_usac.h" #include "libavcodec/aac.h" #include "libavcodec/aac_defines.h" @@ -111,10 +112,6 @@ Parametric Stereo. */ -static int output_configure(AACDecContext *ac, - uint8_t layout_map[MAX_ELEM_ID*4][3], int tags, - enum OCStatus oc_type, int get_new_frame); - #define overread_err "Input buffer exhausted before END element found\n" static int count_channels(uint8_t (*layout)[3], int tags) @@ -447,8 +444,8 @@ static void pop_output_configuration(AACDecContext *ac) if (ac->oc[1].status != OC_LOCKED && ac->oc[0].status != OC_NONE) { ac->oc[1] = ac->oc[0]; ac->avctx->ch_layout = ac->oc[1].ch_layout; - output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, - ac->oc[1].status, 0); + ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, + ac->oc[1].status, 0); } } @@ -458,7 +455,7 @@ static void pop_output_configuration(AACDecContext *ac) * * @return Returns error status. 0 - OK, !0 - error */ -static int output_configure(AACDecContext *ac, +int ff_aac_output_configure(AACDecContext *ac, uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags, enum OCStatus oc_type, int get_new_frame) { @@ -539,6 +536,8 @@ static av_cold void flush(AVCodecContext *avctx) } } } + + ff_aac_usac_reset_state(ac, &ac->oc[1]); } /** @@ -547,7 +546,7 @@ static av_cold void flush(AVCodecContext *avctx) * * @return Returns error status. 0 - OK, !0 - error */ -static int set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx, +int ff_aac_set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx, uint8_t (*layout_map)[3], int *tags, int channel_config) @@ -587,7 +586,7 @@ static int set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx, return 0; } -static ChannelElement *get_che(AACDecContext *ac, int type, int elem_id) +ChannelElement *ff_aac_get_che(AACDecContext *ac, int type, int elem_id) { /* For PCE based channel configurations map the channels solely based * on tags. */ @@ -603,11 +602,11 @@ static ChannelElement *get_che(AACDecContext *ac, int type, int elem_id) av_log(ac->avctx, AV_LOG_DEBUG, "mono with CPE\n"); - if (set_default_channel_config(ac, ac->avctx, layout_map, - &layout_map_tags, 2) < 0) + if (ff_aac_set_default_channel_config(ac, ac->avctx, layout_map, + &layout_map_tags, 2) < 0) return NULL; - if (output_configure(ac, layout_map, layout_map_tags, - OC_TRIAL_FRAME, 1) < 0) + if (ff_aac_output_configure(ac, layout_map, layout_map_tags, + OC_TRIAL_FRAME, 1) < 0) return NULL; ac->oc[1].m4ac.chan_config = 2; @@ -627,8 +626,8 @@ static ChannelElement *get_che(AACDecContext *ac, int type, int elem_id) layout_map[0][2] = layout_map[1][2] = AAC_CHANNEL_FRONT; layout_map[0][1] = 0; layout_map[1][1] = 1; - if (output_configure(ac, layout_map, layout_map_tags, - OC_TRIAL_FRAME, 1) < 0) + if (ff_aac_output_configure(ac, layout_map, layout_map_tags, + OC_TRIAL_FRAME, 1) < 0) return NULL; if (ac->oc[1].m4ac.sbr) @@ -877,8 +876,8 @@ static int decode_ga_specific_config(AACDecContext *ac, AVCodecContext *avctx, if (tags < 0) return tags; } else { - if ((ret = set_default_channel_config(ac, avctx, layout_map, - &tags, channel_config))) + if ((ret = ff_aac_set_default_channel_config(ac, avctx, layout_map, + &tags, channel_config))) return ret; } @@ -887,7 +886,7 @@ static int decode_ga_specific_config(AACDecContext *ac, AVCodecContext *avctx, } else if (m4ac->sbr == 1 && m4ac->ps == -1) m4ac->ps = 1; - if (ac && (ret = output_configure(ac, layout_map, tags, OC_GLOBAL_HDR, 0))) + if (ac && (ret = ff_aac_output_configure(ac, layout_map, tags, OC_GLOBAL_HDR, 0))) return ret; if (extension_flag) { @@ -967,11 +966,11 @@ static int decode_eld_specific_config(AACDecContext *ac, AVCodecContext *avctx, skip_bits_long(gb, 8 * len); } - if ((ret = set_default_channel_config(ac, avctx, layout_map, - &tags, channel_config))) + if ((ret = ff_aac_set_default_channel_config(ac, avctx, layout_map, + &tags, channel_config))) return ret; - if (ac && (ret = output_configure(ac, layout_map, tags, OC_GLOBAL_HDR, 0))) + if (ac && (ret = ff_aac_output_configure(ac, layout_map, tags, OC_GLOBAL_HDR, 0))) return ret; ep_config = get_bits(gb, 2); @@ -997,13 +996,14 @@ static int decode_eld_specific_config(AACDecContext *ac, AVCodecContext *avctx, */ static int decode_audio_specific_config_gb(AACDecContext *ac, AVCodecContext *avctx, - MPEG4AudioConfig *m4ac, + OutputConfiguration *oc, GetBitContext *gb, int get_bit_alignment, int sync_extension) { int i, ret; GetBitContext gbc = *gb; + MPEG4AudioConfig *m4ac = &oc->m4ac; MPEG4AudioConfig m4ac_bak = *m4ac; if ((i = ff_mpeg4audio_get_config_gb(m4ac, &gbc, sync_extension, avctx)) < 0) { @@ -1037,14 +1037,22 @@ static int decode_audio_specific_config_gb(AACDecContext *ac, case AOT_ER_AAC_LC: case AOT_ER_AAC_LD: if ((ret = decode_ga_specific_config(ac, avctx, gb, get_bit_alignment, - m4ac, m4ac->chan_config)) < 0) + &oc->m4ac, m4ac->chan_config)) < 0) return ret; break; case AOT_ER_AAC_ELD: if ((ret = decode_eld_specific_config(ac, avctx, gb, - m4ac, m4ac->chan_config)) < 0) + &oc->m4ac, m4ac->chan_config)) < 0) + return ret; + break; +#if CONFIG_AAC_DECODER + case AOT_USAC_NOSBR: /* fallthrough */ + case AOT_USAC: + if ((ret = ff_aac_usac_config_decode(ac, avctx, gb, + oc, m4ac->chan_config)) < 0) return ret; break; +#endif default: avpriv_report_missing_feature(avctx, "Audio object type %s%d", @@ -1064,7 +1072,7 @@ static int decode_audio_specific_config_gb(AACDecContext *ac, static int decode_audio_specific_config(AACDecContext *ac, AVCodecContext *avctx, - MPEG4AudioConfig *m4ac, + OutputConfiguration *oc, const uint8_t *data, int64_t bit_size, int sync_extension) { @@ -1084,7 +1092,7 @@ static int decode_audio_specific_config(AACDecContext *ac, if ((ret = init_get_bits(&gb, data, bit_size)) < 0) return ret; - return decode_audio_specific_config_gb(ac, avctx, m4ac, &gb, 0, + return decode_audio_specific_config_gb(ac, avctx, oc, &gb, 0, sync_extension); } @@ -1108,6 +1116,15 @@ static av_cold int decode_close(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; + for (int i = 0; i < 2; i++) { + OutputConfiguration *oc = &ac->oc[i]; + AACUSACConfig *usac = &oc->usac; + for (int j = 0; j < usac->nb_elems; j++) { + AACUsacElemConfig *ec = &usac->elems[i]; + av_freep(&ec->ext.pl_data); + } + } + for (int type = 0; type < FF_ARRAY_ELEMS(ac->che); type++) { for (int i = 0; i < MAX_ELEM_ID; i++) { if (ac->che[type][i]) { @@ -1117,10 +1134,12 @@ static av_cold int decode_close(AVCodecContext *avctx) } } + av_tx_uninit(&ac->mdct96); av_tx_uninit(&ac->mdct120); av_tx_uninit(&ac->mdct128); av_tx_uninit(&ac->mdct480); av_tx_uninit(&ac->mdct512); + av_tx_uninit(&ac->mdct768); av_tx_uninit(&ac->mdct960); av_tx_uninit(&ac->mdct1024); av_tx_uninit(&ac->mdct_ltp); @@ -1149,10 +1168,12 @@ static av_cold int init_dsp(AVCodecContext *avctx) if (ret < 0) \ return ret + MDCT_INIT(ac->mdct96, ac->mdct96_fn, 96, 1.0/96); MDCT_INIT(ac->mdct120, ac->mdct120_fn, 120, 1.0/120); MDCT_INIT(ac->mdct128, ac->mdct128_fn, 128, 1.0/128); MDCT_INIT(ac->mdct480, ac->mdct480_fn, 480, 1.0/480); MDCT_INIT(ac->mdct512, ac->mdct512_fn, 512, 1.0/512); + MDCT_INIT(ac->mdct768, ac->mdct768_fn, 768, 1.0/768); MDCT_INIT(ac->mdct960, ac->mdct960_fn, 960, 1.0/960); MDCT_INIT(ac->mdct1024, ac->mdct1024_fn, 1024, 1.0/1024); #undef MDCT_INIT @@ -1181,7 +1202,7 @@ av_cold int ff_aac_decode_init(AVCodecContext *avctx) ac->oc[1].m4ac.sample_rate = avctx->sample_rate; if (avctx->extradata_size > 0) { - if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac, + if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1], avctx->extradata, avctx->extradata_size * 8LL, 1)) < 0) @@ -1206,11 +1227,12 @@ av_cold int ff_aac_decode_init(AVCodecContext *avctx) ac->oc[1].m4ac.chan_config = i; if (ac->oc[1].m4ac.chan_config) { - int ret = set_default_channel_config(ac, avctx, layout_map, - &layout_map_tags, ac->oc[1].m4ac.chan_config); + int ret = ff_aac_set_default_channel_config(ac, avctx, layout_map, + &layout_map_tags, + ac->oc[1].m4ac.chan_config); if (!ret) - output_configure(ac, layout_map, layout_map_tags, - OC_GLOBAL_HDR, 0); + ff_aac_output_configure(ac, layout_map, layout_map_tags, + OC_GLOBAL_HDR, 0); else if (avctx->err_recognition & AV_EF_EXPLODE) return AVERROR_INVALIDDATA; } @@ -1412,13 +1434,13 @@ static int decode_ics_info(AACDecContext *ac, IndividualChannelStream *ics, * * @return Returns error status. 0 - OK, !0 - error */ -static int decode_band_types(AACDecContext *ac, enum BandType band_type[120], - int band_type_run_end[120], GetBitContext *gb, - IndividualChannelStream *ics) +static int decode_band_types(AACDecContext *ac, SingleChannelElement *sce, + GetBitContext *gb) { - int g, idx = 0; + IndividualChannelStream *ics = &sce->ics; const int bits = (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) ? 3 : 5; - for (g = 0; g < ics->num_window_groups; g++) { + + for (int g = 0; g < ics->num_window_groups; g++) { int k = 0; while (k < ics->max_sfb) { uint8_t sect_end = k; @@ -1442,10 +1464,8 @@ static int decode_band_types(AACDecContext *ac, enum BandType band_type[120], return AVERROR_INVALIDDATA; } } while (sect_len_incr == (1 << bits) - 1); - for (; k < sect_end; k++) { - band_type [idx] = sect_band_type; - band_type_run_end[idx++] = sect_end; - } + for (; k < sect_end; k++) + sce->band_type[g*ics->max_sfb + k] = sect_band_type; } } return 0; @@ -1461,69 +1481,59 @@ static int decode_band_types(AACDecContext *ac, enum BandType band_type[120], * * @return Returns error status. 0 - OK, !0 - error */ -static int decode_scalefactors(AACDecContext *ac, int sfo[120], - GetBitContext *gb, - unsigned int global_gain, - IndividualChannelStream *ics, - enum BandType band_type[120], - int band_type_run_end[120]) +static int decode_scalefactors(AACDecContext *ac, SingleChannelElement *sce, + GetBitContext *gb, unsigned int global_gain) { - int g, i, idx = 0; + IndividualChannelStream *ics = &sce->ics; int offset[3] = { global_gain, global_gain - NOISE_OFFSET, 0 }; int clipped_offset; int noise_flag = 1; - for (g = 0; g < ics->num_window_groups; g++) { - for (i = 0; i < ics->max_sfb;) { - int run_end = band_type_run_end[idx]; - switch (band_type[idx]) { + + for (int g = 0; g < ics->num_window_groups; g++) { + for (int sfb = 0; sfb < ics->max_sfb; sfb++) { + switch (sce->band_type[g*ics->max_sfb + sfb]) { case ZERO_BT: - for (; i < run_end; i++, idx++) - sfo[idx] = 0; + sce->sfo[g*ics->max_sfb + sfb] = 0; break; case INTENSITY_BT: /* fallthrough */ case INTENSITY_BT2: - for (; i < run_end; i++, idx++) { - offset[2] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; - clipped_offset = av_clip(offset[2], -155, 100); - if (offset[2] != clipped_offset) { - avpriv_request_sample(ac->avctx, - "If you heard an audible artifact, there may be a bug in the decoder. " - "Clipped intensity stereo position (%d -> %d)", - offset[2], clipped_offset); - } - sfo[idx] = clipped_offset; + offset[2] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; + clipped_offset = av_clip(offset[2], -155, 100); + if (offset[2] != clipped_offset) { + avpriv_request_sample(ac->avctx, + "If you heard an audible artifact, there may be a bug in the decoder. " + "Clipped intensity stereo position (%d -> %d)", + offset[2], clipped_offset); } + sce->sfo[g*ics->max_sfb + sfb] = clipped_offset - 100; break; case NOISE_BT: - for (; i < run_end; i++, idx++) { - if (noise_flag-- > 0) - offset[1] += get_bits(gb, NOISE_PRE_BITS) - NOISE_PRE; - else - offset[1] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; - clipped_offset = av_clip(offset[1], -100, 155); - if (offset[1] != clipped_offset) { - avpriv_request_sample(ac->avctx, - "If you heard an audible artifact, there may be a bug in the decoder. " - "Clipped noise gain (%d -> %d)", - offset[1], clipped_offset); - } - sfo[idx] = clipped_offset; + if (noise_flag-- > 0) + offset[1] += get_bits(gb, NOISE_PRE_BITS) - NOISE_PRE; + else + offset[1] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; + clipped_offset = av_clip(offset[1], -100, 155); + if (offset[1] != clipped_offset) { + avpriv_request_sample(ac->avctx, + "If you heard an audible artifact, there may be a bug in the decoder. " + "Clipped noise gain (%d -> %d)", + offset[1], clipped_offset); } + sce->sfo[g*ics->max_sfb + sfb] = clipped_offset; break; default: - for (; i < run_end; i++, idx++) { - offset[0] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; - if (offset[0] > 255U) { - av_log(ac->avctx, AV_LOG_ERROR, - "Scalefactor (%d) out of range.\n", offset[0]); - return AVERROR_INVALIDDATA; - } - sfo[idx] = offset[0]; + offset[0] += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; + if (offset[0] > 255U) { + av_log(ac->avctx, AV_LOG_ERROR, + "Scalefactor (%d) out of range.\n", offset[0]); + return AVERROR_INVALIDDATA; } + sce->sfo[g*ics->max_sfb + sfb] = offset[0] - 100; break; } } } + return 0; } @@ -1557,12 +1567,19 @@ static int decode_pulses(Pulse *pulse, GetBitContext *gb, * * @return Returns error status. 0 - OK, !0 - error */ -static int decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, +int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics) { + int tns_max_order = INT32_MAX; + const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC || + ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR; int w, filt, i, coef_len, coef_res, coef_compress; const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE; - const int tns_max_order = is8 ? 7 : ac->oc[1].m4ac.object_type == AOT_AAC_MAIN ? 20 : 12; + + /* USAC doesn't seem to have a limit */ + if (!is_usac) + tns_max_order = is8 ? 7 : ac->oc[1].m4ac.object_type == AOT_AAC_MAIN ? 20 : 12; + for (w = 0; w < ics->num_windows; w++) { if ((tns->n_filt[w] = get_bits(gb, 2 - is8))) { coef_res = get_bits1(gb); @@ -1571,7 +1588,12 @@ static int decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, int tmp2_idx; tns->length[w][filt] = get_bits(gb, 6 - 2 * is8); - if ((tns->order[w][filt] = get_bits(gb, 5 - 2 * is8)) > tns_max_order) { + if (is_usac) + tns->order[w][filt] = get_bits(gb, 4 - is8); + else + tns->order[w][filt] = get_bits(gb, 5 - (2 * is8)); + + if (tns->order[w][filt] > tns_max_order) { av_log(ac->avctx, AV_LOG_ERROR, "TNS filter order %d is greater than maximum %d.\n", tns->order[w][filt], tns_max_order); @@ -1609,6 +1631,7 @@ static void decode_mid_side_stereo(ChannelElement *cpe, GetBitContext *gb, { int idx; int max_idx = cpe->ch[0].ics.num_window_groups * cpe->ch[0].ics.max_sfb; + cpe->max_sfb_ste = cpe->ch[0].ics.max_sfb; if (ms_present == 1) { for (idx = 0; idx < max_idx; idx++) cpe->ms_mask[idx] = get_bits1(gb); @@ -1680,11 +1703,9 @@ int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, goto fail; } - if ((ret = decode_band_types(ac, sce->band_type, - sce->band_type_run_end, gb, ics)) < 0) + if ((ret = decode_band_types(ac, sce, gb)) < 0) goto fail; - if ((ret = decode_scalefactors(ac, sce->sfo, gb, global_gain, ics, - sce->band_type, sce->band_type_run_end)) < 0) + if ((ret = decode_scalefactors(ac, sce, gb, global_gain)) < 0) goto fail; ac->dsp.dequant_scalefactors(sce); @@ -1707,7 +1728,7 @@ int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, } tns->present = get_bits1(gb); if (tns->present && !er_syntax) { - ret = decode_tns(ac, tns, gb, ics); + ret = ff_aac_decode_tns(ac, tns, gb, ics); if (ret < 0) goto fail; } @@ -1721,7 +1742,7 @@ int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, // I see no textual basis in the spec for this occurring after SSR gain // control, but this is what both reference and real implmentations do if (tns->present && er_syntax) { - ret = decode_tns(ac, tns, gb, ics); + ret = ff_aac_decode_tns(ac, tns, gb, ics); if (ret < 0) goto fail; } @@ -1929,8 +1950,8 @@ static int decode_extension_payload(AACDecContext *ac, GetBitContext *gb, int cn ac->oc[1].m4ac.sbr = 1; ac->oc[1].m4ac.ps = 1; ac->avctx->profile = AV_PROFILE_AAC_HE_V2; - output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, - ac->oc[1].status, 1); + ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, + ac->oc[1].status, 1); } else { ac->oc[1].m4ac.sbr = 1; ac->avctx->profile = AV_PROFILE_AAC_HE; @@ -2080,13 +2101,13 @@ static int parse_adts_frame_header(AACDecContext *ac, GetBitContext *gb) push_output_configuration(ac); if (hdr_info.chan_config) { ac->oc[1].m4ac.chan_config = hdr_info.chan_config; - if ((ret = set_default_channel_config(ac, ac->avctx, - layout_map, - &layout_map_tags, - hdr_info.chan_config)) < 0) + if ((ret = ff_aac_set_default_channel_config(ac, ac->avctx, + layout_map, + &layout_map_tags, + hdr_info.chan_config)) < 0) return ret; - if ((ret = output_configure(ac, layout_map, layout_map_tags, - FFMAX(ac->oc[1].status, + if ((ret = ff_aac_output_configure(ac, layout_map, layout_map_tags, + FFMAX(ac->oc[1].status, OC_TRIAL_FRAME), 0)) < 0) return ret; } else { @@ -2102,8 +2123,8 @@ static int parse_adts_frame_header(AACDecContext *ac, GetBitContext *gb) layout_map[0][2] = layout_map[1][2] = AAC_CHANNEL_FRONT; layout_map[0][1] = 0; layout_map[1][1] = 1; - if (output_configure(ac, layout_map, layout_map_tags, - OC_TRIAL_FRAME, 0)) + if (ff_aac_output_configure(ac, layout_map, layout_map_tags, + OC_TRIAL_FRAME, 0)) return -7; } } @@ -2156,7 +2177,7 @@ static int aac_decode_er_frame(AVCodecContext *avctx, AVFrame *frame, for (i = 0; i < ff_tags_per_config[chan_config]; i++) { const int elem_type = ff_aac_channel_layout_map[chan_config-1][i][0]; const int elem_id = ff_aac_channel_layout_map[chan_config-1][i][1]; - if (!(che=get_che(ac, elem_type, elem_id))) { + if (!(che=ff_aac_get_che(ac, elem_type, elem_id))) { av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); @@ -2195,42 +2216,19 @@ static int aac_decode_er_frame(AVCodecContext *avctx, AVFrame *frame, return 0; } -static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, - int *got_frame_ptr, GetBitContext *gb, - const AVPacket *avpkt) +static int decode_frame_ga(AVCodecContext *avctx, AACDecContext *ac, + GetBitContext *gb, int *got_frame_ptr) { - AACDecContext *ac = avctx->priv_data; - ChannelElement *che = NULL, *che_prev = NULL; + int err; + int is_dmono; + int elem_id; enum RawDataBlockType elem_type, che_prev_type = TYPE_END; - int err, elem_id; - int samples = 0, multiplier, audio_found = 0, pce_found = 0; - int is_dmono, sce_count = 0; - int payload_alignment; uint8_t che_presence[4][MAX_ELEM_ID] = {{0}}; + ChannelElement *che = NULL, *che_prev = NULL; + int samples = 0, multiplier, audio_found = 0, pce_found = 0, sce_count = 0; + AVFrame *frame = ac->frame; - ac->frame = frame; - - if (show_bits(gb, 12) == 0xfff) { - if ((err = parse_adts_frame_header(ac, gb)) < 0) { - av_log(avctx, AV_LOG_ERROR, "Error decoding AAC frame header.\n"); - goto fail; - } - if (ac->oc[1].m4ac.sampling_index > 12) { - av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->oc[1].m4ac.sampling_index); - err = AVERROR_INVALIDDATA; - goto fail; - } - } - - if ((err = frame_configure_elements(avctx)) < 0) - goto fail; - - // The AV_PROFILE_AAC_* defines are all object_type - 1 - // This may lead to an undefined profile being signaled - ac->avctx->profile = ac->oc[1].m4ac.object_type - 1; - - payload_alignment = get_bits_count(gb); - ac->tags_mapped = 0; + int payload_alignment = get_bits_count(gb); // parse while ((elem_type = get_bits(gb, 3)) != TYPE_END) { elem_id = get_bits(gb, 4); @@ -2238,28 +2236,23 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, if (avctx->debug & FF_DEBUG_STARTCODE) av_log(avctx, AV_LOG_DEBUG, "Elem type:%x id:%x\n", elem_type, elem_id); - if (!avctx->ch_layout.nb_channels && elem_type != TYPE_PCE) { - err = AVERROR_INVALIDDATA; - goto fail; - } + if (!avctx->ch_layout.nb_channels && elem_type != TYPE_PCE) + return AVERROR_INVALIDDATA; if (elem_type < TYPE_DSE) { if (che_presence[elem_type][elem_id]) { int error = che_presence[elem_type][elem_id] > 1; av_log(ac->avctx, error ? AV_LOG_ERROR : AV_LOG_DEBUG, "channel element %d.%d duplicate\n", elem_type, elem_id); - if (error) { - err = AVERROR_INVALIDDATA; - goto fail; - } + if (error) + return AVERROR_INVALIDDATA; } che_presence[elem_type][elem_id]++; - if (!(che=get_che(ac, elem_type, elem_id))) { + if (!(che=ff_aac_get_che(ac, elem_type, elem_id))) { av_log(ac->avctx, AV_LOG_ERROR, "channel element %d.%d is not allocated\n", elem_type, elem_id); - err = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } samples = ac->oc[1].m4ac.frame_length_short ? 960 : 1024; che->present = 1; @@ -2296,10 +2289,8 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, int tags; int pushed = push_output_configuration(ac); - if (pce_found && !pushed) { - err = AVERROR_INVALIDDATA; - goto fail; - } + if (pce_found && !pushed) + return AVERROR_INVALIDDATA; tags = decode_pce(avctx, &ac->oc[1].m4ac, layout_map, gb, payload_alignment); @@ -2312,7 +2303,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, "Not evaluating a further program_config_element as this construct is dubious at best.\n"); pop_output_configuration(ac); } else { - err = output_configure(ac, layout_map, tags, OC_TRIAL_PCE, 1); + err = ff_aac_output_configure(ac, layout_map, tags, OC_TRIAL_PCE, 1); if (!err) ac->oc[1].m4ac.chan_config = 0; pce_found = 1; @@ -2325,8 +2316,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, elem_id += get_bits(gb, 8) - 1; if (get_bits_left(gb) < 8 * elem_id) { av_log(avctx, AV_LOG_ERROR, "TYPE_FIL: "overread_err); - err = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } err = 0; while (elem_id > 0) { @@ -2350,19 +2340,16 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, } if (err) - goto fail; + return err; if (get_bits_left(gb) < 3) { av_log(avctx, AV_LOG_ERROR, overread_err); - err = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } } - if (!avctx->ch_layout.nb_channels) { - *got_frame_ptr = 0; + if (!avctx->ch_layout.nb_channels) return 0; - } multiplier = (ac->oc[1].m4ac.sbr == 1) ? ac->oc[1].m4ac.ext_sample_rate > ac->oc[1].m4ac.sample_rate : 0; samples <<= multiplier; @@ -2377,16 +2364,17 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, if (!ac->frame->data[0] && samples) { av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); - err = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } if (samples) { ac->frame->nb_samples = samples; ac->frame->sample_rate = avctx->sample_rate; - } else + *got_frame_ptr = 1; + } else { av_frame_unref(ac->frame); - *got_frame_ptr = !!samples; + *got_frame_ptr = 0; + } /* for dual-mono audio (SCE + SCE) */ is_dmono = ac->dmono_mode && sce_count == 2 && @@ -2400,6 +2388,59 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, } return 0; +} + +static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, + int *got_frame_ptr, GetBitContext *gb, + const AVPacket *avpkt) +{ + int err; + AACDecContext *ac = avctx->priv_data; + + ac->frame = frame; + *got_frame_ptr = 0; + + if (show_bits(gb, 12) == 0xfff) { + if ((err = parse_adts_frame_header(ac, gb)) < 0) { + av_log(avctx, AV_LOG_ERROR, "Error decoding AAC frame header.\n"); + goto fail; + } + if (ac->oc[1].m4ac.sampling_index > 12) { + av_log(ac->avctx, AV_LOG_ERROR, "invalid sampling rate index %d\n", ac->oc[1].m4ac.sampling_index); + err = AVERROR_INVALIDDATA; + goto fail; + } + } + + if ((err = frame_configure_elements(avctx)) < 0) + goto fail; + + // The AV_PROFILE_AAC_* defines are all object_type - 1 + // This may lead to an undefined profile being signaled + ac->avctx->profile = ac->oc[1].m4ac.object_type - 1; + + ac->tags_mapped = 0; + + if ((ac->oc[1].m4ac.object_type == AOT_USAC) || + (ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR)) { + if (ac->is_fixed) { + avpriv_report_missing_feature(ac->avctx, + "AAC USAC fixed-point decoding"); + return AVERROR_PATCHWELCOME; + } +#if CONFIG_AAC_DECODER + err = ff_aac_usac_decode_frame(avctx, ac, gb, got_frame_ptr); + if (err < 0) + goto fail; +#endif + } else { + err = decode_frame_ga(avctx, ac, gb, got_frame_ptr); + if (err < 0) + goto fail; + } + + return err; + fail: pop_output_configuration(ac); return err; @@ -2427,7 +2468,7 @@ static int aac_decode_frame(AVCodecContext *avctx, AVFrame *frame, if (new_extradata) { /* discard previous configuration */ ac->oc[1].status = OC_NONE; - err = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac, + err = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1], new_extradata, new_extradata_size * 8LL, 1); if (err < 0) { diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h index eed53c6c96..ee21a94007 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h @@ -39,8 +39,11 @@ #include "libavutil/tx.h" #include "libavcodec/aac.h" +#include "libavcodec/avcodec.h" #include "libavcodec/mpeg4audio.h" +#include "aacdec_ac.h" + typedef struct AACDecContext AACDecContext; /** @@ -68,6 +71,32 @@ enum CouplingPoint { AFTER_IMDCT = 3, }; +enum AACUsacElem { + ID_USAC_SCE = 0, + ID_USAC_CPE = 1, + ID_USAC_LFE = 2, + ID_USAC_EXT = 3, +}; + +enum ExtensionHeaderType { + ID_CONFIG_EXT_FILL = 0, + ID_CONFIG_EXT_LOUDNESS_INFO = 2, + ID_CONFIG_EXT_STREAM_ID = 7, +}; + +enum AACUsacExtension { + ID_EXT_ELE_FILL, + ID_EXT_ELE_MPEGS, + ID_EXT_ELE_SAOC, + ID_EXT_ELE_AUDIOPREROLL, + ID_EXT_ELE_UNI_DRC, +}; + +enum AACUSACLoudnessExt { + UNIDRCLOUDEXT_TERM = 0x0, + UNIDRCLOUDEXT_EQ = 0x1, +}; + // Supposed to be equal to AAC_RENAME() in case of USE_FIXED. #define RENAME_FIXED(name) name ## _fixed @@ -92,6 +121,40 @@ typedef struct LongTermPrediction { int8_t used[MAX_LTP_LONG_SFB]; } LongTermPrediction; +/* Per channel core mode */ +typedef struct AACUsacElemData { + uint8_t core_mode; + uint8_t scale_factor_grouping; + + /* Timewarping ratio */ +#define NUM_TW_NODES 16 + uint8_t tw_ratio[NUM_TW_NODES]; + + struct { + uint8_t acelp_core_mode : 3; + uint8_t lpd_mode : 5; + + uint8_t bpf_control_info : 1; + uint8_t core_mode_last : 1; + uint8_t fac_data_present : 1; + + int last_lpd_mode; + } ldp; + + struct { + unsigned int seed; + uint8_t level : 3; + uint8_t offset : 5; + } noise; + + struct { + uint8_t gain; + uint32_t kv[8 /* (1024 / 16) / 8 */][8]; + } fac; + + AACArithState ac; +} AACUsacElemData; + /** * Individual Channel Stream */ @@ -144,12 +207,13 @@ typedef struct ChannelCoupling { */ typedef struct SingleChannelElement { IndividualChannelStream ics; + AACUsacElemData ue; ///< USAC element data TemporalNoiseShaping tns; enum BandType band_type[128]; ///< band types - int band_type_run_end[120]; ///< band type run end points - int sfo[120]; ///< scalefactor offsets - INTFLOAT_UNION(sf, [120]); ///< scalefactors + int sfo[128]; ///< scalefactor offsets + INTFLOAT_UNION(sf, [128]); ///< scalefactors (8 windows * 16 sfb max) INTFLOAT_ALIGNED_UNION(32, coeffs, 1024); ///< coefficients for IMDCT, maybe processed + INTFLOAT_ALIGNED_UNION(32, prev_coeffs, 1024); ///< unscaled previous contents of coeffs[] for USAC INTFLOAT_ALIGNED_UNION(32, saved, 1536); ///< overlap INTFLOAT_ALIGNED_UNION(32, ret_buf, 2048); ///< PCM output buffer INTFLOAT_ALIGNED_UNION(16, ltp_state, 3072); ///< time signal for LTP @@ -163,25 +227,148 @@ typedef struct SingleChannelElement { }; } SingleChannelElement; +typedef struct AACUsacStereo { + uint8_t common_window; + uint8_t common_tw; + + uint8_t ms_mask_mode; + uint8_t config_idx; + + /* Complex prediction */ + uint8_t use_prev_frame; + uint8_t pred_dir; + uint8_t complex_coef; + + uint8_t pred_used[128]; + + INTFLOAT_ALIGNED_UNION(32, alpha_q_re, 1024); + INTFLOAT_ALIGNED_UNION(32, alpha_q_im, 1024); + INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_re, 1024); + INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_im, 1024); + + INTFLOAT_ALIGNED_UNION(32, dmix_re, 1024); + INTFLOAT_ALIGNED_UNION(32, prev_dmix_re, 1024); /* Recalculated on every frame */ + INTFLOAT_ALIGNED_UNION(32, dmix_im, 1024); /* Final prediction data */ +} AACUsacStereo; + /** * channel element - generic struct for SCE/CPE/CCE/LFE */ typedef struct ChannelElement { int present; // CPE specific + uint8_t max_sfb_ste; ///< (USAC) Maximum of both max_sfb values uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band // shared SingleChannelElement ch[2]; // CCE specific ChannelCoupling coup; + // USAC stereo coupling data + AACUsacStereo us; } ChannelElement; +typedef struct AACUSACLoudnessInfo { + uint8_t drc_set_id : 6; + uint8_t downmix_id : 7; + struct { + uint16_t lvl : 12; + uint8_t present : 1; + } sample_peak; + + struct { + uint16_t lvl : 12; + uint8_t measurement : 4; + uint8_t reliability : 2; + uint8_t present : 1; + } true_peak; + + uint8_t nb_measurements : 4; + struct { + uint8_t method_def : 4; + uint8_t method_val; + uint8_t measurement : 4; + uint8_t reliability : 2; + } measurements[16]; +} AACUSACLoudnessInfo; + +typedef struct AACUsacElemConfig { + enum AACUsacElem type; + + uint8_t tw_mdct : 1; + uint8_t noise_fill : 1; + + uint8_t stereo_config_index; + + struct { + int ratio; + + uint8_t harmonic_sbr : 1; /* harmonicSBR */ + uint8_t bs_intertes : 1; /* bs_interTes */ + uint8_t bs_pvc : 1; /* bs_pvc */ + + struct { + uint8_t start_freq; /* dflt_start_freq */ + uint8_t stop_freq; /* dflt_stop_freq */ + + uint8_t freq_scale; /* dflt_freq_scale */ + uint8_t alter_scale : 1; /* dflt_alter_scale */ + uint8_t noise_scale; /* dflt_noise_scale */ + + uint8_t limiter_bands; /* dflt_limiter_bands */ + uint8_t limiter_gains; /* dflt_limiter_gains */ + uint8_t interpol_freq : 1; /* dflt_interpol_freq */ + uint8_t smoothing_mode : 1; /* dflt_smoothing_mode */ + } dflt; + } sbr; + + struct { + uint8_t freq_res; /* bsFreqRes */ + uint8_t fixed_gain; /* bsFixedGainDMX */ + uint8_t temp_shape_config; /* bsTempShapeConfig */ + uint8_t decorr_config; /* bsDecorrConfig */ + uint8_t high_rate_mode : 1; /* bsHighRateMode */ + uint8_t phase_coding : 1; /* bsPhaseCoding */ + + uint8_t otts_bands_phase; /* bsOttBandsPhase */ + uint8_t residual_coding; /* bsResidualCoding */ + uint8_t residual_bands; /* bsResidualBands */ + uint8_t pseudo_lr : 1; /* bsPseudoLr */ + uint8_t env_quant_mode : 1; /* bsEnvQuantMode */ + } mps; + + struct { + enum AACUsacExtension type; + uint8_t payload_frag; + uint32_t default_len; + uint32_t pl_data_offset; + uint8_t *pl_data; + } ext; +} AACUsacElemConfig; + +typedef struct AACUSACConfig { + uint8_t core_sbr_frame_len_idx; /* coreSbrFrameLengthIndex */ + uint8_t rate_idx; + uint16_t core_frame_len; + uint16_t stream_identifier; + + AACUsacElemConfig elems[64]; + int nb_elems; + + struct { + uint8_t nb_album; + AACUSACLoudnessInfo album_info[64]; + uint8_t nb_info; + AACUSACLoudnessInfo info[64]; + } loudness; +} AACUSACConfig; + typedef struct OutputConfiguration { MPEG4AudioConfig m4ac; uint8_t layout_map[MAX_ELEM_ID*4][3]; int layout_map_tags; AVChannelLayout ch_layout; enum OCStatus status; + AACUSACConfig usac; } OutputConfiguration; /** @@ -245,6 +432,7 @@ typedef struct AACDecDSP { ChannelElement *cce, int index); void (*imdct_and_windowing)(AACDecContext *ac, SingleChannelElement *sce); + void (*imdct_and_windowing_768)(AACDecContext *ac, SingleChannelElement *sce); void (*imdct_and_windowing_960)(AACDecContext *ac, SingleChannelElement *sce); void (*imdct_and_windowing_ld)(AACDecContext *ac, SingleChannelElement *sce); void (*imdct_and_windowing_eld)(AACDecContext *ac, SingleChannelElement *sce); @@ -290,18 +478,22 @@ struct AACDecContext { * @name Computed / set up during initialization * @{ */ + AVTXContext *mdct96; AVTXContext *mdct120; AVTXContext *mdct128; AVTXContext *mdct480; AVTXContext *mdct512; + AVTXContext *mdct768; AVTXContext *mdct960; AVTXContext *mdct1024; AVTXContext *mdct_ltp; + av_tx_fn mdct96_fn; av_tx_fn mdct120_fn; av_tx_fn mdct128_fn; av_tx_fn mdct480_fn; av_tx_fn mdct512_fn; + av_tx_fn mdct768_fn; av_tx_fn mdct960_fn; av_tx_fn mdct1024_fn; av_tx_fn mdct_ltp_fn; @@ -344,10 +536,25 @@ struct AACDecContext { #define fdsp RENAME_FIXED(fdsp) #endif -int ff_aac_decode_init(struct AVCodecContext *avctx); -int ff_aac_decode_init_float(struct AVCodecContext *avctx); -int ff_aac_decode_init_fixed(struct AVCodecContext *avctx); +int ff_aac_decode_init(AVCodecContext *avctx); +int ff_aac_decode_init_float(AVCodecContext *avctx); +int ff_aac_decode_init_fixed(AVCodecContext *avctx); + int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag); +int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, + GetBitContext *gb, const IndividualChannelStream *ics); + +int ff_aac_set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx, + uint8_t (*layout_map)[3], + int *tags, + int channel_config); + +int ff_aac_output_configure(AACDecContext *ac, + uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags, + enum OCStatus oc_type, int get_new_frame); + +ChannelElement *ff_aac_get_che(AACDecContext *ac, int type, int elem_id); + #endif /* AVCODEC_AAC_AACDEC_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.c new file mode 100644 index 0000000000..7e5077cd19 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.c @@ -0,0 +1,208 @@ +/* + * AAC definitions and structures + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavcodec/aactab.h" +#include "aacdec_ac.h" + +uint32_t ff_aac_ac_map_process(AACArithState *state, int reset, int N) +{ + float ratio; + if (reset) { + memset(state->last, 0, sizeof(state->last)); + state->last_len = N; + } else if (state->last_len != N) { + int i; + uint8_t last[512 /* 2048 / 4 */]; + memcpy(last, state->last, sizeof(last)); + + ratio = state->last_len / (float)N; + for (i = 0; i < N/2; i++) { + int k = (int)(i * ratio); + state->last[i] = last[k]; + } + + for (; i < FF_ARRAY_ELEMS(state->last); i++) + state->last[i] = 0; + + state->last_len = N; + } + + state->cur[3] = 0; + state->cur[2] = 0; + state->cur[1] = 0; + state->cur[0] = 1; + + state->state_pre = state->last[0] << 12; + return state->last[0] << 12; +} + +uint32_t ff_aac_ac_get_context(AACArithState *state, uint32_t c, int i, int N) +{ + c = state->state_pre >> 8; + c = c + (state->last[i + 1] << 8); + c = (c << 4); + c += state->cur[1]; + + state->state_pre = c; + + if (i > 3 && + ((state->cur[3] + state->cur[2] + state->cur[1]) < 5)) + return c + 0x10000; + + return c; +} + +uint32_t ff_aac_ac_get_pk(uint32_t c) +{ + int i_min = -1; + int i, j; + int i_max = FF_ARRAY_ELEMS(ff_aac_ac_lookup_m) - 1; + while ((i_max - i_min) > 1) { + i = i_min + ((i_max - i_min) / 2); + j = ff_aac_ac_hash_m[i]; + if (c < (j >> 8)) + i_max = i; + else if (c > (j >> 8)) + i_min = i; + else + return (j & 0xFF); + } + return ff_aac_ac_lookup_m[i_max]; +} + +void ff_aac_ac_update_context(AACArithState *state, int idx, + uint16_t a, uint16_t b) +{ + state->cur[0] = a + b + 1; + if (state->cur[0] > 0xF) + state->cur[0] = 0xF; + + state->cur[3] = state->cur[2]; + state->cur[2] = state->cur[1]; + state->cur[1] = state->cur[0]; + + state->last[idx] = state->cur[0]; +} + +/* Initialize AC */ +void ff_aac_ac_init(AACArith *ac, GetBitContext *gb) +{ + ac->low = 0; + ac->high = UINT16_MAX; + ac->val = get_bits(gb, 16); +} + +uint16_t ff_aac_ac_decode(AACArith *ac, GetBitContext *gb, + const uint16_t *cdf, uint16_t cdf_len) +{ + int val = ac->val; + int low = ac->low; + int high = ac->high; + + int sym; + int rng = high - low + 1; + int c = ((((int)(val - low + 1)) << 14) - ((int)1)); + + const uint16_t *p = cdf - 1; + + /* One for each possible CDF length in the spec */ + switch (cdf_len) { + case 2: + if ((p[1] * rng) > c) + p += 1; + break; + case 4: + if ((p[2] * rng) > c) + p += 2; + if ((p[1] * rng) > c) + p += 1; + break; + case 17: + /* First check if the current probability is even met at all */ + if ((p[1] * rng) <= c) + break; + p += 1; + for (int i = 8; i >= 1; i >>= 1) + if ((p[i] * rng) > c) + p += i; + break; + case 27: + if ((p[16] * rng) > c) + p += 16; + if ((p[8] * rng) > c) + p += 8; + if (p != (cdf - 1 + 24)) + if ((p[4] * rng) > c) + p += 4; + if ((p[2] * rng) > c) + p += 2; + + if (p != (cdf - 1 + 24 + 2)) + if ((p[1] * rng) > c) + p += 1; + break; + default: + /* This should never happen */ + av_assert2(0); + } + + sym = (int)((ptrdiff_t)(p - cdf)) + 1; + if (sym) + high = low + ((rng * cdf[sym - 1]) >> 14) - 1; + low += (rng * cdf[sym]) >> 14; + + /* This loop could be done faster */ + while (1) { + if (high < 32768) { + ; + } else if (low >= 32768) { + val -= 32768; + low -= 32768; + high -= 32768; + } else if (low >= 16384 && high < 49152) { + val -= 16384; + low -= 16384; + high -= 16384; + } else { + break; + } + low += low; + high += high + 1; + val = (val << 1) | get_bits1(gb); + }; + + ac->low = low; + ac->high = high; + ac->val = val; + + return sym; +} + +void ff_aac_ac_finish(AACArithState *state, int offset, int N) +{ + int i; + + for (i = offset; i < N/2; i++) + state->last[i] = 1; + + for (; i < FF_ARRAY_ELEMS(state->last); i++) + state->last[i] = 0; +} diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.h new file mode 100644 index 0000000000..0b98c0f0d9 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_ac.h @@ -0,0 +1,54 @@ +/* + * AAC definitions and structures + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AAC_AACDEC_AC_H +#define AVCODEC_AAC_AACDEC_AC_H + +#include "libavcodec/get_bits.h" + +typedef struct AACArithState { + uint8_t last[512 /* 2048 / 4 */]; + int last_len; + uint8_t cur[4]; + uint16_t state_pre; +} AACArithState; + +typedef struct AACArith { + uint16_t low; + uint16_t high; + uint16_t val; +} AACArith; + +#define FF_AAC_AC_ESCAPE 16 + +uint32_t ff_aac_ac_map_process(AACArithState *state, int reset, int len); +uint32_t ff_aac_ac_get_context(AACArithState *state, uint32_t old_c, int idx, int len); +uint32_t ff_aac_ac_get_pk(uint32_t c); + +void ff_aac_ac_update_context(AACArithState *state, int idx, uint16_t a, uint16_t b); +void ff_aac_ac_init(AACArith *ac, GetBitContext *gb); + +uint16_t ff_aac_ac_decode(AACArith *ac, GetBitContext *gb, + const uint16_t *cdf, uint16_t cdf_len); + +void ff_aac_ac_finish(AACArithState *state, int offset, int nb); + +#endif /* AVCODEC_AACDEC_AC_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_dsp_template.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_dsp_template.c index 621baef8ca..8d31af22f8 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_dsp_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_dsp_template.c @@ -41,47 +41,37 @@ static void AAC_RENAME(dequant_scalefactors)(SingleChannelElement *sce) { IndividualChannelStream *ics = &sce->ics; - const enum BandType *band_type = sce->band_type; - const int *band_type_run_end = sce->band_type_run_end; const int *sfo = sce->sfo; INTFLOAT *sf = sce->AAC_RENAME(sf); - int g, i, idx = 0; - for (g = 0; g < ics->num_window_groups; g++) { - for (i = 0; i < ics->max_sfb;) { - int run_end = band_type_run_end[idx]; - switch (band_type[idx]) { + int idx = 0; + for (int g = 0; g < ics->num_window_groups; g++) { + for (int sfb = 0; sfb < ics->max_sfb; sfb++, idx++) { + switch (sce->band_type[g*ics->max_sfb + sfb]) { case ZERO_BT: - for (; i < run_end; i++, idx++) - sf[idx] = FIXR(0.); + sf[idx] = FIXR(0.); break; case INTENSITY_BT: /* fallthrough */ case INTENSITY_BT2: - for (; i < run_end; i++, idx++) { #if USE_FIXED - sf[idx] = 100 - sfo[idx]; + sf[idx] = 100 - (sfo[idx] + 100); #else - sf[idx] = ff_aac_pow2sf_tab[-sfo[idx] + POW_SF2_ZERO]; + sf[idx] = ff_aac_pow2sf_tab[-sfo[idx] - 100 + POW_SF2_ZERO]; #endif /* USE_FIXED */ - } break; case NOISE_BT: - for (; i < run_end; i++, idx++) { #if USE_FIXED - sf[idx] = -(100 + sfo[idx]); + sf[idx] = -(100 + sfo[idx]); #else - sf[idx] = -ff_aac_pow2sf_tab[sfo[idx] + POW_SF2_ZERO]; + sf[idx] = -ff_aac_pow2sf_tab[sfo[idx] + POW_SF2_ZERO]; #endif /* USE_FIXED */ - } break; default: - for (; i < run_end; i++, idx++) { #if USE_FIXED - sf[idx] = -sfo[idx]; + sf[idx] = -sfo[idx] - 100; #else - sf[idx] = -ff_aac_pow2sf_tab[sfo[idx] - 100 + POW_SF2_ZERO]; + sf[idx] = -ff_aac_pow2sf_tab[sfo[idx] + POW_SF2_ZERO]; #endif /* USE_FIXED */ - } break; } } @@ -96,25 +86,23 @@ static void AAC_RENAME(apply_mid_side_stereo)(AACDecContext *ac, ChannelElement const IndividualChannelStream *ics = &cpe->ch[0].ics; INTFLOAT *ch0 = cpe->ch[0].AAC_RENAME(coeffs); INTFLOAT *ch1 = cpe->ch[1].AAC_RENAME(coeffs); - int g, i, group, idx = 0; const uint16_t *offsets = ics->swb_offset; - for (g = 0; g < ics->num_window_groups; g++) { - for (i = 0; i < ics->max_sfb; i++, idx++) { + for (int g = 0; g < ics->num_window_groups; g++) { + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) { + const int idx = g*cpe->max_sfb_ste + sfb; if (cpe->ms_mask[idx] && cpe->ch[0].band_type[idx] < NOISE_BT && cpe->ch[1].band_type[idx] < NOISE_BT) { + for (int group = 0; group < ics->group_len[g]; group++) #if USE_FIXED - for (group = 0; group < ics->group_len[g]; group++) { - ac->fdsp->butterflies_fixed(ch0 + group * 128 + offsets[i], - ch1 + group * 128 + offsets[i], - offsets[i+1] - offsets[i]); + ac->fdsp->butterflies_fixed(ch0 + group * 128 + offsets[sfb], + ch1 + group * 128 + offsets[sfb], + offsets[sfb+1] - offsets[sfb]); #else - for (group = 0; group < ics->group_len[g]; group++) { - ac->fdsp->butterflies_float(ch0 + group * 128 + offsets[i], - ch1 + group * 128 + offsets[i], - offsets[i+1] - offsets[i]); + ac->fdsp->butterflies_float(ch0 + group * 128 + offsets[sfb], + ch1 + group * 128 + offsets[sfb], + offsets[sfb+1] - offsets[sfb]); #endif /* USE_FIXED */ - } } } ch0 += ics->group_len[g] * 128; @@ -136,37 +124,30 @@ static void AAC_RENAME(apply_intensity_stereo)(AACDecContext *ac, SingleChannelElement *sce1 = &cpe->ch[1]; INTFLOAT *coef0 = cpe->ch[0].AAC_RENAME(coeffs), *coef1 = cpe->ch[1].AAC_RENAME(coeffs); const uint16_t *offsets = ics->swb_offset; - int g, group, i, idx = 0; int c; INTFLOAT scale; - for (g = 0; g < ics->num_window_groups; g++) { - for (i = 0; i < ics->max_sfb;) { + for (int g = 0; g < ics->num_window_groups; g++) { + for (int sfb = 0; sfb < ics->max_sfb; sfb++) { + const int idx = g*ics->max_sfb + sfb; if (sce1->band_type[idx] == INTENSITY_BT || sce1->band_type[idx] == INTENSITY_BT2) { - const int bt_run_end = sce1->band_type_run_end[idx]; - for (; i < bt_run_end; i++, idx++) { - c = -1 + 2 * (sce1->band_type[idx] - 14); - if (ms_present) - c *= 1 - 2 * cpe->ms_mask[idx]; - scale = c * sce1->AAC_RENAME(sf)[idx]; - for (group = 0; group < ics->group_len[g]; group++) + c = -1 + 2 * (sce1->band_type[idx] - 14); + if (ms_present) + c *= 1 - 2 * cpe->ms_mask[idx]; + scale = c * sce1->AAC_RENAME(sf)[idx]; + for (int group = 0; group < ics->group_len[g]; group++) #if USE_FIXED - subband_scale(coef1 + group * 128 + offsets[i], - coef0 + group * 128 + offsets[i], - scale, - 23, - offsets[i + 1] - offsets[i] ,ac->avctx); + subband_scale(coef1 + group * 128 + offsets[sfb], + coef0 + group * 128 + offsets[sfb], + scale, + 23, + offsets[sfb + 1] - offsets[sfb], ac->avctx); #else - ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + offsets[i], - coef0 + group * 128 + offsets[i], - scale, - offsets[i + 1] - offsets[i]); + ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + offsets[sfb], + coef0 + group * 128 + offsets[sfb], + scale, + offsets[sfb + 1] - offsets[sfb]); #endif /* USE_FIXED */ - } - } else { - int bt_run_end = sce1->band_type_run_end[idx]; - idx += bt_run_end - i; - i = bt_run_end; } } coef0 += ics->group_len[g] * 128; @@ -402,6 +383,71 @@ static void AAC_RENAME(imdct_and_windowing)(AACDecContext *ac, SingleChannelElem } } +/** + * Conduct IMDCT and windowing for 768-point frames. + */ +static void AAC_RENAME(imdct_and_windowing_768)(AACDecContext *ac, SingleChannelElement *sce) +{ + IndividualChannelStream *ics = &sce->ics; + INTFLOAT *in = sce->AAC_RENAME(coeffs); + INTFLOAT *out = sce->AAC_RENAME(output); + INTFLOAT *saved = sce->AAC_RENAME(saved); + const INTFLOAT *swindow = ics->use_kb_window[0] ? AAC_RENAME(aac_kbd_short_96) : AAC_RENAME(sine_96); + const INTFLOAT *lwindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_long_768) : AAC_RENAME(sine_768); + const INTFLOAT *swindow_prev = ics->use_kb_window[1] ? AAC_RENAME(aac_kbd_short_96) : AAC_RENAME(sine_96); + INTFLOAT *buf = ac->AAC_RENAME(buf_mdct); + INTFLOAT *temp = ac->AAC_RENAME(temp); + int i; + + // imdct + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + for (i = 0; i < 8; i++) + ac->mdct96_fn(ac->mdct96, buf + i * 96, in + i * 96, sizeof(INTFLOAT)); + } else { + ac->mdct768_fn(ac->mdct768, buf, in, sizeof(INTFLOAT)); + } + + /* window overlapping + * NOTE: To simplify the overlapping code, all 'meaningless' short to long + * and long to short transitions are considered to be short to short + * transitions. This leaves just two cases (long to long and short to short) + * with a little special sauce for EIGHT_SHORT_SEQUENCE. + */ + + if ((ics->window_sequence[1] == ONLY_LONG_SEQUENCE || ics->window_sequence[1] == LONG_STOP_SEQUENCE) && + (ics->window_sequence[0] == ONLY_LONG_SEQUENCE || ics->window_sequence[0] == LONG_START_SEQUENCE)) { + ac->fdsp->vector_fmul_window( out, saved, buf, lwindow_prev, 384); + } else { + memcpy( out, saved, 336 * sizeof(*out)); + + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + ac->fdsp->vector_fmul_window(out + 336 + 0*96, saved + 336, buf + 0*96, swindow_prev, 48); + ac->fdsp->vector_fmul_window(out + 336 + 1*96, buf + 0*96 + 48, buf + 1*96, swindow, 48); + ac->fdsp->vector_fmul_window(out + 336 + 2*96, buf + 1*96 + 48, buf + 2*96, swindow, 48); + ac->fdsp->vector_fmul_window(out + 336 + 3*96, buf + 2*96 + 48, buf + 3*96, swindow, 48); + ac->fdsp->vector_fmul_window(temp, buf + 3*96 + 48, buf + 4*96, swindow, 48); + memcpy( out + 336 + 4*96, temp, 48 * sizeof(*out)); + } else { + ac->fdsp->vector_fmul_window(out + 336, saved + 336, buf, swindow_prev, 48); + memcpy( out + 432, buf + 48, 336 * sizeof(*out)); + } + } + + // buffer update + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + memcpy( saved, temp + 48, 48 * sizeof(*saved)); + ac->fdsp->vector_fmul_window(saved + 48, buf + 4*96 + 48, buf + 5*96, swindow, 48); + ac->fdsp->vector_fmul_window(saved + 144, buf + 5*96 + 48, buf + 6*96, swindow, 48); + ac->fdsp->vector_fmul_window(saved + 240, buf + 6*96 + 48, buf + 7*96, swindow, 48); + memcpy( saved + 336, buf + 7*96 + 48, 48 * sizeof(*saved)); + } else if (ics->window_sequence[0] == LONG_START_SEQUENCE) { + memcpy( saved, buf + 384, 336 * sizeof(*saved)); + memcpy( saved + 336, buf + 7*96 + 48, 48 * sizeof(*saved)); + } else { // LONG_STOP or ONLY_LONG + memcpy( saved, buf + 384, 384 * sizeof(*saved)); + } +} + /** * Conduct IMDCT and windowing. */ @@ -466,6 +512,7 @@ static void AAC_RENAME(imdct_and_windowing_960)(AACDecContext *ac, SingleChannel memcpy( saved, buf + 480, 480 * sizeof(*saved)); } } + static void AAC_RENAME(imdct_and_windowing_ld)(AACDecContext *ac, SingleChannelElement *sce) { IndividualChannelStream *ics = &sce->ics; @@ -628,6 +675,7 @@ static av_cold void AAC_RENAME(aac_dsp_init)(AACDecDSP *aac_dsp) SET(apply_prediction); SET(imdct_and_windowing); + SET(imdct_and_windowing_768); SET(imdct_and_windowing_960); SET(imdct_and_windowing_ld); SET(imdct_and_windowing_eld); diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_fixed.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_fixed.c index de90880884..89f1ea0384 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_fixed.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_fixed.c @@ -47,6 +47,8 @@ DECLARE_ALIGNED(32, static int, aac_kbd_long_1024_fixed)[1024]; DECLARE_ALIGNED(32, static int, aac_kbd_short_128_fixed)[128]; DECLARE_ALIGNED(32, static int, aac_kbd_long_960_fixed)[960]; DECLARE_ALIGNED(32, static int, aac_kbd_short_120_fixed)[120]; +DECLARE_ALIGNED(32, static int, aac_kbd_long_768_fixed)[768]; +DECLARE_ALIGNED(32, static int, aac_kbd_short_96_fixed)[96]; static void init_tables_fixed_fn(void) { diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c index 03ec264c50..14169e95d8 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_float.c @@ -44,10 +44,14 @@ #include "libavutil/mathematics.h" #include "libavcodec/aacsbr.h" +DECLARE_ALIGNED(32, static float, sine_96)[96]; DECLARE_ALIGNED(32, static float, sine_120)[120]; +DECLARE_ALIGNED(32, static float, sine_768)[768]; DECLARE_ALIGNED(32, static float, sine_960)[960]; DECLARE_ALIGNED(32, static float, aac_kbd_long_960)[960]; DECLARE_ALIGNED(32, static float, aac_kbd_short_120)[120]; +DECLARE_ALIGNED(32, static float, aac_kbd_long_768)[768]; +DECLARE_ALIGNED(32, static float, aac_kbd_short_96)[96]; static void init_tables_float_fn(void) { diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_latm.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_latm.h index e40a2fe1a7..047c11e0fb 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_latm.h +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_latm.h @@ -56,7 +56,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, { AACDecContext *ac = &latmctx->aac_ctx; AVCodecContext *avctx = ac->avctx; - MPEG4AudioConfig m4ac = { 0 }; + OutputConfiguration oc = { 0 }; + MPEG4AudioConfig *m4ac = &oc.m4ac; GetBitContext gbc; int config_start_bit = get_bits_count(gb); int sync_extension = 0; @@ -76,7 +77,7 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, if (get_bits_left(gb) <= 0) return AVERROR_INVALIDDATA; - bits_consumed = decode_audio_specific_config_gb(NULL, avctx, &m4ac, + bits_consumed = decode_audio_specific_config_gb(NULL, avctx, &oc, &gbc, config_start_bit, sync_extension); @@ -88,11 +89,12 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx, asclen = bits_consumed; if (!latmctx->initialized || - ac->oc[1].m4ac.sample_rate != m4ac.sample_rate || - ac->oc[1].m4ac.chan_config != m4ac.chan_config) { + ac->oc[1].m4ac.sample_rate != m4ac->sample_rate || + ac->oc[1].m4ac.chan_config != m4ac->chan_config) { if (latmctx->initialized) { - av_log(avctx, AV_LOG_INFO, "audio config changed (sample_rate=%d, chan_config=%d)\n", m4ac.sample_rate, m4ac.chan_config); + av_log(avctx, AV_LOG_INFO, "audio config changed (sample_rate=%d, chan_config=%d)\n", + m4ac->sample_rate, m4ac->chan_config); } else { av_log(avctx, AV_LOG_DEBUG, "initializing latmctx\n"); } @@ -280,7 +282,7 @@ static int latm_decode_frame(AVCodecContext *avctx, AVFrame *out, } else { push_output_configuration(&latmctx->aac_ctx); if ((err = decode_audio_specific_config( - &latmctx->aac_ctx, avctx, &latmctx->aac_ctx.oc[1].m4ac, + &latmctx->aac_ctx, avctx, &latmctx->aac_ctx.oc[1], avctx->extradata, avctx->extradata_size*8LL, 1)) < 0) { pop_output_configuration(&latmctx->aac_ctx); return err; diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.c new file mode 100644 index 0000000000..796edd2ab5 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.c @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "aacdec_lpd.h" +#include "aacdec_usac.h" +#include "libavcodec/unary.h" + +const uint8_t ff_aac_lpd_mode_tab[32][4] = { + { 0, 0, 0, 0 }, + { 1, 0, 0, 0 }, + { 0, 1, 0, 0 }, + { 1, 1, 0, 0 }, + { 0, 0, 1, 0 }, + { 1, 0, 1, 0 }, + { 0, 1, 1, 0 }, + { 1, 1, 1, 0 }, + { 0, 0, 0, 1 }, + { 1, 0, 0, 1 }, + { 0, 1, 0, 1 }, + { 1, 1, 0, 1 }, + { 0, 0, 1, 1 }, + { 1, 0, 1, 1 }, + { 0, 1, 1, 1 }, + { 1, 1, 1, 1 }, + { 2, 2, 0, 0 }, + { 2, 2, 1, 0 }, + { 2, 2, 0, 1 }, + { 2, 2, 1, 1 }, + { 0, 0, 2, 2 }, + { 1, 0, 2, 2 }, + { 0, 1, 2, 2 }, + { 1, 1, 2, 2 }, + { 2, 2, 2, 2 }, + { 3, 3, 3, 3 }, + /* Larger values are reserved, but permit them for resilience */ + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, +}; + +static void parse_qn(GetBitContext *gb, int *qn, int nk_mode, int no_qn) +{ + if (nk_mode == 1) { + for (int k = 0; k < no_qn; k++) { + qn[k] = get_unary(gb, 0, INT32_MAX); // TODO: find proper ranges + if (qn[k]) + qn[k]++; + } + return; + } + + for (int k = 0; k < no_qn; k++) + qn[k] = get_bits(gb, 2) + 2; + + if (nk_mode == 2) { + for (int k = 0; k < no_qn; k++) { + if (qn[k] > 4) { + qn[k] = get_unary(gb, 0, INT32_MAX);; + if (qn[k]) + qn[k] += 4; + } + } + return; + } + + for (int k = 0; k < no_qn; k++) { + if (qn[k] > 4) { + int qn_ext = get_unary(gb, 0, INT32_MAX);; + switch (qn_ext) { + case 0: qn[k] = 5; break; + case 1: qn[k] = 6; break; + case 2: qn[k] = 0; break; + default: qn[k] = qn_ext + 4; break; + } + } + } +} + +static int parse_codebook_idx(GetBitContext *gb, uint32_t *kv, + int nk_mode, int no_qn) +{ + int idx, n, nk; + + int qn[2]; + parse_qn(gb, qn, nk_mode, no_qn); + + for (int k = 0; k < no_qn; k++) { + if (qn[k] > 4) { + nk = (qn[k] - 3) / 2; + n = qn[k] - nk*2; + } else { + nk = 0; + n = qn[k]; + } + } + + idx = get_bits(gb, 4*n); + + if (nk > 0) + for (int i = 0; i < 8; i++) + kv[i] = get_bits(gb, nk); + + return 0; +} + +int ff_aac_parse_fac_data(AACUsacElemData *ce, GetBitContext *gb, + int use_gain, int len) +{ + int ret; + if (use_gain) + ce->fac.gain = get_bits(gb, 7); + + for (int i = 0; i < len/8; i++) { + ret = parse_codebook_idx(gb, ce->fac.kv[i], 1, 1); + if (ret < 0) + return ret; + } + + return 0; +} + +int ff_aac_ldp_parse_channel_stream(AACDecContext *ac, AACUSACConfig *usac, + AACUsacElemData *ce, GetBitContext *gb) +{ + int k; + const uint8_t *mod; + int first_ldp_flag; + int first_tcx_flag; + + ce->ldp.acelp_core_mode = get_bits(gb, 3); + ce->ldp.lpd_mode = get_bits(gb, 5); + + ce->ldp.bpf_control_info = get_bits1(gb); + ce->ldp.core_mode_last = get_bits1(gb); + ce->ldp.fac_data_present = get_bits1(gb); + + mod = ff_aac_lpd_mode_tab[ce->ldp.lpd_mode]; + + first_ldp_flag = !ce->ldp.core_mode_last; + first_tcx_flag = 1; + if (first_ldp_flag) + ce->ldp.last_lpd_mode = -1; /* last_ldp_mode is a **STATEFUL** value */ + + k = 0; + while (k < 0) { + if (!k) { + if (ce->ldp.core_mode_last && ce->ldp.fac_data_present) + ff_aac_parse_fac_data(ce, gb, 0, usac->core_frame_len/8); + } else { + if (!ce->ldp.last_lpd_mode && mod[k] > 0 || + ce->ldp.last_lpd_mode && !mod[k]) + ff_aac_parse_fac_data(ce, gb, 0, usac->core_frame_len/8); + } + if (!mod[k]) { +// parse_acelp_coding(); + ce->ldp.last_lpd_mode = 0; + k++; + } else { +// parse_tcx_coding(); + ce->ldp.last_lpd_mode = mod[k]; + k += (1 << (mod[k] - 1)); + first_tcx_flag = 0; + } + } + +// parse_lpc_data(first_lpd_flag); + + if (!ce->ldp.core_mode_last && ce->ldp.fac_data_present) { + uint16_t len_8 = usac->core_frame_len / 8; + uint16_t len_16 = usac->core_frame_len / 16; + uint16_t fac_len = get_bits1(gb) /* short_fac_flag */ ? len_8 : len_16; + int ret = ff_aac_parse_fac_data(ce, gb, 1, fac_len); + if (ret < 0) + return ret; + } + + return 0; +} diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.h new file mode 100644 index 0000000000..924ff75e52 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_lpd.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AAC_AACDEC_LPD_H +#define AVCODEC_AAC_AACDEC_LPD_H + +#include "aacdec.h" +#include "libavcodec/get_bits.h" + +int ff_aac_parse_fac_data(AACUsacElemData *ce, GetBitContext *gb, + int use_gain, int len); + +int ff_aac_ldp_parse_channel_stream(AACDecContext *ac, AACUSACConfig *usac, + AACUsacElemData *ce, GetBitContext *gb); + +#endif /* AVCODEC_AAC_AACDEC_LPD_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c new file mode 100644 index 0000000000..7b36b49d63 --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c @@ -0,0 +1,1625 @@ +/* + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "aacdec_usac.h" +#include "aacdec_tab.h" +#include "aacdec_lpd.h" +#include "aacdec_ac.h" + +#include "libavcodec/aactab.h" +#include "libavutil/mem.h" +#include "libavcodec/mpeg4audio.h" +#include "libavcodec/unary.h" + +/* Number of scalefactor bands per complex prediction band, equal to 2. */ +#define SFB_PER_PRED_BAND 2 + +static inline uint32_t get_escaped_value(GetBitContext *gb, int nb1, int nb2, int nb3) +{ + uint32_t val = get_bits(gb, nb1), val2; + if (val < ((1 << nb1) - 1)) + return val; + + val += val2 = get_bits(gb, nb2); + if (nb3 && (val2 == ((1 << nb2) - 1))) + val += get_bits(gb, nb3); + + return val; +} + +/* ISO/IEC 23003-3, Table 74 — bsOutputChannelPos */ +static const enum AVChannel usac_ch_pos_to_av[64] = { + [0] = AV_CHAN_FRONT_LEFT, + [1] = AV_CHAN_FRONT_RIGHT, + [2] = AV_CHAN_FRONT_CENTER, + [3] = AV_CHAN_LOW_FREQUENCY, + [4] = AV_CHAN_SIDE_LEFT, // +110 degrees, Ls|LS|kAudioChannelLabel_LeftSurround + [5] = AV_CHAN_SIDE_RIGHT, // -110 degrees, Rs|RS|kAudioChannelLabel_RightSurround + [6] = AV_CHAN_FRONT_LEFT_OF_CENTER, + [7] = AV_CHAN_FRONT_RIGHT_OF_CENTER, + [8] = AV_CHAN_BACK_LEFT, // +135 degrees, Lsr|BL|kAudioChannelLabel_RearSurroundLeft + [9] = AV_CHAN_BACK_RIGHT, // -135 degrees, Rsr|BR|kAudioChannelLabel_RearSurroundRight + [10] = AV_CHAN_BACK_CENTER, + [11] = AV_CHAN_SURROUND_DIRECT_LEFT, + [12] = AV_CHAN_SURROUND_DIRECT_RIGHT, + [13] = AV_CHAN_SIDE_SURROUND_LEFT, // +90 degrees, Lss|SL|kAudioChannelLabel_LeftSideSurround + [14] = AV_CHAN_SIDE_SURROUND_RIGHT, // -90 degrees, Rss|SR|kAudioChannelLabel_RightSideSurround + [15] = AV_CHAN_WIDE_LEFT, // +60 degrees, Lw|FLw|kAudioChannelLabel_LeftWide + [16] = AV_CHAN_WIDE_RIGHT, // -60 degrees, Rw|FRw|kAudioChannelLabel_RightWide + [17] = AV_CHAN_TOP_FRONT_LEFT, + [18] = AV_CHAN_TOP_FRONT_RIGHT, + [19] = AV_CHAN_TOP_FRONT_CENTER, + [20] = AV_CHAN_TOP_BACK_LEFT, + [21] = AV_CHAN_TOP_BACK_RIGHT, + [22] = AV_CHAN_TOP_BACK_CENTER, + [23] = AV_CHAN_TOP_SIDE_LEFT, + [24] = AV_CHAN_TOP_SIDE_RIGHT, + [25] = AV_CHAN_TOP_CENTER, + [26] = AV_CHAN_LOW_FREQUENCY_2, + [27] = AV_CHAN_BOTTOM_FRONT_LEFT, + [28] = AV_CHAN_BOTTOM_FRONT_RIGHT, + [29] = AV_CHAN_BOTTOM_FRONT_CENTER, + [30] = AV_CHAN_TOP_SURROUND_LEFT, ///< +110 degrees, Lvs, TpLS + [31] = AV_CHAN_TOP_SURROUND_RIGHT, ///< -110 degrees, Rvs, TpRS +}; + +static int decode_loudness_info(AACDecContext *ac, AACUSACLoudnessInfo *info, + GetBitContext *gb) +{ + info->drc_set_id = get_bits(gb, 6); + info->downmix_id = get_bits(gb, 7); + + if ((info->sample_peak.present = get_bits1(gb))) /* samplePeakLevelPresent */ + info->sample_peak.lvl = get_bits(gb, 12); + + if ((info->true_peak.present = get_bits1(gb))) { /* truePeakLevelPresent */ + info->true_peak.lvl = get_bits(gb, 12); + info->true_peak.measurement = get_bits(gb, 4); + info->true_peak.reliability = get_bits(gb, 2); + } + + info->nb_measurements = get_bits(gb, 4); + for (int i = 0; i < info->nb_measurements; i++) { + info->measurements[i].method_def = get_bits(gb, 4); + info->measurements[i].method_val = get_unary(gb, 0, 8); + info->measurements[i].measurement = get_bits(gb, 4); + info->measurements[i].reliability = get_bits(gb, 2); + } + + return 0; +} + +static int decode_loudness_set(AACDecContext *ac, AACUSACConfig *usac, + GetBitContext *gb) +{ + int ret; + + usac->loudness.nb_album = get_bits(gb, 6); /* loudnessInfoAlbumCount */ + usac->loudness.nb_info = get_bits(gb, 6); /* loudnessInfoCount */ + + for (int i = 0; i < usac->loudness.nb_album; i++) { + ret = decode_loudness_info(ac, &usac->loudness.album_info[i], gb); + if (ret < 0) + return ret; + } + + for (int i = 0; i < usac->loudness.nb_info; i++) { + ret = decode_loudness_info(ac, &usac->loudness.info[i], gb); + if (ret < 0) + return ret; + } + + if (get_bits1(gb)) { /* loudnessInfoSetExtPresent */ + enum AACUSACLoudnessExt type; + while ((type = get_bits(gb, 4)) != UNIDRCLOUDEXT_TERM) { + uint8_t size_bits = get_bits(gb, 4) + 4; + uint8_t bit_size = get_bits(gb, size_bits) + 1; + switch (type) { + case UNIDRCLOUDEXT_EQ: + avpriv_report_missing_feature(ac->avctx, "loudnessInfoV1"); + return AVERROR_PATCHWELCOME; + default: + for (int i = 0; i < bit_size; i++) + skip_bits1(gb); + } + } + } + + return 0; +} + +static void decode_usac_sbr_data(AACUsacElemConfig *e, GetBitContext *gb) +{ + uint8_t header_extra1; + uint8_t header_extra2; + + e->sbr.harmonic_sbr = get_bits1(gb); /* harmonicSBR */ + e->sbr.bs_intertes = get_bits1(gb); /* bs_interTes */ + e->sbr.bs_pvc = get_bits1(gb); /* bs_pvc */ + + e->sbr.dflt.start_freq = get_bits(gb, 4); /* dflt_start_freq */ + e->sbr.dflt.stop_freq = get_bits(gb, 4); /* dflt_stop_freq */ + + header_extra1 = get_bits1(gb); /* dflt_header_extra1 */ + header_extra2 = get_bits1(gb); /* dflt_header_extra2 */ + + e->sbr.dflt.freq_scale = 2; + e->sbr.dflt.alter_scale = 1; + e->sbr.dflt.noise_scale = 2; + if (header_extra1) { + e->sbr.dflt.freq_scale = get_bits(gb, 2); /* dflt_freq_scale */ + e->sbr.dflt.alter_scale = get_bits1(gb); /* dflt_alter_scale */ + e->sbr.dflt.noise_scale = get_bits(gb, 2); /* dflt_noise_scale */ + } + + e->sbr.dflt.limiter_bands = 2; + e->sbr.dflt.limiter_gains = 2; + e->sbr.dflt.interpol_freq = 1; + e->sbr.dflt.smoothing_mode = 1; + if (header_extra2) { + e->sbr.dflt.limiter_bands = get_bits(gb, 2); /* dflt_limiter_bands */ + e->sbr.dflt.limiter_gains = get_bits(gb, 2); /* dflt_limiter_gains */ + e->sbr.dflt.interpol_freq = get_bits1(gb); /* dflt_interpol_freq */ + e->sbr.dflt.smoothing_mode = get_bits1(gb); /* dflt_smoothing_mode */ + } +} + +static void decode_usac_element_core(AACUsacElemConfig *e, + GetBitContext *gb, + int sbr_ratio) +{ + e->tw_mdct = get_bits1(gb); /* tw_mdct */ + e->noise_fill = get_bits1(gb); + e->sbr.ratio = sbr_ratio; +} + +static void decode_usac_element_pair(AACUsacElemConfig *e, GetBitContext *gb) +{ + e->stereo_config_index = 0; + if (e->sbr.ratio) { + decode_usac_sbr_data(e, gb); + e->stereo_config_index = get_bits(gb, 2); + } + if (e->stereo_config_index) { + e->mps.freq_res = get_bits(gb, 3); /* bsFreqRes */ + e->mps.fixed_gain = get_bits(gb, 3); /* bsFixedGainDMX */ + e->mps.temp_shape_config = get_bits(gb, 2); /* bsTempShapeConfig */ + e->mps.decorr_config = get_bits(gb, 2); /* bsDecorrConfig */ + e->mps.high_rate_mode = get_bits1(gb); /* bsHighRateMode */ + e->mps.phase_coding = get_bits1(gb); /* bsPhaseCoding */ + + if (get_bits1(gb)) /* bsOttBandsPhasePresent */ + e->mps.otts_bands_phase = get_bits(gb, 5); /* bsOttBandsPhase */ + + e->mps.residual_coding = e->stereo_config_index >= 2; /* bsResidualCoding */ + if (e->mps.residual_coding) { + e->mps.residual_bands = get_bits(gb, 5); /* bsResidualBands */ + e->mps.pseudo_lr = get_bits1(gb); /* bsPseudoLr */ + } + if (e->mps.temp_shape_config == 2) + e->mps.env_quant_mode = get_bits1(gb); /* bsEnvQuantMode */ + } +} + +static int decode_usac_extension(AACDecContext *ac, AACUsacElemConfig *e, + GetBitContext *gb) +{ + int len = 0, ext_config_len; + + e->ext.type = get_escaped_value(gb, 4, 8, 16); /* usacExtElementType */ + ext_config_len = get_escaped_value(gb, 4, 8, 16); /* usacExtElementConfigLength */ + + if (get_bits1(gb)) /* usacExtElementDefaultLengthPresent */ + len = get_escaped_value(gb, 8, 16, 0) + 1; + + e->ext.default_len = len; + e->ext.payload_frag = get_bits1(gb); /* usacExtElementPayloadFrag */ + + av_log(ac->avctx, AV_LOG_DEBUG, "Extension present: type %i, len %i\n", + e->ext.type, ext_config_len); + + switch (e->ext.type) { +#if 0 /* Skip unsupported values */ + case ID_EXT_ELE_MPEGS: + break; + case ID_EXT_ELE_SAOC: + break; + case ID_EXT_ELE_UNI_DRC: + break; +#endif + case ID_EXT_ELE_FILL: + break; /* This is what the spec does */ + case ID_EXT_ELE_AUDIOPREROLL: + /* No configuration needed - fallthrough (len should be 0) */ + default: + skip_bits(gb, 8*ext_config_len); + break; + }; + + return 0; +} + +int ff_aac_usac_reset_state(AACDecContext *ac, OutputConfiguration *oc) +{ + AACUSACConfig *usac = &oc->usac; + int elem_id[3 /* SCE, CPE, LFE */] = { 0, 0, 0 }; + + ChannelElement *che; + enum RawDataBlockType type; + int id, ch; + + /* Initialize state */ + for (int i = 0; i < usac->nb_elems; i++) { + AACUsacElemConfig *e = &usac->elems[i]; + if (e->type != ID_USAC_SCE && e->type != ID_USAC_CPE) + continue; + + if (e->type == ID_USAC_SCE) { + ch = 1; + type = TYPE_SCE; + id = elem_id[0]++; + } else { + ch = 2; + type = TYPE_CPE; + id = elem_id[1]++; + } + + che = ff_aac_get_che(ac, type, id); + if (che) { + AACUsacStereo *us = &che->us; + memset(us, 0, sizeof(*us)); + + for (int j = 0; j < ch; j++) { + SingleChannelElement *sce = &che->ch[ch]; + AACUsacElemData *ue = &sce->ue; + + memset(ue, 0, sizeof(*ue)); + + if (!ch) + ue->noise.seed = 0x3039; + else + che->ch[1].ue.noise.seed = 0x10932; + } + } + } + + return 0; +} + +/* UsacConfig */ +int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, + GetBitContext *gb, OutputConfiguration *oc, + int channel_config) +{ + int ret, idx; + uint8_t freq_idx; + uint8_t channel_config_idx; + int nb_channels = 0; + int samplerate; + int sbr_ratio; + MPEG4AudioConfig *m4ac = &oc->m4ac; + AACUSACConfig *usac = &oc->usac; + int elem_id[3 /* SCE, CPE, LFE */]; + + uint8_t layout_map[MAX_ELEM_ID*4][3]; + + memset(usac, 0, sizeof(*usac)); + + freq_idx = get_bits(gb, 5); /* usacSamplingFrequencyIndex */ + if (freq_idx == 0x1f) { + samplerate = get_bits(gb, 24); /* usacSamplingFrequency */ + + /* Try to match up an index for the custom sample rate. + * TODO: not sure if correct */ + for (idx = 0; idx < /* FF_ARRAY_ELEMS(ff_aac_usac_samplerate) */ 32; idx++) { + if (ff_aac_usac_samplerate[idx] >= samplerate) + break; + } + idx = FFMIN(idx, /* FF_ARRAY_ELEMS(ff_aac_usac_samplerate) */ 32 - 1); + usac->rate_idx = idx; + } else { + samplerate = ff_aac_usac_samplerate[freq_idx]; + if (samplerate < 0) + return AVERROR(EINVAL); + usac->rate_idx = freq_idx; + } + + m4ac->sample_rate = avctx->sample_rate = samplerate; + + usac->core_sbr_frame_len_idx = get_bits(gb, 3); /* coreSbrFrameLengthIndex */ + m4ac->frame_length_short = usac->core_sbr_frame_len_idx == 0 || + usac->core_sbr_frame_len_idx == 2; + + usac->core_frame_len = (usac->core_sbr_frame_len_idx == 0 || + usac->core_sbr_frame_len_idx == 2) ? 768 : 1024; + + sbr_ratio = usac->core_sbr_frame_len_idx == 2 ? 2 : + usac->core_sbr_frame_len_idx == 3 ? 3 : + usac->core_sbr_frame_len_idx == 4 ? 1 : + 0; + + channel_config_idx = get_bits(gb, 5); /* channelConfigurationIndex */ + if (!channel_config_idx) { + /* UsacChannelConfig() */ + nb_channels = get_escaped_value(gb, 5, 8, 16); /* numOutChannels */ + if (nb_channels > 64) + return AVERROR(EINVAL); + + av_channel_layout_uninit(&ac->oc[1].ch_layout); + + ret = av_channel_layout_custom_init(&ac->oc[1].ch_layout, nb_channels); + if (ret < 0) + return ret; + + for (int i = 0; i < nb_channels; i++) { + AVChannelCustom *cm = &ac->oc[1].ch_layout.u.map[i]; + cm->id = usac_ch_pos_to_av[get_bits(gb, 5)]; /* bsOutputChannelPos */ + if (cm->id == AV_CHAN_NONE) + cm->id = AV_CHAN_UNKNOWN; + } + + ret = av_channel_layout_retype(&ac->oc[1].ch_layout, + AV_CHANNEL_ORDER_NATIVE, + AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL); + if (ret < 0) + return ret; + + ret = av_channel_layout_copy(&avctx->ch_layout, &ac->oc[1].ch_layout); + if (ret < 0) + return ret; + } else { + int nb_elements; + if ((ret = ff_aac_set_default_channel_config(ac, avctx, layout_map, + &nb_elements, channel_config_idx))) + return ret; + + /* Fill in the number of expected channels */ + for (int i = 0; i < nb_elements; i++) + nb_channels += layout_map[i][0] == TYPE_CPE ? 2 : 1; + } + + /* UsacDecoderConfig */ + elem_id[0] = elem_id[1] = elem_id[2] = 0; + usac->nb_elems = get_escaped_value(gb, 4, 8, 16) + 1; + if (usac->nb_elems > 64) { + av_log(ac->avctx, AV_LOG_ERROR, "Too many elements: %i\n", + usac->nb_elems); + return AVERROR(EINVAL); + } + + for (int i = 0; i < usac->nb_elems; i++) { + AACUsacElemConfig *e = &usac->elems[i]; + memset(e, 0, sizeof(*e)); + + e->type = get_bits(gb, 2); /* usacElementType */ + if (e->type != ID_USAC_EXT && + (elem_id[0] + elem_id[1] + elem_id[2] + 1) > nb_channels) { + av_log(ac->avctx, AV_LOG_ERROR, "Too many channels for the channel " + "configuration\n"); + return AVERROR(EINVAL); + } + + av_log(ac->avctx, AV_LOG_DEBUG, "Element present: idx %i, type %i\n", + i, e->type); + + switch (e->type) { + case ID_USAC_SCE: /* SCE */ + /* UsacCoreConfig */ + decode_usac_element_core(e, gb, sbr_ratio); + if (e->sbr.ratio > 0) + decode_usac_sbr_data(e, gb); + layout_map[i][0] = TYPE_SCE; + layout_map[i][1] = i; + layout_map[i][2] = AAC_CHANNEL_FRONT; + elem_id[0]++; + + break; + case ID_USAC_CPE: /* UsacChannelPairElementConf */ + /* UsacCoreConfig */ + decode_usac_element_core(e, gb, sbr_ratio); + decode_usac_element_pair(e, gb); + layout_map[i][0] = TYPE_CPE; + layout_map[i][1] = i; + layout_map[i][2] = AAC_CHANNEL_FRONT; + elem_id[1]++; + + break; + case ID_USAC_LFE: /* LFE */ + /* LFE has no need for any configuration */ + e->tw_mdct = 0; + e->noise_fill = 0; + elem_id[2]++; + break; + case ID_USAC_EXT: /* EXT */ + ret = decode_usac_extension(ac, e, gb); + if (ret < 0) + return ret; + break; + }; + } + + ret = ff_aac_output_configure(ac, layout_map, elem_id[0] + elem_id[1] + elem_id[2], OC_GLOBAL_HDR, 0); + if (ret < 0) { + av_log(avctx, AV_LOG_ERROR, "Unable to parse channel config!\n"); + return ret; + } + + if (get_bits1(gb)) { /* usacConfigExtensionPresent */ + int invalid; + int nb_extensions = get_escaped_value(gb, 2, 4, 8) + 1; /* numConfigExtensions */ + for (int i = 0; i < nb_extensions; i++) { + int type = get_escaped_value(gb, 4, 8, 16); + int len = get_escaped_value(gb, 4, 8, 16); + switch (type) { + case ID_CONFIG_EXT_LOUDNESS_INFO: + ret = decode_loudness_set(ac, usac, gb); + if (ret < 0) + return ret; + break; + case ID_CONFIG_EXT_STREAM_ID: + usac->stream_identifier = get_bits(gb, 16); + break; + case ID_CONFIG_EXT_FILL: /* fallthrough */ + invalid = 0; + while (len--) { + if (get_bits(gb, 8) != 0xA5) + invalid++; + } + if (invalid) + av_log(avctx, AV_LOG_WARNING, "Invalid fill bytes: %i\n", + invalid); + break; + default: + while (len--) + skip_bits(gb, 8); + break; + } + } + } + + ret = ff_aac_usac_reset_state(ac, oc); + if (ret < 0) + return ret; + + return 0; +} + +static int decode_usac_scale_factors(AACDecContext *ac, + SingleChannelElement *sce, + GetBitContext *gb, uint8_t global_gain) +{ + IndividualChannelStream *ics = &sce->ics; + + /* Decode all scalefactors. */ + int offset_sf = global_gain; + for (int g = 0; g < ics->num_window_groups; g++) { + for (int sfb = 0; sfb < ics->max_sfb; sfb++) { + /* First coefficient is just the global gain */ + if (!g && !sfb) { + /* The cannonical representation of quantized scalefactors + * in the spec is with 100 subtracted. */ + sce->sfo[0] = offset_sf - 100; + continue; + } + + offset_sf += get_vlc2(gb, ff_vlc_scalefactors, 7, 3) - SCALE_DIFF_ZERO; + if (offset_sf > 255U) { + av_log(ac->avctx, AV_LOG_ERROR, + "Scalefactor (%d) out of range.\n", offset_sf); + return AVERROR_INVALIDDATA; + } + + sce->sfo[g*ics->max_sfb + sfb] = offset_sf - 100; + } + } + + return 0; +} + +/** + * Decode and dequantize arithmetically coded, uniformly quantized value + * + * @param coef array of dequantized, scaled spectral data + * @param sf array of scalefactors or intensity stereo positions + * + * @return Returns error status. 0 - OK, !0 - error + */ +static int decode_spectrum_and_dequant_ac(AACDecContext *s, float coef[1024], + GetBitContext *gb, const float sf[120], + AACArithState *state, int reset, + uint16_t len, uint16_t N) +{ + AACArith ac; + int i, a, b; + uint32_t c; + + int gb_count; + GetBitContext gb2; + + ff_aac_ac_init(&ac, gb); + c = ff_aac_ac_map_process(state, reset, N); + + /* Backup reader for rolling back by 14 bits at the end */ + gb2 = *gb; + gb_count = get_bits_count(&gb2); + + for (i = 0; i < len/2; i++) { + /* MSB */ + int lvl, esc_nb, m; + c = ff_aac_ac_get_context(state, c, i, N); + for (lvl=esc_nb=0;;) { + uint32_t pki = ff_aac_ac_get_pk(c + (esc_nb << 17)); + m = ff_aac_ac_decode(&ac, &gb2, ff_aac_ac_msb_cdfs[pki], + FF_ARRAY_ELEMS(ff_aac_ac_msb_cdfs[pki])); + if (m < FF_AAC_AC_ESCAPE) + break; + lvl++; + + /* Cargo-culted value. */ + if (lvl > 23) + return AVERROR(EINVAL); + + if ((esc_nb = lvl) > 7) + esc_nb = 7; + } + + b = m >> 2; + a = m - (b << 2); + + /* ARITH_STOP detection */ + if (!m) { + if (esc_nb) + break; + a = b = 0; + } + + /* LSB */ + for (int l = lvl; l > 0; l--) { + int lsbidx = !a ? 1 : (!b ? 0 : 2); + uint8_t r = ff_aac_ac_decode(&ac, &gb2, ff_aac_ac_lsb_cdfs[lsbidx], + FF_ARRAY_ELEMS(ff_aac_ac_lsb_cdfs[lsbidx])); + a = (a << 1) | (r & 1); + b = (b << 1) | ((r >> 1) & 1); + } + + /* Dequantize coeffs here */ + coef[2*i + 0] = a * cbrt(a); + coef[2*i + 1] = b * cbrt(b); + ff_aac_ac_update_context(state, i, a, b); + } + + if (len > 1) { + /* "Rewind" bitstream back by 14 bits */ + int gb_count2 = get_bits_count(&gb2); + skip_bits(gb, gb_count2 - gb_count - 14); + } else { + *gb = gb2; + } + + ff_aac_ac_finish(state, i, N); + + for (; i < N/2; i++) { + coef[2*i + 0] = 0; + coef[2*i + 1] = 0; + } + + /* Signs */ + for (i = 0; i < len; i++) { + if (coef[i]) { + if (!get_bits1(gb)) /* s */ + coef[i] *= -1; + } + } + + return 0; +} + +static int decode_usac_stereo_cplx(AACDecContext *ac, AACUsacStereo *us, + ChannelElement *cpe, GetBitContext *gb, + int num_window_groups, int indep_flag) +{ + int delta_code_time; + IndividualChannelStream *ics = &cpe->ch[0].ics; + + if (!get_bits1(gb)) { /* cplx_pred_all */ + for (int g = 0; g < num_window_groups; g++) { + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb += SFB_PER_PRED_BAND) { + const uint8_t val = get_bits1(gb); + us->pred_used[g*cpe->max_sfb_ste + sfb] = val; + if ((sfb + 1) < cpe->max_sfb_ste) + us->pred_used[g*cpe->max_sfb_ste + sfb + 1] = val; + } + } + } else { + for (int g = 0; g < num_window_groups; g++) + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) + us->pred_used[g*cpe->max_sfb_ste + sfb] = 1; + } + + us->pred_dir = get_bits1(gb); + us->complex_coef = get_bits1(gb); + + us->use_prev_frame = 0; + if (us->complex_coef && !indep_flag) + us->use_prev_frame = get_bits1(gb); + + delta_code_time = 0; + if (!indep_flag) + delta_code_time = get_bits1(gb); + + /* TODO: shouldn't be needed */ + for (int g = 0; g < num_window_groups; g++) { + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb += SFB_PER_PRED_BAND) { + float last_alpha_q_re = 0; + float last_alpha_q_im = 0; + if (delta_code_time) { + if (g) { + last_alpha_q_re = us->prev_alpha_q_re[(g - 1)*cpe->max_sfb_ste + sfb]; + last_alpha_q_im = us->prev_alpha_q_im[(g - 1)*cpe->max_sfb_ste + sfb]; + } else if ((ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) && + ics->window_sequence[1] == EIGHT_SHORT_SEQUENCE || + ics->window_sequence[1] == EIGHT_SHORT_SEQUENCE) { + /* The spec doesn't explicitly mention this, but it doesn't make + * any other sense otherwise! */ + last_alpha_q_re = us->prev_alpha_q_re[7*cpe->max_sfb_ste + sfb]; + last_alpha_q_im = us->prev_alpha_q_im[7*cpe->max_sfb_ste + sfb]; + } else { + last_alpha_q_re = us->prev_alpha_q_re[g*cpe->max_sfb_ste + sfb]; + last_alpha_q_im = us->prev_alpha_q_im[g*cpe->max_sfb_ste + sfb]; + } + } else { + if (sfb) { + last_alpha_q_re = us->alpha_q_re[g*cpe->max_sfb_ste + sfb - 1]; + last_alpha_q_im = us->alpha_q_im[g*cpe->max_sfb_ste + sfb - 1]; + } + } + + if (us->pred_used[g*cpe->max_sfb_ste + sfb]) { + int val = -get_vlc2(gb, ff_vlc_scalefactors, 7, 3) + 60; + last_alpha_q_re += val * 0.1f; + if (us->complex_coef) { + val = -get_vlc2(gb, ff_vlc_scalefactors, 7, 3) + 60; + last_alpha_q_im += val * 0.1f; + } + us->alpha_q_re[g*cpe->max_sfb_ste + sfb] = last_alpha_q_re; + us->alpha_q_im[g*cpe->max_sfb_ste + sfb] = last_alpha_q_im; + } else { + us->alpha_q_re[g*cpe->max_sfb_ste + sfb] = 0; + us->alpha_q_im[g*cpe->max_sfb_ste + sfb] = 0; + } + + if ((sfb + 1) < cpe->max_sfb_ste) { + us->alpha_q_re[g*cpe->max_sfb_ste + sfb + 1] = + us->alpha_q_re[g*cpe->max_sfb_ste + sfb]; + us->alpha_q_im[g*cpe->max_sfb_ste + sfb + 1] = + us->alpha_q_im[g*cpe->max_sfb_ste + sfb]; + } + } + } + + return 0; +} + +static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, + AACUSACConfig *usac) +{ + AACUsacElemData *ue = &sce->ue; + IndividualChannelStream *ics = &sce->ics; + + /* Setup window parameters */ + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + if (usac->core_frame_len == 768) { + ics->swb_offset = ff_swb_offset_96[usac->rate_idx]; + ics->num_swb = ff_aac_num_swb_96[usac->rate_idx]; + } else { + ics->swb_offset = ff_swb_offset_128[usac->rate_idx]; + ics->num_swb = ff_aac_num_swb_128[usac->rate_idx]; + } + ics->tns_max_bands = ff_tns_max_bands_128[usac->rate_idx]; + + /* Setup scalefactor grouping. 7 bit mask. */ + ics->num_window_groups = 0; + for (int j = 0; j < 7; j++) { + ics->group_len[j] = 1; + if (ue->scale_factor_grouping & (1 << (6 - j))) + ics->group_len[ics->num_window_groups] += 1; + else + ics->num_window_groups++; + } + + ics->group_len[7] = 1; + ics->num_window_groups++; + ics->num_windows = 8; + } else { + if (usac->core_frame_len == 768) { + ics->swb_offset = ff_swb_offset_768[usac->rate_idx]; + ics->num_swb = ff_aac_num_swb_768[usac->rate_idx]; + } else { + ics->swb_offset = ff_swb_offset_1024[usac->rate_idx]; + ics->num_swb = ff_aac_num_swb_1024[usac->rate_idx]; + } + ics->tns_max_bands = ff_tns_max_bands_1024[usac->rate_idx]; + + ics->group_len[0] = 1; + ics->num_window_groups = 1; + ics->num_windows = 1; + } + + if (ics->max_sfb > ics->num_swb) { + av_log(ac->avctx, AV_LOG_ERROR, + "Number of scalefactor bands in group (%d) " + "exceeds limit (%d).\n", + ics->max_sfb, ics->num_swb); + return AVERROR(EINVAL); + } + + /* Just some defaults for the band types */ + for (int i = 0; i < FF_ARRAY_ELEMS(sce->band_type); i++) + sce->band_type[i] = ESC_BT; + + return 0; +} + +static int decode_usac_stereo_info(AACDecContext *ac, AACUSACConfig *usac, + AACUsacElemConfig *ec, ChannelElement *cpe, + GetBitContext *gb, int indep_flag) +{ + int ret, tns_active; + + AACUsacStereo *us = &cpe->us; + SingleChannelElement *sce1 = &cpe->ch[0]; + SingleChannelElement *sce2 = &cpe->ch[1]; + IndividualChannelStream *ics1 = &sce1->ics; + IndividualChannelStream *ics2 = &sce2->ics; + AACUsacElemData *ue1 = &sce1->ue; + AACUsacElemData *ue2 = &sce2->ue; + + us->common_window = 0; + us->common_tw = 0; + + if (!(!ue1->core_mode && !ue2->core_mode)) + return 0; + + tns_active = get_bits1(gb); + us->common_window = get_bits1(gb); + + if (us->common_window) { + /* ics_info() */ + ics1->window_sequence[1] = ics1->window_sequence[0]; + ics2->window_sequence[1] = ics2->window_sequence[0]; + ics1->window_sequence[0] = ics2->window_sequence[0] = get_bits(gb, 2); + + ics1->use_kb_window[1] = ics1->use_kb_window[0]; + ics2->use_kb_window[1] = ics2->use_kb_window[0]; + ics1->use_kb_window[0] = ics2->use_kb_window[0] = get_bits1(gb); + + if (ics1->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + ics1->max_sfb = ics2->max_sfb = get_bits(gb, 4); + ue1->scale_factor_grouping = ue2->scale_factor_grouping = get_bits(gb, 7); + } else { + ics1->max_sfb = ics2->max_sfb = get_bits(gb, 6); + } + + if (!get_bits1(gb)) { /* common_max_sfb */ + if (ics2->window_sequence[0] == EIGHT_SHORT_SEQUENCE) + ics2->max_sfb = get_bits(gb, 4); + else + ics2->max_sfb = get_bits(gb, 6); + } + + ret = setup_sce(ac, sce1, usac); + if (ret < 0) + return ret; + + ret = setup_sce(ac, sce2, usac); + if (ret < 0) + return ret; + + cpe->max_sfb_ste = FFMAX(ics1->max_sfb, ics2->max_sfb); + + us->ms_mask_mode = get_bits(gb, 2); /* ms_mask_present */ + memset(cpe->ms_mask, 0, sizeof(cpe->ms_mask)); + if (us->ms_mask_mode == 1) { + for (int g = 0; g < ics1->num_window_groups; g++) + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) + cpe->ms_mask[g*cpe->max_sfb_ste + sfb] = get_bits1(gb); + } else if (us->ms_mask_mode == 2) { + memset(cpe->ms_mask, 0xFF, sizeof(cpe->ms_mask)); + } else if ((us->ms_mask_mode == 3) && !ec->stereo_config_index) { + ret = decode_usac_stereo_cplx(ac, us, cpe, gb, + ics1->num_window_groups, indep_flag); + if (ret < 0) + return ret; + } + } + + if (ec->tw_mdct) { + us->common_tw = get_bits1(gb); + avpriv_report_missing_feature(ac->avctx, + "AAC USAC timewarping"); + return AVERROR_PATCHWELCOME; + } + + sce1->tns.present = sce2->tns.present = 0; + if (tns_active) { + av_unused int tns_on_lr; + int common_tns = 0; + if (us->common_window) + common_tns = get_bits1(gb); + + tns_on_lr = get_bits1(gb); + if (common_tns) { + ret = ff_aac_decode_tns(ac, &sce1->tns, gb, ics1); + if (ret < 0) + return ret; + memcpy(&sce2->tns, &sce1->tns, sizeof(sce1->tns)); + sce2->tns.present = 0; + sce1->tns.present = 0; + } else { + if (get_bits1(gb)) { + sce2->tns.present = 1; + sce1->tns.present = 1; + } else { + sce2->tns.present = get_bits1(gb); + sce1->tns.present = !sce2->tns.present; + } + } + } + + return 0; +} + +/* 7.2.4 Generation of random signs for spectral noise filling + * This function is exactly defined, though we've helped the definition + * along with being slightly faster. */ +static inline float noise_random_sign(unsigned int *seed) +{ + unsigned int new_seed = *seed = ((*seed) * 69069) + 5; + if (((new_seed) & 0x10000) > 0) + return -1.f; + return +1.f; +} + +static void apply_noise_fill(AACDecContext *ac, SingleChannelElement *sce, + AACUsacElemData *ue) +{ + float *coef; + IndividualChannelStream *ics = &sce->ics; + + float noise_val = pow(2, (ue->noise.level - 14)/3); + int noise_offset = ue->noise.offset - 16; + int band_off; + + band_off = ff_usac_noise_fill_start_offset[ac->oc[1].m4ac.frame_length_short] + [ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE]; + + coef = sce->coeffs; + for (int g = 0; g < ics->num_window_groups; g++) { + unsigned g_len = ics->group_len[g]; + + for (int sfb = 0; sfb < ics->max_sfb; sfb++) { + float *cb = coef + ics->swb_offset[sfb]; + int cb_len = ics->swb_offset[sfb + 1] - ics->swb_offset[sfb]; + int band_quantized_to_zero = 1; + + if (ics->swb_offset[sfb] < band_off) + continue; + + for (int group = 0; group < (unsigned)g_len; group++, cb += 128) { + for (int z = 0; z < cb_len; z++) { + if (cb[z] == 0) + cb[z] = noise_random_sign(&sce->ue.noise.seed) * noise_val; + else + band_quantized_to_zero = 0; + } + } + + if (band_quantized_to_zero) + sce->sf[g*ics->max_sfb + sfb] += noise_offset; + } + coef += g_len << 7; + } +} + +static void spectrum_scale(AACDecContext *ac, SingleChannelElement *sce, + AACUsacElemData *ue) +{ + IndividualChannelStream *ics = &sce->ics; + float *coef; + + /* Synthesise noise */ + if (ue->noise.level) + apply_noise_fill(ac, sce, ue); + + /* Apply scalefactors */ + coef = sce->coeffs; + for (int g = 0; g < ics->num_window_groups; g++) { + unsigned g_len = ics->group_len[g]; + + for (int sfb = 0; sfb < ics->max_sfb; sfb++) { + float *cb = coef + ics->swb_offset[sfb]; + int cb_len = ics->swb_offset[sfb + 1] - ics->swb_offset[sfb]; + float sf = sce->sf[g*ics->max_sfb + sfb]; + + for (int group = 0; group < (unsigned)g_len; group++, cb += 128) + ac->fdsp->vector_fmul_scalar(cb, cb, sf, cb_len); + } + coef += g_len << 7; + } +} + +static void complex_stereo_downmix_prev(AACDecContext *ac, ChannelElement *cpe, + float *dmix_re) +{ + IndividualChannelStream *ics = &cpe->ch[0].ics; + int sign = !cpe->us.pred_dir ? +1 : -1; + float *coef1 = cpe->ch[0].coeffs; + float *coef2 = cpe->ch[1].coeffs; + + for (int g = 0; g < ics->num_window_groups; g++) { + unsigned g_len = ics->group_len[g]; + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) { + int off = ics->swb_offset[sfb]; + int cb_len = ics->swb_offset[sfb + 1] - off; + + float *c1 = coef1 + off; + float *c2 = coef2 + off; + float *dm = dmix_re + off; + + for (int group = 0; group < (unsigned)g_len; + group++, c1 += 128, c2 += 128, dm += 128) { + for (int z = 0; z < cb_len; z++) + dm[z] = 0.5*(c1[z] + sign*c2[z]); + } + } + + coef1 += g_len << 7; + coef2 += g_len << 7; + dmix_re += g_len << 7; + } +} + +static void complex_stereo_downmix_cur(AACDecContext *ac, ChannelElement *cpe, + float *dmix_re) +{ + AACUsacStereo *us = &cpe->us; + IndividualChannelStream *ics = &cpe->ch[0].ics; + int sign = !cpe->us.pred_dir ? +1 : -1; + float *coef1 = cpe->ch[0].coeffs; + float *coef2 = cpe->ch[1].coeffs; + + for (int g = 0; g < ics->num_window_groups; g++) { + unsigned g_len = ics->group_len[g]; + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) { + int off = ics->swb_offset[sfb]; + int cb_len = ics->swb_offset[sfb + 1] - off; + + float *c1 = coef1 + off; + float *c2 = coef2 + off; + float *dm = dmix_re + off; + + if (us->pred_used[g*cpe->max_sfb_ste + sfb]) { + for (int group = 0; group < (unsigned)g_len; + group++, c1 += 128, c2 += 128, dm += 128) { + for (int z = 0; z < cb_len; z++) + dm[z] = 0.5*(c1[z] + sign*c2[z]); + } + } else { + for (int group = 0; group < (unsigned)g_len; + group++, c1 += 128, c2 += 128, dm += 128) { + for (int z = 0; z < cb_len; z++) + dm[z] = c1[z]; + } + } + } + + coef1 += g_len << 7; + coef2 += g_len << 7; + dmix_re += g_len << 7; + } +} + +static void complex_stereo_interpolate_imag(float *im, float *re, const float f[6], + int len, int factor_even, int factor_odd) +{ + int i = 0; + float s; + + s = f[6]*re[2] + f[5]*re[1] + f[4]*re[0] + + f[3]*re[0] + + f[2]*re[1] + f[1]*re[2] + f[0]*re[3]; + im[i] += s*factor_even; + + i = 1; + s = f[6]*re[1] + f[5]*re[0] + f[4]*re[0] + + f[3]*re[1] + + f[2]*re[2] + f[1]*re[3] + f[0]*re[4]; + im[i] += s*factor_odd; + + i = 2; + s = f[6]*re[0] + f[5]*re[0] + f[4]*re[1] + + f[3]*re[2] + + f[2]*re[3] + f[1]*re[4] + f[0]*re[5]; + + im[i] += s*factor_even; + for (i = 3; i < len - 4; i += 2) { + s = f[6]*re[i-3] + f[5]*re[i-2] + f[4]*re[i-1] + + f[3]*re[i] + + f[2]*re[i+1] + f[1]*re[i+2] + f[0]*re[i+3]; + im[i+0] += s*factor_odd; + + s = f[6]*re[i-2] + f[5]*re[i-1] + f[4]*re[i] + + f[3]*re[i+1] + + f[2]*re[i+2] + f[1]*re[i+3] + f[0]*re[i+4]; + im[i+1] += s*factor_even; + } + + i = len - 3; + s = f[6]*re[i-3] + f[5]*re[i-2] + f[4]*re[i-1] + + f[3]*re[i] + + f[2]*re[i+1] + f[1]*re[i+2] + f[0]*re[i+2]; + im[i] += s*factor_odd; + + i = len - 2; + s = f[6]*re[i-3] + f[5]*re[i-2] + f[4]*re[i-1] + + f[3]*re[i] + + f[2]*re[i+1] + f[1]*re[i+1] + f[0]*re[i]; + im[i] += s*factor_even; + + i = len - 1; + s = f[6]*re[i-3] + f[5]*re[i-2] + f[4]*re[i-1] + + f[3]*re[i] + + f[2]*re[i] + f[1]*re[i-1] + f[0]*re[i-2]; + im[i] += s*factor_odd; +} + +static void apply_complex_stereo(AACDecContext *ac, ChannelElement *cpe) +{ + AACUsacStereo *us = &cpe->us; + IndividualChannelStream *ics = &cpe->ch[0].ics; + float *coef1 = cpe->ch[0].coeffs; + float *coef2 = cpe->ch[1].coeffs; + float *dmix_im = us->dmix_im; + + for (int g = 0; g < ics->num_window_groups; g++) { + unsigned g_len = ics->group_len[g]; + for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb++) { + int off = ics->swb_offset[sfb]; + int cb_len = ics->swb_offset[sfb + 1] - off; + + float *c1 = coef1 + off; + float *c2 = coef2 + off; + float *dm_im = dmix_im + off; + float alpha_re = us->alpha_q_re[g*cpe->max_sfb_ste + sfb]; + float alpha_im = us->alpha_q_im[g*cpe->max_sfb_ste + sfb]; + + if (!us->pred_used[g*cpe->max_sfb_ste + sfb]) + continue; + + if (!cpe->us.pred_dir) { + for (int group = 0; group < (unsigned)g_len; + group++, c1 += 128, c2 += 128, dm_im += 128) { + for (int z = 0; z < cb_len; z++) { + float side; + side = c2[z] - alpha_re*c1[z] - alpha_im*dm_im[z]; + c2[z] = c1[z] - side; + c1[z] = c1[z] + side; + } + } + } else { + for (int group = 0; group < (unsigned)g_len; + group++, c1 += 128, c2 += 128, dm_im += 128) { + for (int z = 0; z < cb_len; z++) { + float mid; + mid = c2[z] - alpha_re*c1[z] - alpha_im*dm_im[z]; + c2[z] = mid - c1[z]; + c1[z] = mid + c1[z]; + } + } + } + } + + coef1 += g_len << 7; + coef2 += g_len << 7; + dmix_im += g_len << 7; + } +} + +static const float *complex_stereo_get_filter(ChannelElement *cpe, int is_prev) +{ + int win, shape; + if (!is_prev) { + switch (cpe->ch[0].ics.window_sequence[0]) { + default: + case ONLY_LONG_SEQUENCE: + case EIGHT_SHORT_SEQUENCE: + win = 0; + break; + case LONG_START_SEQUENCE: + win = 1; + break; + case LONG_STOP_SEQUENCE: + win = 2; + break; + } + + if (cpe->ch[0].ics.use_kb_window[0] == 0 && + cpe->ch[0].ics.use_kb_window[1] == 0) + shape = 0; + else if (cpe->ch[0].ics.use_kb_window[0] == 1 && + cpe->ch[0].ics.use_kb_window[1] == 1) + shape = 1; + else if (cpe->ch[0].ics.use_kb_window[0] == 0 && + cpe->ch[0].ics.use_kb_window[1] == 1) + shape = 2; + else if (cpe->ch[0].ics.use_kb_window[0] == 1 && + cpe->ch[0].ics.use_kb_window[1] == 0) + shape = 3; + else + shape = 3; + } else { + win = cpe->ch[0].ics.window_sequence[0] == LONG_STOP_SEQUENCE; + shape = cpe->ch[0].ics.use_kb_window[1]; + } + + return ff_aac_usac_mdst_filt_cur[win][shape]; +} + +static void spectrum_decode(AACDecContext *ac, AACUSACConfig *usac, + ChannelElement *cpe, int nb_channels) +{ + AACUsacStereo *us = &cpe->us; + + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &cpe->ch[ch]; + AACUsacElemData *ue = &sce->ue; + + spectrum_scale(ac, sce, ue); + } + + if (nb_channels > 1 && us->common_window) { + if (us->ms_mask_mode == 3) { + const float *filt; + complex_stereo_downmix_cur(ac, cpe, us->dmix_re); + complex_stereo_downmix_prev(ac, cpe, us->prev_dmix_re); + + filt = complex_stereo_get_filter(cpe, 0); + complex_stereo_interpolate_imag(us->dmix_im, us->dmix_re, filt, + usac->core_frame_len, 1, 1); + if (us->use_prev_frame) { + filt = complex_stereo_get_filter(cpe, 1); + complex_stereo_interpolate_imag(us->dmix_im, us->prev_dmix_re, filt, + usac->core_frame_len, -1, 1); + } + + apply_complex_stereo(ac, cpe); + } else if (us->ms_mask_mode > 0) { + ac->dsp.apply_mid_side_stereo(ac, cpe); + } + } + + /* Save coefficients and alpha values for prediction reasons */ + if (nb_channels > 1) { + AACUsacStereo *us = &cpe->us; + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &cpe->ch[ch]; + memcpy(sce->prev_coeffs, sce->coeffs, sizeof(sce->coeffs)); + } + memcpy(us->prev_alpha_q_re, us->alpha_q_re, sizeof(us->alpha_q_re)); + memcpy(us->prev_alpha_q_im, us->alpha_q_im, sizeof(us->alpha_q_im)); + } + + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &cpe->ch[ch]; + + /* Apply TNS */ + if (sce->tns.present) + ac->dsp.apply_tns(sce->coeffs, &sce->tns, &sce->ics, 1); + + ac->oc[1].m4ac.frame_length_short ? ac->dsp.imdct_and_windowing_768(ac, sce) : + ac->dsp.imdct_and_windowing(ac, sce); + } +} + +static int decode_usac_core_coder(AACDecContext *ac, AACUSACConfig *usac, + AACUsacElemConfig *ec, ChannelElement *che, + GetBitContext *gb, int indep_flag, int nb_channels) +{ + int ret; + int arith_reset_flag; + AACUsacStereo *us = &che->us; + + /* Local symbols */ + uint8_t global_gain; + + us->common_window = 0; + che->ch[0].tns.present = che->ch[1].tns.present = 0; + + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &che->ch[ch]; + AACUsacElemData *ue = &sce->ue; + + ue->core_mode = get_bits1(gb); + } + + if (nb_channels == 2) { + ret = decode_usac_stereo_info(ac, usac, ec, che, gb, indep_flag); + if (ret) + return ret; + } + + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &che->ch[ch]; + IndividualChannelStream *ics = &sce->ics; + AACUsacElemData *ue = &sce->ue; + + if (ue->core_mode) { /* lpd_channel_stream */ + ret = ff_aac_ldp_parse_channel_stream(ac, usac, ue, gb); + if (ret < 0) + return ret; + } + + if ((nb_channels == 1) || + (che->ch[0].ue.core_mode != che->ch[1].ue.core_mode)) + sce->tns.present = get_bits1(gb); + + /* fd_channel_stream */ + global_gain = get_bits(gb, 8); + + ue->noise.level = 0; + if (ec->noise_fill) { + ue->noise.level = get_bits(gb, 3); + ue->noise.offset = get_bits(gb, 5); + } + + if (!us->common_window) { + /* ics_info() */ + ics->window_sequence[1] = ics->window_sequence[0]; + ics->window_sequence[0] = get_bits(gb, 2); + ics->use_kb_window[1] = ics->use_kb_window[0]; + ics->use_kb_window[0] = get_bits1(gb); + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { + ics->max_sfb = get_bits(gb, 4); + ue->scale_factor_grouping = get_bits(gb, 7); + } else { + ics->max_sfb = get_bits(gb, 6); + } + + ret = setup_sce(ac, sce, usac); + if (ret < 0) + return ret; + } + + if (ec->tw_mdct && !us->common_tw) { + /* tw_data() */ + if (get_bits1(gb)) { /* tw_data_present */ + /* Time warping is not supported in baseline profile streams. */ + avpriv_report_missing_feature(ac->avctx, + "AAC USAC timewarping"); + return AVERROR_PATCHWELCOME; + } + } + + ret = decode_usac_scale_factors(ac, sce, gb, global_gain); + if (ret < 0) + return ret; + + ac->dsp.dequant_scalefactors(sce); + + if (sce->tns.present) { + ret = ff_aac_decode_tns(ac, &sce->tns, gb, ics); + if (ret < 0) + return ret; + } + + /* ac_spectral_data */ + arith_reset_flag = indep_flag; + if (!arith_reset_flag) + arith_reset_flag = get_bits1(gb); + + /* Decode coeffs */ + memset(&sce->coeffs[0], 0, 1024*sizeof(float)); + for (int win = 0; win < ics->num_windows; win++) { + int lg = ics->swb_offset[ics->max_sfb]; + int N; + if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) + N = usac->core_frame_len / 8; + else + N = usac->core_frame_len; + + ret = decode_spectrum_and_dequant_ac(ac, sce->coeffs + win*128, gb, + sce->sf, &ue->ac, + arith_reset_flag && (win == 0), + lg, N); + if (ret < 0) + return ret; + } + + if (get_bits1(gb)) { /* fac_data_present */ + const uint16_t len_8 = usac->core_frame_len / 8; + const uint16_t len_16 = usac->core_frame_len / 16; + const uint16_t fac_len = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE ? len_16 : len_8; + ret = ff_aac_parse_fac_data(ue, gb, 1, fac_len); + if (ret < 0) + return ret; + } + } + + spectrum_decode(ac, usac, che, nb_channels); + + return 0; +} + +static int parse_audio_preroll(AACDecContext *ac, GetBitContext *gb) +{ + int ret = 0; + GetBitContext gbc; + OutputConfiguration *oc = &ac->oc[1]; + MPEG4AudioConfig *m4ac = &oc->m4ac; + MPEG4AudioConfig m4ac_bak = oc->m4ac; + uint8_t temp_data[512]; + uint8_t *tmp_buf = temp_data; + size_t tmp_buf_size = sizeof(temp_data); + + av_unused int crossfade; + int num_preroll_frames; + + int config_len = get_escaped_value(gb, 4, 4, 8); + + /* Implementations are free to pad the config to any length, so use a + * different reader for this. */ + gbc = *gb; + ret = ff_aac_usac_config_decode(ac, ac->avctx, &gbc, oc, m4ac->chan_config); + if (ret < 0) { + *m4ac = m4ac_bak; + return ret; + } else { + ac->oc[1].m4ac.chan_config = 0; + } + + /* 7.18.3.3 Bitrate adaption + * If configuration didn't change after applying preroll, continue + * without decoding it. */ + if (!memcmp(m4ac, &m4ac_bak, sizeof(m4ac_bak))) + return 0; + + skip_bits_long(gb, config_len*8); + + crossfade = get_bits1(gb); /* applyCrossfade */ + skip_bits1(gb); /* reserved */ + num_preroll_frames = get_escaped_value(gb, 2, 4, 0); /* numPreRollFrames */ + + for (int i = 0; i < num_preroll_frames; i++) { + int got_frame_ptr = 0; + int au_len = get_escaped_value(gb, 16, 16, 0); + + if (au_len*8 > tmp_buf_size) { + uint8_t *tmp2; + tmp_buf = tmp_buf == temp_data ? NULL : tmp_buf; + tmp2 = av_realloc_array(tmp_buf, au_len, 8); + if (!tmp2) { + if (tmp_buf != temp_data) + av_free(tmp_buf); + return AVERROR(ENOMEM); + } + tmp_buf = tmp2; + } + + /* Byte alignment is not guaranteed. */ + for (int i = 0; i < au_len; i++) + tmp_buf[i] = get_bits(gb, 8); + + ret = init_get_bits8(&gbc, tmp_buf, au_len); + if (ret < 0) + break; + + ret = ff_aac_usac_decode_frame(ac->avctx, ac, &gbc, &got_frame_ptr); + if (ret < 0) + break; + } + + if (tmp_buf != temp_data) + av_free(tmp_buf); + + return 0; +} + +static int parse_ext_ele(AACDecContext *ac, AACUsacElemConfig *e, + GetBitContext *gb) +{ + uint8_t *tmp; + uint8_t pl_frag_start = 1; + uint8_t pl_frag_end = 1; + uint32_t len; + + if (!get_bits1(gb)) /* usacExtElementPresent */ + return 0; + + if (get_bits1(gb)) { /* usacExtElementUseDefaultLength */ + len = e->ext.default_len; + } else { + len = get_bits(gb, 8); /* usacExtElementPayloadLength */ + if (len == 255) + len += get_bits(gb, 16) - 2; + } + + if (!len) + return 0; + + if (e->ext.payload_frag) { + pl_frag_start = get_bits1(gb); /* usacExtElementStart */ + pl_frag_end = get_bits1(gb); /* usacExtElementStop */ + } + + if (pl_frag_start) + e->ext.pl_data_offset = 0; + + /* If an extension starts and ends this packet, we can directly use it */ + if (!(pl_frag_start && pl_frag_end)) { + tmp = av_realloc(e->ext.pl_data, e->ext.pl_data_offset + len); + if (!tmp) { + av_free(e->ext.pl_data); + return AVERROR(ENOMEM); + } + e->ext.pl_data = tmp; + + /* Readout data to a buffer */ + for (int i = 0; i < len; i++) + e->ext.pl_data[e->ext.pl_data_offset + i] = get_bits(gb, 8); + } + + e->ext.pl_data_offset += len; + + if (pl_frag_end) { + int ret = 0; + int start_bits = get_bits_count(gb); + const int pl_len = e->ext.pl_data_offset; + GetBitContext *gb2 = gb; + GetBitContext gbc; + if (!(pl_frag_start && pl_frag_end)) { + ret = init_get_bits8(&gbc, e->ext.pl_data, pl_len); + if (ret < 0) + return ret; + + gb2 = &gbc; + } + + switch (e->ext.type) { + case ID_EXT_ELE_FILL: + /* Filler elements have no usable payload */ + break; + case ID_EXT_ELE_AUDIOPREROLL: + ret = parse_audio_preroll(ac, gb2); + break; + default: + /* This should never happen */ + av_assert0(0); + } + av_freep(&e->ext.pl_data); + if (ret < 0) + return ret; + + skip_bits_long(gb, pl_len*8 - (get_bits_count(gb) - start_bits)); + } + + return 0; +} + +int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, + GetBitContext *gb, int *got_frame_ptr) +{ + int ret, nb_ch_el, is_dmono = 0; + int indep_flag, samples = 0; + int audio_found = 0, sce_count = 0; + AVFrame *frame = ac->frame; + + ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, + ac->oc[1].status, 0); + + indep_flag = get_bits1(gb); + + nb_ch_el = 0; + for (int i = 0; i < ac->oc[1].usac.nb_elems; i++) { + AACUsacElemConfig *e = &ac->oc[1].usac.elems[i]; + ChannelElement *che; + + switch (e->type) { + case ID_USAC_LFE: + /* Fallthrough */ + case ID_USAC_SCE: + che = ff_aac_get_che(ac, TYPE_SCE, nb_ch_el++); + if (!che) { + av_log(ac->avctx, AV_LOG_ERROR, + "channel element %d.%d is not allocated\n", + TYPE_SCE, nb_ch_el - 1); + return AVERROR_INVALIDDATA; + } + + ret = decode_usac_core_coder(ac, &ac->oc[1].usac, e, che, gb, + indep_flag, 1); + if (ret < 0) + return ret; + + sce_count++; + audio_found = 1; + che->present = 1; + samples = ac->oc[1].m4ac.frame_length_short ? 768 : 1024; + break; + case ID_USAC_CPE: + che = ff_aac_get_che(ac, TYPE_CPE, nb_ch_el++); + if (!che) { + av_log(ac->avctx, AV_LOG_ERROR, + "channel element %d.%d is not allocated\n", + TYPE_CPE, nb_ch_el - 1); + return AVERROR_INVALIDDATA; + } + + ret = decode_usac_core_coder(ac, &ac->oc[1].usac, e, che, gb, + indep_flag, 2); + if (ret < 0) + return ret; + + audio_found = 1; + che->present = 1; + samples = ac->oc[1].m4ac.frame_length_short ? 768 : 1024; + break; + case ID_USAC_EXT: + ret = parse_ext_ele(ac, e, gb); + if (ret < 0) + return ret; + break; + } + } + + if (ac->oc[1].status && audio_found) { + avctx->sample_rate = ac->oc[1].m4ac.sample_rate; + avctx->frame_size = samples; + ac->oc[1].status = OC_LOCKED; + } + + if (!frame->data[0] && samples) { + av_log(avctx, AV_LOG_ERROR, "no frame data found\n"); + return AVERROR_INVALIDDATA; + } + + if (samples) { + frame->nb_samples = samples; + frame->sample_rate = avctx->sample_rate; + frame->flags = indep_flag ? AV_FRAME_FLAG_KEY : 0x0; + *got_frame_ptr = 1; + } else { + av_frame_unref(ac->frame); + frame->flags = indep_flag ? AV_FRAME_FLAG_KEY : 0x0; + *got_frame_ptr = 0; + } + + /* for dual-mono audio (SCE + SCE) */ + is_dmono = ac->dmono_mode && sce_count == 2 && + !av_channel_layout_compare(&ac->oc[1].ch_layout, + &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO); + if (is_dmono) { + if (ac->dmono_mode == 1) + frame->data[1] = frame->data[0]; + else if (ac->dmono_mode == 2) + frame->data[0] = frame->data[1]; + } + + return 0; +} diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.h new file mode 100644 index 0000000000..4116a2073a --- /dev/null +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 Lynne + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AAC_AACDEC_USAC_H +#define AVCODEC_AAC_AACDEC_USAC_H + +#include "aacdec.h" + +#include "libavcodec/get_bits.h" + +int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, + GetBitContext *gb, OutputConfiguration *oc, + int channel_config); + +int ff_aac_usac_reset_state(AACDecContext *ac, OutputConfiguration *oc); + +int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, + GetBitContext *gb, int *got_frame_ptr); + +#endif /* AVCODEC_AAC_AACDEC_USAC_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/aactab.c b/src/ExtLib/ffmpeg/libavcodec/aactab.c index fb2726de0b..2f266eba6d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aactab.c +++ b/src/ExtLib/ffmpeg/libavcodec/aactab.c @@ -154,6 +154,10 @@ const uint8_t ff_aac_num_swb_960[] = { 40, 40, 46, 49, 49, 49, 46, 46, 42, 42, 42, 40, 40 }; +const uint8_t ff_aac_num_swb_768[] = { + 37, 37, 41, 43, 43, 43, 43, 43, 39, 39, 39, 37, 37 +}; + const uint8_t ff_aac_num_swb_512[] = { 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0, 0 }; @@ -170,6 +174,10 @@ const uint8_t ff_aac_num_swb_120[] = { 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15 }; +const uint8_t ff_aac_num_swb_96[] = { + 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14 +}; + const uint8_t ff_aac_pred_sfb_max[] = { 33, 33, 38, 40, 40, 40, 41, 41, 37, 37, 37, 34, 34 }; @@ -1193,6 +1201,382 @@ const uint16_t *const ff_aac_codebook_vector_idx[] = { codebook_vector10_idx, }; +const uint16_t ff_aac_ac_msb_cdfs[64][17] = { + { 708, 706, 579, 569, 568, 567, 479, 469, + 297, 138, 97, 91, 72, 52, 38, 34, 0, }, + { 7619, 6917, 6519, 6412, 5514, 5003, 4683, 4563, + 3907, 3297, 3125, 3060, 2904, 2718, 2631, 2590, 0, }, + { 7263, 4888, 4810, 4803, 1889, 415, 335, 327, + 195, 72, 52, 49, 36, 20, 15, 14, 0, }, + { 3626, 2197, 2188, 2187, 582, 57, 47, 46, + 30, 12, 9, 8, 6, 4, 3, 2, 0, }, + { 7806, 5541, 5451, 5441, 2720, 834, 691, 674, + 487, 243, 179, 167, 139, 98, 77, 70, 0, }, + { 6684, 4101, 4058, 4055, 1748, 426, 368, 364, + 322, 257, 235, 232, 228, 222, 217, 215, 0, }, + { 9162, 5964, 5831, 5819, 3269, 866, 658, 638, + 535, 348, 258, 244, 234, 214, 195, 186, 0, }, + { 10638, 8491, 8365, 8351, 4418, 2067, 1859, 1834, + 1190, 601, 495, 478, 356, 217, 174, 164, 0, }, + { 13389, 10514, 10032, 9961, 7166, 3488, 2655, 2524, + 2015, 1140, 760, 672, 585, 426, 325, 283, 0, }, + { 14861, 12788, 12115, 11952, 9987, 6657, 5323, 4984, + 4324, 3001, 2205, 1943, 1764, 1394, 1115, 978, 0, }, + { 12876, 10004, 9661, 9610, 7107, 3435, 2711, 2595, + 2257, 1508, 1059, 952, 893, 753, 609, 538, 0, }, + { 15125, 13591, 13049, 12874, 11192, 8543, 7406, 7023, + 6291, 4922, 4104, 3769, 3465, 2890, 2486, 2275, 0, }, + { 14574, 13106, 12731, 12638, 10453, 7947, 7233, 7037, + 6031, 4618, 4081, 3906, 3465, 2802, 2476, 2349, 0, }, + { 15070, 13179, 12517, 12351, 10742, 7657, 6200, 5825, + 5264, 3998, 3014, 2662, 2510, 2153, 1799, 1564, 0, }, + { 15542, 14466, 14007, 13844, 12489, 10409, 9481, 9132, + 8305, 6940, 6193, 5867, 5458, 4743, 4291, 4047, 0, }, + { 15165, 14384, 14084, 13934, 12911, 11485, 10844, 10513, + 10002, 8993, 8380, 8051, 7711, 7036, 6514, 6233, 0, }, + { 15642, 14279, 13625, 13393, 12348, 9971, 8405, 7858, + 7335, 6119, 4918, 4376, 4185, 3719, 3231, 2860, 0, }, + { 13408, 13407, 11471, 11218, 11217, 11216, 9473, 9216, + 6480, 3689, 2857, 2690, 2256, 1732, 1405, 1302, 0, }, + { 16098, 15584, 15191, 14931, 14514, 13578, 12703, 12103, + 11830, 11172, 10475, 9867, 9695, 9281, 8825, 8389, 0, }, + { 15844, 14873, 14277, 13996, 13230, 11535, 10205, 9543, + 9107, 8086, 7085, 6419, 6214, 5713, 5195, 4731, 0, }, + { 16131, 15720, 15443, 15276, 14848, 13971, 13314, 12910, + 12591, 11874, 11225, 10788, 10573, 10077, 9585, 9209, 0, }, + { 16331, 16330, 12283, 11435, 11434, 11433, 8725, 8049, + 6065, 4138, 3187, 2842, 2529, 2171, 1907, 1745, 0, }, + { 16011, 15292, 14782, 14528, 14008, 12767, 11556, 10921, + 10591, 9759, 8813, 8043, 7855, 7383, 6863, 6282, 0, }, + { 16380, 16379, 15159, 14610, 14609, 14608, 12859, 12111, + 11046, 9536, 8348, 7713, 7216, 6533, 5964, 5546, 0, }, + { 16367, 16333, 16294, 16253, 16222, 16143, 16048, 15947, + 15915, 15832, 15731, 15619, 15589, 15512, 15416, 15310, 0, }, + { 15967, 15319, 14937, 14753, 14010, 12638, 11787, 11360, + 10805, 9706, 8934, 8515, 8166, 7456, 6911, 6575, 0, }, + { 4906, 3005, 2985, 2984, 875, 102, 83, 81, + 47, 17, 12, 11, 8, 5, 4, 3, 0, }, + { 7217, 4346, 4269, 4264, 1924, 428, 340, 332, + 280, 203, 179, 175, 171, 164, 159, 157, 0, }, + { 16010, 15415, 15032, 14805, 14228, 13043, 12168, 11634, + 11265, 10419, 9645, 9110, 8892, 8378, 7850, 7437, 0, }, + { 8573, 5218, 5046, 5032, 2787, 771, 555, 533, + 443, 286, 218, 205, 197, 181, 168, 162, 0, }, + { 11474, 8095, 7822, 7796, 4632, 1443, 1046, 1004, + 748, 351, 218, 194, 167, 121, 93, 83, 0, }, + { 16152, 15764, 15463, 15264, 14925, 14189, 13536, 13070, + 12846, 12314, 11763, 11277, 11131, 10777, 10383, 10011, 0, }, + { 14187, 11654, 11043, 10919, 8498, 4885, 3778, 3552, + 2947, 1835, 1283, 1134, 998, 749, 585, 514, 0, }, + { 14162, 11527, 10759, 10557, 8601, 5417, 4105, 3753, + 3286, 2353, 1708, 1473, 1370, 1148, 959, 840, 0, }, + { 16205, 15902, 15669, 15498, 15213, 14601, 14068, 13674, + 13463, 12970, 12471, 12061, 11916, 11564, 11183, 10841, 0, }, + { 15043, 12972, 12092, 11792, 10265, 7446, 5934, 5379, + 4883, 3825, 3036, 2647, 2507, 2185, 1901, 1699, 0, }, + { 15320, 13694, 12782, 12352, 11191, 8936, 7433, 6671, + 6255, 5366, 4622, 4158, 4020, 3712, 3420, 3198, 0, }, + { 16255, 16020, 15768, 15600, 15416, 14963, 14440, 14006, + 13875, 13534, 13137, 12697, 12602, 12364, 12084, 11781, 0, }, + { 15627, 14503, 13906, 13622, 12557, 10527, 9269, 8661, + 8117, 6933, 5994, 5474, 5222, 4664, 4166, 3841, 0, }, + { 16366, 16365, 14547, 14160, 14159, 14158, 11969, 11473, + 8735, 6147, 4911, 4530, 3865, 3180, 2710, 2473, 0, }, + { 16257, 16038, 15871, 15754, 15536, 15071, 14673, 14390, + 14230, 13842, 13452, 13136, 13021, 12745, 12434, 12154, 0, }, + { 15855, 14971, 14338, 13939, 13239, 11782, 10585, 9805, + 9444, 8623, 7846, 7254, 7079, 6673, 6262, 5923, 0, }, + { 9492, 6318, 6197, 6189, 3004, 652, 489, 477, + 333, 143, 96, 90, 78, 60, 50, 47, 0, }, + { 16313, 16191, 16063, 15968, 15851, 15590, 15303, 15082, + 14968, 14704, 14427, 14177, 14095, 13899, 13674, 13457, 0, }, + { 8485, 5473, 5389, 5383, 2411, 494, 386, 377, + 278, 150, 117, 112, 103, 89, 81, 78, 0, }, + { 10497, 7154, 6959, 6943, 3788, 1004, 734, 709, + 517, 238, 152, 138, 120, 90, 72, 66, 0, }, + { 16317, 16226, 16127, 16040, 15955, 15762, 15547, 15345, + 15277, 15111, 14922, 14723, 14671, 14546, 14396, 14239, 0, }, + { 16382, 16381, 15858, 15540, 15539, 15538, 14704, 14168, + 13768, 13092, 12452, 11925, 11683, 11268, 10841, 10460, 0, }, + { 5974, 3798, 3758, 3755, 1275, 205, 166, 162, + 95, 35, 26, 24, 18, 11, 8, 7, 0, }, + { 3532, 2258, 2246, 2244, 731, 135, 118, 115, + 87, 45, 36, 34, 29, 21, 17, 16, 0, }, + { 7466, 4882, 4821, 4811, 2476, 886, 788, 771, + 688, 531, 469, 457, 437, 400, 369, 361, 0, }, + { 9580, 5772, 5291, 5216, 3444, 1496, 1025, 928, + 806, 578, 433, 384, 366, 331, 296, 273, 0, }, + { 10692, 7730, 7543, 7521, 4679, 1746, 1391, 1346, + 1128, 692, 495, 458, 424, 353, 291, 268, 0, }, + { 11040, 7132, 6549, 6452, 4377, 1875, 1253, 1130, + 958, 631, 431, 370, 346, 296, 253, 227, 0, }, + { 12687, 9332, 8701, 8585, 6266, 3093, 2182, 2004, + 1683, 1072, 712, 608, 559, 458, 373, 323, 0, }, + { 13429, 9853, 8860, 8584, 6806, 4039, 2862, 2478, + 2239, 1764, 1409, 1224, 1178, 1077, 979, 903, 0, }, + { 14685, 12163, 11061, 10668, 9101, 6345, 4871, 4263, + 3908, 3200, 2668, 2368, 2285, 2106, 1942, 1819, 0, }, + { 13295, 11302, 10999, 10945, 7947, 5036, 4490, 4385, + 3391, 2185, 1836, 1757, 1424, 998, 833, 785, 0, }, + { 4992, 2993, 2972, 2970, 1269, 575, 552, 549, + 530, 505, 497, 495, 493, 489, 486, 485, 0, }, + { 15419, 13862, 13104, 12819, 11429, 8753, 7220, 6651, + 6020, 4667, 3663, 3220, 2995, 2511, 2107, 1871, 0, }, + { 12468, 9263, 8912, 8873, 5758, 2193, 1625, 1556, + 1187, 589, 371, 330, 283, 200, 149, 131, 0, }, + { 15870, 15076, 14615, 14369, 13586, 12034, 10990, 10423, + 9953, 8908, 8031, 7488, 7233, 6648, 6101, 5712, 0, }, + { 1693, 978, 976, 975, 194, 18, 16, 15, + 11, 7, 6, 5, 4, 3, 2, 1, 0, }, + { 7992, 5218, 5147, 5143, 2152, 366, 282, 276, + 173, 59, 38, 35, 27, 16, 11, 10, 0, } +}; + +const uint16_t ff_aac_ac_lsb_cdfs[3][4] = { + { 12571, 10569, 3696, 0 }, + { 12661, 5700, 3751, 0 }, + { 10827, 6884, 2929, 0 } +}; + +const uint8_t ff_aac_ac_lookup_m[742] = { + 0x01, 0x34, 0x0D, 0x13, 0x12, 0x25, 0x00, 0x3A, 0x05, 0x00, 0x21, 0x13, 0x1F, 0x1A, 0x1D, 0x36, + 0x24, 0x2B, 0x1B, 0x33, 0x37, 0x29, 0x1D, 0x33, 0x37, 0x33, 0x37, 0x33, 0x37, 0x33, 0x2C, 0x00, + 0x21, 0x13, 0x25, 0x2A, 0x00, 0x21, 0x24, 0x12, 0x2C, 0x1E, 0x37, 0x24, 0x1F, 0x35, 0x37, 0x24, + 0x35, 0x37, 0x35, 0x37, 0x38, 0x2D, 0x21, 0x29, 0x1E, 0x21, 0x13, 0x2D, 0x36, 0x38, 0x29, 0x36, + 0x37, 0x24, 0x36, 0x38, 0x37, 0x38, 0x00, 0x20, 0x23, 0x20, 0x23, 0x36, 0x38, 0x24, 0x3B, 0x24, + 0x26, 0x29, 0x1F, 0x30, 0x2D, 0x0D, 0x12, 0x3F, 0x2D, 0x21, 0x1C, 0x2A, 0x00, 0x21, 0x12, 0x1E, + 0x36, 0x38, 0x36, 0x37, 0x3F, 0x1E, 0x0D, 0x1F, 0x2A, 0x1E, 0x21, 0x24, 0x12, 0x2A, 0x3C, 0x21, + 0x24, 0x1F, 0x3C, 0x21, 0x29, 0x36, 0x38, 0x36, 0x37, 0x38, 0x21, 0x1E, 0x00, 0x3B, 0x25, 0x1E, + 0x20, 0x10, 0x1F, 0x3C, 0x20, 0x23, 0x29, 0x08, 0x23, 0x12, 0x08, 0x23, 0x21, 0x38, 0x00, 0x20, + 0x13, 0x20, 0x3B, 0x1C, 0x20, 0x3B, 0x29, 0x20, 0x23, 0x24, 0x21, 0x24, 0x21, 0x24, 0x3B, 0x13, + 0x23, 0x26, 0x23, 0x13, 0x21, 0x24, 0x26, 0x29, 0x12, 0x22, 0x2B, 0x02, 0x1E, 0x0D, 0x1F, 0x2D, + 0x00, 0x0D, 0x12, 0x00, 0x3C, 0x21, 0x29, 0x3C, 0x21, 0x2A, 0x3C, 0x3B, 0x22, 0x1E, 0x20, 0x10, + 0x1F, 0x3C, 0x0D, 0x29, 0x3C, 0x21, 0x24, 0x08, 0x23, 0x20, 0x38, 0x39, 0x3C, 0x20, 0x13, 0x3C, + 0x00, 0x0D, 0x13, 0x1F, 0x3C, 0x09, 0x26, 0x1F, 0x08, 0x09, 0x26, 0x12, 0x08, 0x23, 0x29, 0x20, + 0x23, 0x21, 0x24, 0x20, 0x13, 0x20, 0x3B, 0x16, 0x20, 0x3B, 0x29, 0x20, 0x3B, 0x29, 0x20, 0x3B, + 0x13, 0x21, 0x24, 0x29, 0x0B, 0x13, 0x09, 0x3B, 0x13, 0x09, 0x3B, 0x13, 0x21, 0x3B, 0x13, 0x0D, + 0x26, 0x29, 0x26, 0x29, 0x3D, 0x12, 0x22, 0x28, 0x2E, 0x04, 0x08, 0x13, 0x3C, 0x3B, 0x3C, 0x20, + 0x10, 0x3C, 0x21, 0x07, 0x08, 0x10, 0x00, 0x08, 0x0D, 0x29, 0x08, 0x0D, 0x29, 0x08, 0x09, 0x13, + 0x20, 0x23, 0x39, 0x08, 0x09, 0x13, 0x08, 0x09, 0x16, 0x08, 0x09, 0x10, 0x12, 0x20, 0x3B, 0x3D, + 0x09, 0x26, 0x20, 0x3B, 0x24, 0x39, 0x09, 0x26, 0x20, 0x0D, 0x13, 0x00, 0x09, 0x13, 0x20, 0x0D, + 0x26, 0x12, 0x20, 0x3B, 0x13, 0x21, 0x26, 0x0B, 0x12, 0x09, 0x3B, 0x16, 0x09, 0x3B, 0x3D, 0x09, + 0x26, 0x0D, 0x13, 0x26, 0x3D, 0x1C, 0x12, 0x1F, 0x28, 0x2E, 0x07, 0x0B, 0x08, 0x09, 0x00, 0x39, + 0x0B, 0x08, 0x26, 0x08, 0x09, 0x13, 0x20, 0x0B, 0x39, 0x10, 0x39, 0x0D, 0x13, 0x20, 0x10, 0x12, + 0x09, 0x13, 0x20, 0x3B, 0x13, 0x09, 0x26, 0x0B, 0x09, 0x3B, 0x1C, 0x09, 0x3B, 0x13, 0x20, 0x3B, + 0x13, 0x09, 0x26, 0x0B, 0x16, 0x0D, 0x13, 0x09, 0x13, 0x09, 0x13, 0x26, 0x3D, 0x1C, 0x1F, 0x28, + 0x2E, 0x07, 0x10, 0x39, 0x0B, 0x39, 0x39, 0x13, 0x39, 0x0B, 0x39, 0x0B, 0x39, 0x26, 0x39, 0x10, + 0x20, 0x3B, 0x16, 0x20, 0x10, 0x09, 0x26, 0x0B, 0x13, 0x09, 0x13, 0x26, 0x1C, 0x0B, 0x3D, 0x1C, + 0x1F, 0x28, 0x2B, 0x07, 0x0C, 0x39, 0x0B, 0x39, 0x0B, 0x0C, 0x0B, 0x26, 0x0B, 0x26, 0x3D, 0x0D, + 0x1C, 0x14, 0x28, 0x2B, 0x39, 0x0B, 0x0C, 0x0E, 0x3D, 0x1C, 0x0D, 0x12, 0x22, 0x2B, 0x07, 0x0C, + 0x0E, 0x3D, 0x1C, 0x10, 0x1F, 0x2B, 0x0C, 0x0E, 0x19, 0x14, 0x10, 0x1F, 0x28, 0x0C, 0x0E, 0x19, + 0x14, 0x26, 0x22, 0x2B, 0x0C, 0x0E, 0x19, 0x14, 0x26, 0x28, 0x0E, 0x19, 0x14, 0x26, 0x28, 0x0E, + 0x19, 0x14, 0x28, 0x0E, 0x19, 0x14, 0x22, 0x28, 0x2B, 0x0E, 0x14, 0x2B, 0x31, 0x00, 0x3A, 0x3A, + 0x05, 0x05, 0x1B, 0x1D, 0x33, 0x06, 0x35, 0x35, 0x20, 0x21, 0x37, 0x21, 0x24, 0x05, 0x1B, 0x2C, + 0x2C, 0x2C, 0x06, 0x34, 0x1E, 0x34, 0x00, 0x08, 0x36, 0x09, 0x21, 0x26, 0x1C, 0x2C, 0x00, 0x02, + 0x02, 0x02, 0x3F, 0x04, 0x04, 0x04, 0x34, 0x39, 0x20, 0x0A, 0x0C, 0x39, 0x0B, 0x0F, 0x07, 0x07, + 0x07, 0x07, 0x34, 0x39, 0x39, 0x0A, 0x0C, 0x39, 0x0C, 0x0F, 0x07, 0x07, 0x07, 0x00, 0x39, 0x39, + 0x0C, 0x0F, 0x07, 0x07, 0x39, 0x0C, 0x0F, 0x07, 0x39, 0x0C, 0x0F, 0x39, 0x39, 0x0C, 0x0F, 0x39, + 0x0C, 0x39, 0x0C, 0x0F, 0x00, 0x11, 0x27, 0x17, 0x2F, 0x27, 0x00, 0x27, 0x17, 0x00, 0x11, 0x17, + 0x00, 0x11, 0x17, 0x11, 0x00, 0x27, 0x15, 0x11, 0x17, 0x01, 0x15, 0x11, 0x15, 0x11, 0x15, 0x15, + 0x17, 0x00, 0x27, 0x01, 0x27, 0x27, 0x15, 0x00, 0x27, 0x11, 0x27, 0x15, 0x15, 0x15, 0x27, 0x15, + 0x15, 0x15, 0x15, 0x17, 0x2F, 0x11, 0x17, 0x27, 0x27, 0x27, 0x11, 0x27, 0x15, 0x27, 0x27, 0x15, + 0x15, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, + 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, + 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x27, 0x17, 0x2F, 0x17, 0x2F, 0x2B, 0x00, 0x27, 0x00, 0x00, 0x11, + 0x15, 0x00, 0x11, 0x11, 0x27, 0x27, 0x15, 0x17, 0x15, 0x17, 0x15, 0x17, 0x27, 0x17, 0x27, 0x17, + 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, 0x27, 0x17, + 0x27, 0x15, 0x27, 0x27, 0x15, 0x27 +}; + +const uint32_t ff_aac_ac_hash_m[742] = { + 0x00000104, 0x0000030A, 0x00000510, 0x00000716, + 0x00000A1F, 0x00000F2E, 0x00011100, 0x00111103, + 0x00111306, 0x00111436, 0x00111623, 0x00111929, + 0x00111F2E, 0x0011221B, 0x00112435, 0x00112621, + 0x00112D12, 0x00113130, 0x0011331D, 0x00113535, + 0x00113938, 0x0011411B, 0x00114433, 0x00114635, + 0x00114F29, 0x00116635, 0x00116F24, 0x00117433, + 0x0011FF0F, 0x00121102, 0x0012132D, 0x00121436, + 0x00121623, 0x00121912, 0x0012213F, 0x0012232D, + 0x00122436, 0x00122638, 0x00122A29, 0x00122F2B, + 0x0012322D, 0x00123436, 0x00123738, 0x00123B29, + 0x0012411D, 0x00124536, 0x00124938, 0x00124F12, + 0x00125535, 0x00125F29, 0x00126535, 0x0012B837, + 0x0013112A, 0x0013131E, 0x0013163B, 0x0013212D, + 0x0013233C, 0x00132623, 0x00132F2E, 0x0013321E, + 0x00133521, 0x00133824, 0x0013411E, 0x00134336, + 0x00134838, 0x00135135, 0x00135537, 0x00135F12, + 0x00137637, 0x0013FF29, 0x00140024, 0x00142321, + 0x00143136, 0x00143321, 0x00143F25, 0x00144321, + 0x00148638, 0x0014FF29, 0x00154323, 0x0015FF12, + 0x0016F20C, 0x0018A529, 0x00210031, 0x0021122C, + 0x00211408, 0x00211713, 0x00211F2E, 0x0021222A, + 0x00212408, 0x00212710, 0x00212F2E, 0x0021331E, + 0x00213436, 0x00213824, 0x0021412D, 0x0021431E, + 0x00214536, 0x00214F1F, 0x00216637, 0x00220004, + 0x0022122A, 0x00221420, 0x00221829, 0x00221F2E, + 0x0022222D, 0x00222408, 0x00222623, 0x00222929, + 0x00222F2B, 0x0022321E, 0x00223408, 0x00223724, + 0x00223A29, 0x0022411E, 0x00224436, 0x00224823, + 0x00225134, 0x00225621, 0x00225F12, 0x00226336, + 0x00227637, 0x0022FF29, 0x0023112D, 0x0023133C, + 0x00231420, 0x00231916, 0x0023212D, 0x0023233C, + 0x00232509, 0x00232929, 0x0023312D, 0x00233308, + 0x00233509, 0x00233724, 0x0023413C, 0x00234421, + 0x00234A13, 0x0023513C, 0x00235421, 0x00235F1F, + 0x00236421, 0x0023FF29, 0x00240024, 0x0024153B, + 0x00242108, 0x00242409, 0x00242726, 0x00243108, + 0x00243409, 0x00243610, 0x00244136, 0x00244321, + 0x00244523, 0x00244F1F, 0x00245423, 0x0024610A, + 0x00246423, 0x0024FF29, 0x00252510, 0x00253121, + 0x0025343B, 0x00254121, 0x00254510, 0x00254F25, + 0x00255221, 0x0025FF12, 0x00266513, 0x0027F529, + 0x0029F101, 0x002CF224, 0x00310030, 0x0031122A, + 0x00311420, 0x00311816, 0x0031212C, 0x0031231E, + 0x00312408, 0x00312710, 0x0031312A, 0x0031321E, + 0x00313408, 0x00313623, 0x0031411E, 0x0031433C, + 0x00320007, 0x0032122D, 0x00321420, 0x00321816, + 0x0032212D, 0x0032233C, 0x00322509, 0x00322916, + 0x0032312D, 0x00323420, 0x00323710, 0x00323F2B, + 0x00324308, 0x00324623, 0x00324F25, 0x00325421, + 0x00325F1F, 0x00326421, 0x0032FF29, 0x00331107, + 0x00331308, 0x0033150D, 0x0033211E, 0x00332308, + 0x00332420, 0x00332610, 0x00332929, 0x0033311E, + 0x00333308, 0x0033363B, 0x00333A29, 0x0033413C, + 0x00334320, 0x0033463B, 0x00334A29, 0x0033510A, + 0x00335320, 0x00335824, 0x0033610A, 0x00336321, + 0x00336F12, 0x00337623, 0x00341139, 0x0034153B, + 0x00342108, 0x00342409, 0x00342610, 0x00343108, + 0x00343409, 0x00343610, 0x00344108, 0x0034440D, + 0x00344610, 0x0034510A, 0x00345309, 0x0034553B, + 0x0034610A, 0x00346309, 0x0034F824, 0x00350029, + 0x00352510, 0x00353120, 0x0035330D, 0x00353510, + 0x00354120, 0x0035430D, 0x00354510, 0x00354F28, + 0x0035530D, 0x00355510, 0x00355F1F, 0x00356410, + 0x00359626, 0x0035FF12, 0x00366426, 0x0036FF12, + 0x0037F426, 0x0039D712, 0x003BF612, 0x003DF81F, + 0x00410004, 0x00411207, 0x0041150D, 0x0041212A, + 0x00412420, 0x0041311E, 0x00413308, 0x00413509, + 0x00413F2B, 0x00414208, 0x00420007, 0x0042123C, + 0x00421409, 0x00422107, 0x0042223C, 0x00422409, + 0x00422610, 0x0042313C, 0x00423409, 0x0042363B, + 0x0042413C, 0x00424320, 0x0042463B, 0x00425108, + 0x00425409, 0x0042FF29, 0x00431107, 0x00431320, + 0x0043153B, 0x0043213C, 0x00432320, 0x00432610, + 0x0043313C, 0x00433320, 0x0043353B, 0x00433813, + 0x00434108, 0x00434409, 0x00434610, 0x00435108, + 0x0043553B, 0x00435F25, 0x00436309, 0x0043753B, + 0x0043FF29, 0x00441239, 0x0044143B, 0x00442139, + 0x00442309, 0x0044253B, 0x00443108, 0x00443220, + 0x0044353B, 0x0044410A, 0x00444309, 0x0044453B, + 0x00444813, 0x0044510A, 0x00445309, 0x00445510, + 0x00445F25, 0x0044630D, 0x00450026, 0x00452713, + 0x00453120, 0x0045330D, 0x00453510, 0x00454120, + 0x0045430D, 0x00454510, 0x00455120, 0x0045530D, + 0x00456209, 0x00456410, 0x0045FF12, 0x00466513, + 0x0047FF22, 0x0048FF25, 0x0049F43D, 0x004BFB25, + 0x004EF825, 0x004FFF18, 0x00511339, 0x00512107, + 0x00513409, 0x00520007, 0x00521107, 0x00521320, + 0x00522107, 0x00522409, 0x0052313C, 0x00523320, + 0x0052353B, 0x00524108, 0x00524320, 0x00531139, + 0x00531309, 0x00532139, 0x00532309, 0x0053253B, + 0x00533108, 0x0053340D, 0x00533713, 0x00534108, + 0x0053453B, 0x00534F2B, 0x00535309, 0x00535610, + 0x00535F25, 0x0053643B, 0x00541139, 0x00542139, + 0x00542309, 0x00542613, 0x00543139, 0x00543309, + 0x00543510, 0x00543F2B, 0x00544309, 0x00544510, + 0x00544F28, 0x0054530D, 0x0054FF12, 0x00553613, + 0x00553F2B, 0x00554410, 0x0055510A, 0x0055543B, + 0x00555F25, 0x0055633B, 0x0055FF12, 0x00566513, + 0x00577413, 0x0059FF28, 0x005CC33D, 0x005EFB28, + 0x005FFF18, 0x00611339, 0x00612107, 0x00613320, + 0x0061A724, 0x00621107, 0x0062140B, 0x00622107, + 0x00622320, 0x00623139, 0x00623320, 0x00631139, + 0x0063130C, 0x00632139, 0x00632309, 0x00633139, + 0x00633309, 0x00633626, 0x00633F2B, 0x00634309, + 0x00634F2B, 0x0063543B, 0x0063FF12, 0x0064343B, + 0x00643F2B, 0x0064443B, 0x00645209, 0x00665513, + 0x0066610A, 0x00666526, 0x0067A616, 0x0069843D, + 0x006CF612, 0x006EF326, 0x006FFF18, 0x0071130C, + 0x00721107, 0x00722239, 0x0072291C, 0x0072340B, + 0x00731139, 0x00732239, 0x0073630B, 0x0073FF12, + 0x0074430B, 0x00755426, 0x00776F28, 0x00777410, + 0x0078843D, 0x007CF416, 0x007EF326, 0x007FFF18, + 0x00822239, 0x00831139, 0x0083430B, 0x0084530B, + 0x0087561C, 0x00887F25, 0x00888426, 0x008AF61C, + 0x008F0018, 0x008FFF18, 0x00911107, 0x0093230B, + 0x0094530B, 0x0097743D, 0x00998C25, 0x00999616, + 0x009EF825, 0x009FFF18, 0x00A3430B, 0x00A4530B, + 0x00A7743D, 0x00AA9F2B, 0x00AAA616, 0x00ABD61F, + 0x00AFFF18, 0x00B3330B, 0x00B44426, 0x00B7643D, + 0x00BB971F, 0x00BBB53D, 0x00BEF512, 0x00BFFF18, + 0x00C22139, 0x00C5330E, 0x00C7633D, 0x00CCAF2E, + 0x00CCC616, 0x00CFFF18, 0x00D4440E, 0x00D6420E, + 0x00DDCF2E, 0x00DDD516, 0x00DFFF18, 0x00E4330E, + 0x00E6841C, 0x00EEE61C, 0x00EFFF18, 0x00F3320E, + 0x00F55319, 0x00F8F41C, 0x00FAFF2E, 0x00FF002E, + 0x00FFF10C, 0x00FFF33D, 0x00FFF722, 0x00FFFF18, + 0x01000232, 0x0111113E, 0x01112103, 0x0111311A, + 0x0112111A, 0x01122130, 0x01123130, 0x0112411D, + 0x01131102, 0x01132102, 0x01133102, 0x01141108, + 0x01142136, 0x01143136, 0x01144135, 0x0115223B, + 0x01211103, 0x0121211A, 0x01213130, 0x01221130, + 0x01222130, 0x01223102, 0x01231104, 0x01232104, + 0x01233104, 0x01241139, 0x01241220, 0x01242220, + 0x01251109, 0x0125223B, 0x0125810A, 0x01283212, + 0x0131111A, 0x01312130, 0x0131222C, 0x0131322A, + 0x0132122A, 0x0132222D, 0x0132322D, 0x01331207, + 0x01332234, 0x01333234, 0x01341139, 0x01343134, + 0x01344134, 0x01348134, 0x0135220B, 0x0136110B, + 0x01365224, 0x01411102, 0x01412104, 0x01431239, + 0x01432239, 0x0143320A, 0x01435134, 0x01443107, + 0x01444134, 0x01446134, 0x0145220E, 0x01455134, + 0x0147110E, 0x01511102, 0x01521239, 0x01531239, + 0x01532239, 0x01533107, 0x0155220E, 0x01555134, + 0x0157110E, 0x01611107, 0x01621239, 0x01631239, + 0x01661139, 0x01666134, 0x01711107, 0x01721239, + 0x01745107, 0x0177110C, 0x01811107, 0x01821107, + 0x0185110C, 0x0188210C, 0x01911107, 0x01933139, + 0x01A11107, 0x01A31139, 0x01F5220E, 0x02000001, + 0x02000127, 0x02000427, 0x02000727, 0x02000E2F, + 0x02110000, 0x02111200, 0x02111411, 0x02111827, + 0x02111F2F, 0x02112411, 0x02112715, 0x02113200, + 0x02113411, 0x02113715, 0x02114200, 0x02121200, + 0x02121301, 0x02121F2F, 0x02122200, 0x02122615, + 0x02122F2F, 0x02123311, 0x02123F2F, 0x02124411, + 0x02131211, 0x02132311, 0x02133211, 0x02184415, + 0x02211200, 0x02211311, 0x02211F2F, 0x02212311, + 0x02212F2F, 0x02213211, 0x02221201, 0x02221311, + 0x02221F2F, 0x02222311, 0x02222F2F, 0x02223211, + 0x02223F2F, 0x02231211, 0x02232211, 0x02232F2F, + 0x02233211, 0x02233F2F, 0x02287515, 0x022DAB17, + 0x02311211, 0x02311527, 0x02312211, 0x02321211, + 0x02322211, 0x02322F2F, 0x02323311, 0x02323F2F, + 0x02331211, 0x02332211, 0x02332F2F, 0x02333F2F, + 0x0237FF17, 0x02385615, 0x023D9517, 0x02410027, + 0x02487827, 0x024E3117, 0x024FFF2F, 0x02598627, + 0x025DFF2F, 0x025FFF2F, 0x02687827, 0x026DFA17, + 0x026FFF2F, 0x02796427, 0x027E4217, 0x027FFF2F, + 0x02888727, 0x028EFF2F, 0x028FFF2F, 0x02984327, + 0x029F112F, 0x029FFF2F, 0x02A76527, 0x02AEF717, + 0x02AFFF2F, 0x02B7C827, 0x02BEF917, 0x02BFFF2F, + 0x02C66527, 0x02CD5517, 0x02CFFF2F, 0x02D63227, + 0x02DDD527, 0x02DFFF2B, 0x02E84717, 0x02EEE327, + 0x02EFFF2F, 0x02F54527, 0x02FCF817, 0x02FFEF2B, + 0x02FFFA2F, 0x02FFFE2F, 0x03000127, 0x03000201, + 0x03111200, 0x03122115, 0x03123200, 0x03133211, + 0x03211200, 0x03213127, 0x03221200, 0x03345215, + 0x04000F17, 0x04122F17, 0x043F6515, 0x043FFF17, + 0x044F5527, 0x044FFF17, 0x045F0017, 0x045FFF17, + 0x046F6517, 0x04710027, 0x047F4427, 0x04810027, + 0x048EFA15, 0x048FFF2F, 0x049F4427, 0x049FFF2F, + 0x04AEA727, 0x04AFFF2F, 0x04BE9C15, 0x04BFFF2F, + 0x04CE5427, 0x04CFFF2F, 0x04DE3527, 0x04DFFF17, + 0x04EE4627, 0x04EFFF17, 0x04FEF327, 0x04FFFF2F, + 0x06000F27, 0x069FFF17, 0x06FFFF17, 0x08110017, + 0x08EFFF15, 0xFFFFFF00 +}; + /* @name swb_offsets * Sample offset into the window indicating the beginning of a scalefactor * window band @@ -1430,6 +1814,99 @@ static const uint16_t swb_offset_120_8[] = 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 120 }; +static const uint16_t swb_offset_768_96[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, + 40, 44, 48, 52, 56, 64, 72, 80, 88, 96, + 108, 120, 132, 144, 156, 172, 188, 212, 240, 276, + 320, 384, 448, 512, 576, 640, 704, 768 +}; + +static const uint16_t swb_offset_768_64[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, + 44, 48, 52, 56, 64, 72, 80, 88, 100, 112, 124, + 140, 156, 172, 192, 216, 240, 268, 304, 344, 384, 424, + 464, 504, 544, 584, 624, 664, 704, 744, 768 +}; + +static const uint16_t swb_offset_768_48[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, + 56, 64, 72, 80, 88, 96, 108, 120, 132, 144, 160, 176, + 196, 216, 240, 264, 292, 320, 352, 384, 416, 448, 480, 512, + 544, 576, 608, 640, 672, 704, 736, 768 +}; + +static const uint16_t swb_offset_768_32[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, + 56, 64, 72, 80, 88, 96, 108, 120, 132, 144, 160, 176, + 196, 216, 240, 264, 292, 320, 352, 384, 416, 448, 480, 512, + 544, 576, 608, 640, 672, 704, 736, 768 +}; + +static const uint16_t swb_offset_768_24[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, + 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 136, 148, + 160, 172, 188, 204, 220, 240, 260, 284, 308, 336, 364, 396, + 432, 468, 508, 552, 600, 652, 704, 768 +}; + +static const uint16_t swb_offset_768_16[] = +{ + 0, 8, 16, 24, 32, 40, 48, 56, 64, + 72, 80, 88, 100, 112, 124, 136, 148, 160, + 172, 184, 196, 212, 228, 244, 260, 280, 300, + 320, 344, 368, 396, 424, 456, 492, 532, 572, + 616, 664, 716, 768 +}; + +static const uint16_t swb_offset_768_8[] = +{ + 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, + 120, 132, 144, 156, 172, 188, 204, 220, 236, 252, + 268, 288, 308, 328, 348, 372, 396, 420, 448, 476, + 508, 544, 580, 620, 664, 712, 764, 768 +}; + +static const uint16_t swb_offset_96_96[] = +{ + 0, 4, 8, 12, 16, 20, 24, + 32, 40, 48, 64, 92, 96 +}; + +static const uint16_t swb_offset_96_64[] = +{ + 0, 4, 8, 12, 16, 20, 24, + 32, 40, 48, 64, 92, 96 +}; + +static const uint16_t swb_offset_96_48[] = +{ + 0, 4, 8, 12, 16, 20, 28, + 36, 44, 56, 68, 80, 96 +}; + +static const uint16_t swb_offset_96_24[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 36, 44, 52, 64, 76, 92, 96 +}; + +static const uint16_t swb_offset_96_16[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 32, 40, 48, 60, 72, 88, 96 +}; + +static const uint16_t swb_offset_96_8[] = +{ + 0, 4, 8, 12, 16, 20, 24, 28, + 36, 44, 52, 60, 72, 88, 96 +}; + const uint16_t * const ff_swb_offset_1024[] = { swb_offset_1024_96, swb_offset_1024_96, swb_offset_1024_64, swb_offset_1024_48, swb_offset_1024_48, swb_offset_1024_32, @@ -1446,6 +1923,14 @@ const uint16_t * const ff_swb_offset_960[] = { swb_offset_960_8 }; +const uint16_t * const ff_swb_offset_768[] = { + swb_offset_768_96, swb_offset_768_96, swb_offset_768_64, + swb_offset_768_48, swb_offset_768_48, swb_offset_768_32, + swb_offset_768_24, swb_offset_768_24, swb_offset_768_16, + swb_offset_768_16, swb_offset_768_16, swb_offset_768_8, + swb_offset_768_8 +}; + const uint16_t * const ff_swb_offset_512[] = { NULL, NULL, NULL, swb_offset_512_48, swb_offset_512_48, swb_offset_512_32, @@ -1480,6 +1965,14 @@ const uint16_t * const ff_swb_offset_120[] = { swb_offset_120_8 }; +const uint16_t * const ff_swb_offset_96[] = { + swb_offset_96_96, swb_offset_96_96, swb_offset_96_96, + swb_offset_96_48, swb_offset_96_48, swb_offset_96_48, + swb_offset_96_24, swb_offset_96_24, swb_offset_96_16, + swb_offset_96_16, swb_offset_96_16, swb_offset_96_8, + swb_offset_96_8 +}; + // @} /* @name ff_tns_max_bands @@ -1505,6 +1998,11 @@ const uint8_t ff_tns_max_bands_128[] = { }; // @} +const uint8_t ff_usac_noise_fill_start_offset[2][2] = { + { 160, 20 }, + { 120, 15 }, +}; + const DECLARE_ALIGNED(32, float, ff_aac_eld_window_512)[1920] = { 0.00338834, 0.00567745, 0.00847677, 0.01172641, 0.01532555, 0.01917664, 0.02318809, 0.02729259, @@ -3377,3 +3875,65 @@ const DECLARE_ALIGNED(32, int, ff_aac_eld_window_480_fixed)[1800] = { 0xffecff1c, 0xffed391e, 0xffed740c, 0xffedafb1, 0xffedebe1, 0xffee287d, 0xffee654e, 0xffeea23f, }; + +/* As specified by ISO/IEC 23003 */ +#define USAC_EMPH_COEFF 0.68 + +DECLARE_ALIGNED(16, const float, ff_aac_deemph_weights)[16] = { + USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF, + + 0, + USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF*USAC_EMPH_COEFF, + + 0, + 0, + USAC_EMPH_COEFF, + USAC_EMPH_COEFF*USAC_EMPH_COEFF, + + 0, + 0, + 0, + USAC_EMPH_COEFF, +}; + +const int ff_aac_usac_samplerate[32] = { + 96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, + 16000, 12000, 11025, 8000, 7350, -1, -1, 57600, + 51200, 40000, 38400, 34150, 28800, 25600, 20000, 19200, + 17075, 14400, 12800, 9600, -1, -1, -1, -1, +}; + +/* Window type (only long+eight, start/stop/stopstart), sine+sine, kbd+kbd, sine+kbd, kbd+sine */ +const float ff_aac_usac_mdst_filt_cur[4 /* Window */][4 /* Shape */][7] = +{ + { { 0.000000, 0.000000, 0.500000, 0.000000, -0.500000, 0.000000, 0.000000 }, + { 0.091497, 0.000000, 0.581427, 0.000000, -0.581427, 0.000000, -0.091497 }, + { 0.045748, 0.057238, 0.540714, 0.000000, -0.540714, -0.057238, -0.045748 }, + { 0.045748, -0.057238, 0.540714, 0.000000, -0.540714, 0.057238, -0.045748 } }, + { { 0.102658, 0.103791, 0.567149, 0.000000, -0.567149, -0.103791, -0.102658 }, + { 0.150512, 0.047969, 0.608574, 0.000000, -0.608574, -0.047969, -0.150512 }, + { 0.104763, 0.105207, 0.567861, 0.000000, -0.567861, -0.105207, -0.104763 }, + { 0.148406, 0.046553, 0.607863, 0.000000, -0.607863, -0.046553, -0.148406 } }, + { { 0.102658, -0.103791, 0.567149, 0.000000, -0.567149, 0.103791, -0.102658 }, + { 0.150512, -0.047969, 0.608574, 0.000000, -0.608574, 0.047969, -0.150512 }, + { 0.148406, -0.046553, 0.607863, 0.000000, -0.607863, 0.046553, -0.148406 }, + { 0.104763, -0.105207, 0.567861, 0.000000, -0.567861, 0.105207, -0.104763 } }, + { { 0.205316, 0.000000, 0.634298, 0.000000, -0.634298, 0.000000, -0.205316 }, + { 0.209526, 0.000000, 0.635722, 0.000000, -0.635722, 0.000000, -0.209526 }, + { 0.207421, 0.001416, 0.635010, 0.000000, -0.635010, -0.001416, -0.207421 }, + { 0.207421, -0.001416, 0.635010, 0.000000, -0.635010, 0.001416, -0.207421 } } +}; + +/* Window type (everything/longstop+stopstart), sine or kbd */ +const float ff_aac_usac_mdst_filt_prev[2 /* Window */][2 /* sine/kbd */][7] = +{ + { { 0.000000, 0.106103, 0.250000, 0.318310, 0.250000, 0.106103, 0.000000 }, + { 0.059509, 0.123714, 0.186579, 0.213077, 0.186579, 0.123714, 0.059509 } }, + { { 0.038498, 0.039212, 0.039645, 0.039790, 0.039645, 0.039212, 0.038498 }, + { 0.026142, 0.026413, 0.026577, 0.026631, 0.026577, 0.026413, 0.026142 } } +}; diff --git a/src/ExtLib/ffmpeg/libavcodec/aactab.h b/src/ExtLib/ffmpeg/libavcodec/aactab.h index e199aed781..d140b3524e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aactab.h +++ b/src/ExtLib/ffmpeg/libavcodec/aactab.h @@ -64,6 +64,8 @@ DECLARE_ALIGNED(32, extern const float, ff_aac_eld_window_480)[1800]; DECLARE_ALIGNED(32, extern const int, ff_aac_eld_window_480_fixed)[1800]; // @} +extern const float ff_aac_deemph_weights[16]; + /* Initializes data shared between float decoder and encoder. */ void ff_aac_float_common_init(void); @@ -72,10 +74,12 @@ void ff_aac_float_common_init(void); */ extern const uint8_t ff_aac_num_swb_1024[]; extern const uint8_t ff_aac_num_swb_960 []; +extern const uint8_t ff_aac_num_swb_768 []; extern const uint8_t ff_aac_num_swb_512 []; extern const uint8_t ff_aac_num_swb_480 []; extern const uint8_t ff_aac_num_swb_128 []; extern const uint8_t ff_aac_num_swb_120 []; +extern const uint8_t ff_aac_num_swb_96 []; // @} extern const uint8_t ff_aac_pred_sfb_max []; @@ -91,16 +95,34 @@ extern const float *const ff_aac_codebook_vectors[]; extern const float *const ff_aac_codebook_vector_vals[]; extern const uint16_t *const ff_aac_codebook_vector_idx[]; +extern const uint16_t ff_aac_ac_msb_cdfs[64][17]; +extern const uint16_t ff_aac_ac_lsb_cdfs[3][4]; +extern const uint8_t ff_aac_ac_lookup_m[742]; +extern const uint32_t ff_aac_ac_hash_m[742]; +extern const uint16_t ff_aac_ac_cf_m[64][17]; + extern const uint16_t * const ff_swb_offset_1024[13]; extern const uint16_t * const ff_swb_offset_960 [13]; +extern const uint16_t * const ff_swb_offset_768 [13]; extern const uint16_t * const ff_swb_offset_512 [13]; extern const uint16_t * const ff_swb_offset_480 [13]; extern const uint16_t * const ff_swb_offset_128 [13]; extern const uint16_t * const ff_swb_offset_120 [13]; +extern const uint16_t * const ff_swb_offset_96 [13]; extern const uint8_t ff_tns_max_bands_1024[13]; extern const uint8_t ff_tns_max_bands_512 [13]; extern const uint8_t ff_tns_max_bands_480 [13]; extern const uint8_t ff_tns_max_bands_128 [13]; +/* [x][y], x == 1 -> frame len is 768 frames, y == 1 -> is eight_short */ +extern const uint8_t ff_usac_noise_fill_start_offset[2][2]; + +extern const int ff_aac_usac_samplerate[32]; + +/* Window type (only long+eight, start/stop/stopstart), sine+sine, kbd+kbd, sine+kbd, kbd+sine */ +extern const float ff_aac_usac_mdst_filt_cur[4 /* Window */][4 /* Shape */][7]; +/* Window type (everything/longstop+stopstart), sine or kbd */ +extern const float ff_aac_usac_mdst_filt_prev[2 /* Window */][2 /* sine/kbd */][7]; + #endif /* AVCODEC_AACTAB_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c b/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c index c99b4a1ca7..0afa752825 100644 --- a/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c @@ -53,7 +53,7 @@ static int d3d12va_hevc_start_frame(AVCodecContext *avctx, av_unused const uint8 { const HEVCContext *h = avctx->priv_data; D3D12VADecodeContext *ctx = D3D12VA_DECODE_CONTEXT(avctx); - HEVCDecodePictureContext *ctx_pic = h->ref->hwaccel_picture_private; + HEVCDecodePictureContext *ctx_pic = h->cur_frame->hwaccel_picture_private; if (!ctx) return -1; @@ -78,7 +78,7 @@ static int d3d12va_hevc_start_frame(AVCodecContext *avctx, av_unused const uint8 static int d3d12va_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { const HEVCContext *h = avctx->priv_data; - const HEVCFrame *current_picture = h->ref; + const HEVCFrame *current_picture = h->cur_frame; HEVCDecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private; unsigned position; @@ -101,7 +101,7 @@ static int d3d12va_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffe static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer) { const HEVCContext *h = avctx->priv_data; - const HEVCFrame *current_picture = h->ref; + const HEVCFrame *current_picture = h->cur_frame; HEVCDecodePictureContext *ctx_pic = current_picture->hwaccel_picture_private; int i; @@ -151,14 +151,14 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU static int d3d12va_hevc_end_frame(AVCodecContext *avctx) { HEVCContext *h = avctx->priv_data; - HEVCDecodePictureContext *ctx_pic = h->ref->hwaccel_picture_private; + HEVCDecodePictureContext *ctx_pic = h->cur_frame->hwaccel_picture_private; int scale = ctx_pic->pp.dwCodingParamToolFlags & 1; if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; - return ff_d3d12va_common_end_frame(avctx, h->ref->frame, &ctx_pic->pp, sizeof(ctx_pic->pp), + return ff_d3d12va_common_end_frame(avctx, h->cur_frame->f, &ctx_pic->pp, sizeof(ctx_pic->pp), scale ? &ctx_pic->qm : NULL, scale ? sizeof(ctx_pic->qm) : 0, update_input_arguments); } diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c index 6e03e849a7..c67580b8a9 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c @@ -67,7 +67,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo // ==> End patch MPC { const HEVCContext *h = avctx->priv_data; - const HEVCFrame *current_picture = h->ref; + const HEVCFrame *current_picture = h->cur_frame; const HEVCSPS *sps = h->ps.sps; const HEVCPPS *pps = h->ps.pps; int i, j; @@ -211,7 +211,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo } if (frame) { - fill_picture_entry(&pp->RefPicList[i], ff_dxva2_get_surface_index(avctx, ctx, frame->frame, 0), !!(frame->flags & HEVC_FRAME_FLAG_LONG_REF)); + fill_picture_entry(&pp->RefPicList[i], ff_dxva2_get_surface_index(avctx, ctx, frame->f, 0), !!(frame->flags & HEVC_FRAME_FLAG_LONG_REF)); pp->PicOrderCntValList[i] = frame->poc; } else { pp->RefPicList[i].bPicEntry = 0xff; @@ -219,7 +219,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo } } - fill_picture_entry(&pp->CurrPic, ff_dxva2_get_surface_index(avctx, ctx, current_picture->frame, 1), 0); + fill_picture_entry(&pp->CurrPic, ff_dxva2_get_surface_index(avctx, ctx, current_picture->f, 1), 0); #define DO_REF_LIST(ref_idx, ref_list) { \ const RefPicList *rpl = &h->rps[ref_idx]; \ @@ -228,7 +228,7 @@ void ff_dxva2_hevc_fill_picture_parameters(const AVCodecContext *avctx, AVDXVACo while (!frame && j < rpl->nb_refs) \ frame = rpl->ref[j++]; \ if (frame && frame->flags & (HEVC_FRAME_FLAG_LONG_REF | HEVC_FRAME_FLAG_SHORT_REF)) \ - pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->frame, 0)); \ + pp->ref_list[i] = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, frame->f, 0)); \ else \ pp->ref_list[i] = 0xff; \ } \ @@ -286,7 +286,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, { const HEVCContext *h = avctx->priv_data; AVDXVAContext *ctx = DXVA_CONTEXT(avctx); - const HEVCFrame *current_picture = h->ref; + const HEVCFrame *current_picture = h->cur_frame; struct hevc_dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; DXVA_Slice_HEVC_Short *slice = NULL; void *dxva_data_ptr; @@ -405,7 +405,7 @@ static int dxva2_hevc_start_frame(AVCodecContext *avctx, { const HEVCContext *h = avctx->priv_data; AVDXVAContext *ctx = DXVA_CONTEXT(avctx); - struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private; + struct hevc_dxva2_picture_context *ctx_pic = h->cur_frame->hwaccel_picture_private; if (!DXVA_CONTEXT_VALID(avctx, ctx)) return -1; @@ -428,7 +428,7 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx, uint32_t size) { const HEVCContext *h = avctx->priv_data; - const HEVCFrame *current_picture = h->ref; + const HEVCFrame *current_picture = h->cur_frame; struct hevc_dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; unsigned position; @@ -449,7 +449,7 @@ static int dxva2_hevc_decode_slice(AVCodecContext *avctx, static int dxva2_hevc_end_frame(AVCodecContext *avctx) { HEVCContext *h = avctx->priv_data; - struct hevc_dxva2_picture_context *ctx_pic = h->ref->hwaccel_picture_private; + struct hevc_dxva2_picture_context *ctx_pic = h->cur_frame->hwaccel_picture_private; // ==> Start patch MPC //int scale = ctx_pic->pp.dwCodingParamToolFlags & 1; int scale = ctx_pic->pp.main.dwCodingParamToolFlags & 1; @@ -460,7 +460,7 @@ static int dxva2_hevc_end_frame(AVCodecContext *avctx) if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; - ret = ff_dxva2_common_end_frame(avctx, h->ref->frame, + ret = ff_dxva2_common_end_frame(avctx, h->cur_frame->f, // ==> Start patch MPC //&ctx_pic->pp, sizeof(ctx_pic->pp), &ctx_pic->pp, rext ? sizeof(ctx_pic->pp) : sizeof(ctx_pic->pp.main), diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c b/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c index 2e639a7e41..c9da4d7fc1 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c @@ -427,16 +427,6 @@ static int cabac_reinit(HEVCLocalContext *lc) return skip_bytes(&lc->cc, 0) == NULL ? AVERROR_INVALIDDATA : 0; } -static int cabac_init_decoder(HEVCLocalContext *lc) -{ - GetBitContext *gb = &lc->gb; - skip_bits(gb, 1); - align_get_bits(gb); - return ff_init_cabac_decoder(&lc->cc, - gb->buffer + get_bits_count(gb) / 8, - (get_bits_left(gb) + 7) / 8); -} - static void cabac_init_state(HEVCLocalContext *lc, const HEVCContext *s) { int init_type = 2 - s->sh.slice_type; @@ -461,12 +451,13 @@ static void cabac_init_state(HEVCLocalContext *lc, const HEVCContext *s) lc->stat_coeff[i] = 0; } -int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts) +int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts, + const uint8_t *data, size_t size) { const HEVCContext *const s = lc->parent; if (ctb_addr_ts == s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_ctb_addr_rs]) { - int ret = cabac_init_decoder(lc); + int ret = ff_init_cabac_decoder(&lc->cc, data, size); if (ret < 0) return ret; if (s->sh.dependent_slice_segment_flag == 0 || @@ -490,7 +481,7 @@ int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts) if (s->threads_number == 1) ret = cabac_reinit(lc); else { - ret = cabac_init_decoder(lc); + ret = ff_init_cabac_decoder(&lc->cc, data, size); } if (ret < 0) return ret; @@ -503,7 +494,7 @@ int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts) if (s->threads_number == 1) ret = cabac_reinit(lc); else { - ret = cabac_init_decoder(lc); + ret = ff_init_cabac_decoder(&lc->cc, data, size); } if (ret < 0) return ret; @@ -1011,10 +1002,10 @@ void ff_hevc_hls_residual_coding(HEVCLocalContext *lc, int x0, int y0, const uint8_t *scan_x_cg, *scan_y_cg, *scan_x_off, *scan_y_off; - ptrdiff_t stride = s->frame->linesize[c_idx]; + ptrdiff_t stride = s->cur_frame->f->linesize[c_idx]; int hshift = s->ps.sps->hshift[c_idx]; int vshift = s->ps.sps->vshift[c_idx]; - uint8_t *dst = &s->frame->data[c_idx][(y0 >> vshift) * stride + + uint8_t *dst = &s->cur_frame->f->data[c_idx][(y0 >> vshift) * stride + ((x0 >> hshift) << s->ps.sps->pixel_shift)]; int16_t *coeffs = (int16_t*)(c_idx ? lc->edge_emu_buffer2 : lc->edge_emu_buffer); uint8_t significant_coeff_group_flag[8][8] = {{0}}; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c b/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c index 6bc3019147..db7525170d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c @@ -315,13 +315,13 @@ static void sao_filter_CTB(HEVCLocalContext *lc, const HEVCContext *s, int x, in for (c_idx = 0; c_idx < (s->ps.sps->chroma_format_idc ? 3 : 1); c_idx++) { int x0 = x >> s->ps.sps->hshift[c_idx]; int y0 = y >> s->ps.sps->vshift[c_idx]; - ptrdiff_t stride_src = s->frame->linesize[c_idx]; + ptrdiff_t stride_src = s->cur_frame->f->linesize[c_idx]; int ctb_size_h = (1 << (s->ps.sps->log2_ctb_size)) >> s->ps.sps->hshift[c_idx]; int ctb_size_v = (1 << (s->ps.sps->log2_ctb_size)) >> s->ps.sps->vshift[c_idx]; int width = FFMIN(ctb_size_h, (s->ps.sps->width >> s->ps.sps->hshift[c_idx]) - x0); int height = FFMIN(ctb_size_v, (s->ps.sps->height >> s->ps.sps->vshift[c_idx]) - y0); int tab = sao_tab[(FFALIGN(width, 8) >> 3) - 1]; - uint8_t *src = &s->frame->data[c_idx][y0 * stride_src + (x0 << s->ps.sps->pixel_shift)]; + uint8_t *src = &s->cur_frame->f->data[c_idx][y0 * stride_src + (x0 << s->ps.sps->pixel_shift)]; ptrdiff_t stride_dst; uint8_t *dst; @@ -484,6 +484,9 @@ static int get_pcm(const HEVCContext *s, int x, int y) static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) { + uint8_t **data = s->cur_frame->f->data; + int *linesize = s->cur_frame->f->linesize; + uint8_t *src; int x, y; int chroma, beta; @@ -537,18 +540,16 @@ static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) tc[0] = bs0 ? TC_CALC(qp, bs0) : 0; tc[1] = bs1 ? TC_CALC(qp, bs1) : 0; - src = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->ps.sps->pixel_shift)]; + src = &data[LUMA][y * linesize[LUMA] + (x << s->ps.sps->pixel_shift)]; if (pcmf) { no_p[0] = get_pcm(s, x - 1, y); no_p[1] = get_pcm(s, x - 1, y + 4); no_q[0] = get_pcm(s, x, y); no_q[1] = get_pcm(s, x, y + 4); - s->hevcdsp.hevc_v_loop_filter_luma_c(src, - s->frame->linesize[LUMA], + s->hevcdsp.hevc_v_loop_filter_luma_c(src, linesize[LUMA], beta, tc, no_p, no_q); } else - s->hevcdsp.hevc_v_loop_filter_luma(src, - s->frame->linesize[LUMA], + s->hevcdsp.hevc_v_loop_filter_luma(src, linesize[LUMA], beta, tc, no_p, no_q); } } @@ -569,18 +570,16 @@ static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) beta = betatable[av_clip(qp + beta_offset, 0, MAX_QP)]; tc[0] = bs0 ? TC_CALC(qp, bs0) : 0; tc[1] = bs1 ? TC_CALC(qp, bs1) : 0; - src = &s->frame->data[LUMA][y * s->frame->linesize[LUMA] + (x << s->ps.sps->pixel_shift)]; + src = &data[LUMA][y * linesize[LUMA] + (x << s->ps.sps->pixel_shift)]; if (pcmf) { no_p[0] = get_pcm(s, x, y - 1); no_p[1] = get_pcm(s, x + 4, y - 1); no_q[0] = get_pcm(s, x, y); no_q[1] = get_pcm(s, x + 4, y); - s->hevcdsp.hevc_h_loop_filter_luma_c(src, - s->frame->linesize[LUMA], + s->hevcdsp.hevc_h_loop_filter_luma_c(src, linesize[LUMA], beta, tc, no_p, no_q); } else - s->hevcdsp.hevc_h_loop_filter_luma(src, - s->frame->linesize[LUMA], + s->hevcdsp.hevc_h_loop_filter_luma(src, linesize[LUMA], beta, tc, no_p, no_q); } } @@ -603,18 +602,16 @@ static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) c_tc[0] = (bs0 == 2) ? chroma_tc(s, qp0, chroma, tc_offset) : 0; c_tc[1] = (bs1 == 2) ? chroma_tc(s, qp1, chroma, tc_offset) : 0; - src = &s->frame->data[chroma][(y >> s->ps.sps->vshift[chroma]) * s->frame->linesize[chroma] + ((x >> s->ps.sps->hshift[chroma]) << s->ps.sps->pixel_shift)]; + src = &data[chroma][(y >> s->ps.sps->vshift[chroma]) * linesize[chroma] + ((x >> s->ps.sps->hshift[chroma]) << s->ps.sps->pixel_shift)]; if (pcmf) { no_p[0] = get_pcm(s, x - 1, y); no_p[1] = get_pcm(s, x - 1, y + (4 * v)); no_q[0] = get_pcm(s, x, y); no_q[1] = get_pcm(s, x, y + (4 * v)); - s->hevcdsp.hevc_v_loop_filter_chroma_c(src, - s->frame->linesize[chroma], + s->hevcdsp.hevc_v_loop_filter_chroma_c(src, linesize[chroma], c_tc, no_p, no_q); } else - s->hevcdsp.hevc_v_loop_filter_chroma(src, - s->frame->linesize[chroma], + s->hevcdsp.hevc_v_loop_filter_chroma(src, linesize[chroma], c_tc, no_p, no_q); } } @@ -636,18 +633,16 @@ static void deblocking_filter_CTB(const HEVCContext *s, int x0, int y0) c_tc[0] = bs0 == 2 ? chroma_tc(s, qp0, chroma, tc_offset) : 0; c_tc[1] = bs1 == 2 ? chroma_tc(s, qp1, chroma, cur_tc_offset) : 0; - src = &s->frame->data[chroma][(y >> s->ps.sps->vshift[1]) * s->frame->linesize[chroma] + ((x >> s->ps.sps->hshift[1]) << s->ps.sps->pixel_shift)]; + src = &data[chroma][(y >> s->ps.sps->vshift[1]) * linesize[chroma] + ((x >> s->ps.sps->hshift[1]) << s->ps.sps->pixel_shift)]; if (pcmf) { no_p[0] = get_pcm(s, x, y - 1); no_p[1] = get_pcm(s, x + (4 * h), y - 1); no_q[0] = get_pcm(s, x, y); no_q[1] = get_pcm(s, x + (4 * h), y); - s->hevcdsp.hevc_h_loop_filter_chroma_c(src, - s->frame->linesize[chroma], + s->hevcdsp.hevc_h_loop_filter_chroma_c(src, linesize[chroma], c_tc, no_p, no_q); } else - s->hevcdsp.hevc_h_loop_filter_chroma(src, - s->frame->linesize[chroma], + s->hevcdsp.hevc_h_loop_filter_chroma(src, linesize[chroma], c_tc, no_p, no_q); } } @@ -661,8 +656,8 @@ static int boundary_strength(const HEVCContext *s, const MvField *curr, const Mv { if (curr->pred_flag == PF_BI && neigh->pred_flag == PF_BI) { // same L0 and L1 - if (s->ref->refPicList[0].list[curr->ref_idx[0]] == neigh_refPicList[0].list[neigh->ref_idx[0]] && - s->ref->refPicList[0].list[curr->ref_idx[0]] == s->ref->refPicList[1].list[curr->ref_idx[1]] && + if (s->cur_frame->refPicList[0].list[curr->ref_idx[0]] == neigh_refPicList[0].list[neigh->ref_idx[0]] && + s->cur_frame->refPicList[0].list[curr->ref_idx[0]] == s->cur_frame->refPicList[1].list[curr->ref_idx[1]] && neigh_refPicList[0].list[neigh->ref_idx[0]] == neigh_refPicList[1].list[neigh->ref_idx[1]]) { if ((FFABS(neigh->mv[0].x - curr->mv[0].x) >= 4 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 4 || FFABS(neigh->mv[1].x - curr->mv[1].x) >= 4 || FFABS(neigh->mv[1].y - curr->mv[1].y) >= 4) && @@ -671,15 +666,15 @@ static int boundary_strength(const HEVCContext *s, const MvField *curr, const Mv return 1; else return 0; - } else if (neigh_refPicList[0].list[neigh->ref_idx[0]] == s->ref->refPicList[0].list[curr->ref_idx[0]] && - neigh_refPicList[1].list[neigh->ref_idx[1]] == s->ref->refPicList[1].list[curr->ref_idx[1]]) { + } else if (neigh_refPicList[0].list[neigh->ref_idx[0]] == s->cur_frame->refPicList[0].list[curr->ref_idx[0]] && + neigh_refPicList[1].list[neigh->ref_idx[1]] == s->cur_frame->refPicList[1].list[curr->ref_idx[1]]) { if (FFABS(neigh->mv[0].x - curr->mv[0].x) >= 4 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 4 || FFABS(neigh->mv[1].x - curr->mv[1].x) >= 4 || FFABS(neigh->mv[1].y - curr->mv[1].y) >= 4) return 1; else return 0; - } else if (neigh_refPicList[1].list[neigh->ref_idx[1]] == s->ref->refPicList[0].list[curr->ref_idx[0]] && - neigh_refPicList[0].list[neigh->ref_idx[0]] == s->ref->refPicList[1].list[curr->ref_idx[1]]) { + } else if (neigh_refPicList[1].list[neigh->ref_idx[1]] == s->cur_frame->refPicList[0].list[curr->ref_idx[0]] && + neigh_refPicList[0].list[neigh->ref_idx[0]] == s->cur_frame->refPicList[1].list[curr->ref_idx[1]]) { if (FFABS(neigh->mv[1].x - curr->mv[0].x) >= 4 || FFABS(neigh->mv[1].y - curr->mv[0].y) >= 4 || FFABS(neigh->mv[0].x - curr->mv[1].x) >= 4 || FFABS(neigh->mv[0].y - curr->mv[1].y) >= 4) return 1; @@ -694,10 +689,10 @@ static int boundary_strength(const HEVCContext *s, const MvField *curr, const Mv if (curr->pred_flag & 1) { A = curr->mv[0]; - ref_A = s->ref->refPicList[0].list[curr->ref_idx[0]]; + ref_A = s->cur_frame->refPicList[0].list[curr->ref_idx[0]]; } else { A = curr->mv[1]; - ref_A = s->ref->refPicList[1].list[curr->ref_idx[1]]; + ref_A = s->cur_frame->refPicList[1].list[curr->ref_idx[1]]; } if (neigh->pred_flag & 1) { @@ -724,7 +719,7 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, int x0, int y0, int log2_trafo_size) { const HEVCContext *s = lc->parent; - const MvField *tab_mvf = s->ref->tab_mvf; + const MvField *tab_mvf = s->cur_frame->tab_mvf; int log2_min_pu_size = s->ps.sps->log2_min_pu_size; int log2_min_tu_size = s->ps.sps->log2_min_tb_size; int min_pu_width = s->ps.sps->min_pu_width; @@ -746,8 +741,8 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, int x0, int y0, if (boundary_upper) { const RefPicList *rpl_top = (lc->boundary_flags & BOUNDARY_UPPER_SLICE) ? - ff_hevc_get_ref_list(s, s->ref, x0, y0 - 1) : - s->ref->refPicList; + ff_hevc_get_ref_list(s, s->cur_frame, x0, y0 - 1) : + s->cur_frame->refPicList; int yp_pu = (y0 - 1) >> log2_min_pu_size; int yq_pu = y0 >> log2_min_pu_size; int yp_tu = (y0 - 1) >> log2_min_tu_size; @@ -784,8 +779,8 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, int x0, int y0, if (boundary_left) { const RefPicList *rpl_left = (lc->boundary_flags & BOUNDARY_LEFT_SLICE) ? - ff_hevc_get_ref_list(s, s->ref, x0 - 1, y0) : - s->ref->refPicList; + ff_hevc_get_ref_list(s, s->cur_frame, x0 - 1, y0) : + s->cur_frame->refPicList; int xp_pu = (x0 - 1) >> log2_min_pu_size; int xq_pu = x0 >> log2_min_pu_size; int xp_tu = (x0 - 1) >> log2_min_tu_size; @@ -810,7 +805,7 @@ void ff_hevc_deblocking_boundary_strengths(HEVCLocalContext *lc, int x0, int y0, } if (log2_trafo_size > log2_min_pu_size && !is_intra) { - const RefPicList *rpl = s->ref->refPicList; + const RefPicList *rpl = s->cur_frame->refPicList; // bs for TU internal horizontal PU boundaries for (j = 8; j < (1 << log2_trafo_size); j += 8) { @@ -874,15 +869,15 @@ void ff_hevc_hls_filter(HEVCLocalContext *lc, int x, int y, int ctb_size) if (y && x_end) { sao_filter_CTB(lc, s, x, y - ctb_size); if (s->threads_type & FF_THREAD_FRAME ) - ff_progress_frame_report(&s->ref->tf, y); + ff_progress_frame_report(&s->cur_frame->tf, y); } if (x_end && y_end) { sao_filter_CTB(lc, s, x , y); if (s->threads_type & FF_THREAD_FRAME ) - ff_progress_frame_report(&s->ref->tf, y + ctb_size); + ff_progress_frame_report(&s->cur_frame->tf, y + ctb_size); } } else if (s->threads_type & FF_THREAD_FRAME && x_end) - ff_progress_frame_report(&s->ref->tf, y + ctb_size - 4); + ff_progress_frame_report(&s->cur_frame->tf, y + ctb_size - 4); } void ff_hevc_hls_filters(HEVCLocalContext *lc, int x_ctb, int y_ctb, int ctb_size) diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c b/src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c index 5591919e2e..b56f0bece5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c @@ -165,7 +165,7 @@ static int derive_temporal_colocated_mvs(const HEVCContext *s, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, const RefPicList *refPicList_col) { - const RefPicList *refPicList = s->ref->refPicList; + const RefPicList *refPicList = s->cur_frame->refPicList; if (temp_col.pred_flag == PF_INTRA) return 0; @@ -291,8 +291,8 @@ static void derive_spatial_merge_candidates(HEVCLocalContext *lc, const HEVCCont int merge_idx, struct MvField mergecandlist[]) { - const RefPicList *refPicList = s->ref->refPicList; - const MvField *tab_mvf = s->ref->tab_mvf; + const RefPicList *refPicList = s->cur_frame->refPicList; + const MvField *tab_mvf = s->cur_frame->tab_mvf; const int min_pu_width = s->ps.sps->min_pu_width; @@ -514,8 +514,8 @@ static av_always_inline void dist_scale(const HEVCContext *s, Mv *mv, int min_pu_width, int x, int y, int elist, int ref_idx_curr, int ref_idx) { - const RefPicList *refPicList = s->ref->refPicList; - const MvField *tab_mvf = s->ref->tab_mvf; + const RefPicList *refPicList = s->cur_frame->refPicList; + const MvField *tab_mvf = s->cur_frame->tab_mvf; int ref_pic_elist = refPicList[elist].list[TAB_MVF(x, y).ref_idx[elist]]; int ref_pic_curr = refPicList[ref_idx_curr].list[ref_idx]; @@ -530,10 +530,10 @@ static av_always_inline void dist_scale(const HEVCContext *s, Mv *mv, static int mv_mp_mode_mx(const HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx) { - const MvField *tab_mvf = s->ref->tab_mvf; + const MvField *tab_mvf = s->cur_frame->tab_mvf; int min_pu_width = s->ps.sps->min_pu_width; - const RefPicList *refPicList = s->ref->refPicList; + const RefPicList *refPicList = s->cur_frame->refPicList; if (((TAB_MVF(x, y).pred_flag) & (1 << pred_flag_index)) && refPicList[pred_flag_index].list[TAB_MVF(x, y).ref_idx[pred_flag_index]] == refPicList[ref_idx_curr].list[ref_idx]) { @@ -546,10 +546,10 @@ static int mv_mp_mode_mx(const HEVCContext *s, int x, int y, int pred_flag_index static int mv_mp_mode_mx_lt(const HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx) { - const MvField *tab_mvf = s->ref->tab_mvf; + const MvField *tab_mvf = s->cur_frame->tab_mvf; int min_pu_width = s->ps.sps->min_pu_width; - const RefPicList *refPicList = s->ref->refPicList; + const RefPicList *refPicList = s->cur_frame->refPicList; if ((TAB_MVF(x, y).pred_flag) & (1 << pred_flag_index)) { int currIsLongTerm = refPicList[ref_idx_curr].isLongTerm[ref_idx]; @@ -586,7 +586,7 @@ void ff_hevc_luma_mv_mvp_mode(HEVCLocalContext *lc, int x0, int y0, int nPbW, int mvp_lx_flag, int LX) { const HEVCContext *const s = lc->parent; - const MvField *const tab_mvf = s->ref->tab_mvf; + const MvField *const tab_mvf = s->cur_frame->tab_mvf; int isScaledFlag_L0 = 0; int availableFlagLXA0 = 1; int availableFlagLXB0 = 1; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c b/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c index d6dc2f9e0a..39ce70ca39 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c @@ -79,7 +79,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s) int i, j, ret; for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { HEVCFrame *frame = &s->DPB[i]; - if (frame->frame) + if (frame->f) continue; ret = ff_progress_frame_get_buffer(s->avctx, &frame->tf, @@ -104,10 +104,10 @@ static HEVCFrame *alloc_frame(HEVCContext *s) frame->rpl_tab[j] = frame->rpl; if (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) - frame->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; + frame->f->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST; if ((s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD) || (s->sei.picture_timing.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD)) - frame->frame->flags |= AV_FRAME_FLAG_INTERLACED; + frame->f->flags |= AV_FRAME_FLAG_INTERLACED; ret = ff_hwaccel_frame_priv_alloc(s->avctx, &frame->hwaccel_picture_private); if (ret < 0) @@ -122,7 +122,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s) return NULL; } -int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc) +int ff_hevc_set_new_ref(HEVCContext *s, int poc) { HEVCFrame *ref; int i; @@ -131,7 +131,7 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc) for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { HEVCFrame *frame = &s->DPB[i]; - if (frame->frame && frame->sequence == s->seq_decode && + if (frame->f && frame->sequence == s->seq_decode && frame->poc == poc) { av_log(s->avctx, AV_LOG_ERROR, "Duplicate POC in a sequence: %d.\n", poc); @@ -143,8 +143,7 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc) if (!ref) return AVERROR(ENOMEM); - *frame = ref->frame; - s->ref = ref; + s->cur_frame = ref; s->collocated_ref = NULL; if (s->sh.pic_output_flag) @@ -154,10 +153,10 @@ int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc) ref->poc = poc; ref->sequence = s->seq_decode; - ref->frame->crop_left = s->ps.sps->output_window.left_offset; - ref->frame->crop_right = s->ps.sps->output_window.right_offset; - ref->frame->crop_top = s->ps.sps->output_window.top_offset; - ref->frame->crop_bottom = s->ps.sps->output_window.bottom_offset; + ref->f->crop_left = s->ps.sps->output_window.left_offset; + ref->f->crop_right = s->ps.sps->output_window.right_offset; + ref->f->crop_top = s->ps.sps->output_window.top_offset; + ref->f->crop_bottom = s->ps.sps->output_window.bottom_offset; return 0; } @@ -212,7 +211,7 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush) if (nb_output) { HEVCFrame *frame = &s->DPB[min_idx]; - ret = av_frame_ref(out, frame->needs_fg ? frame->frame_grain : frame->frame); + ret = av_frame_ref(out, frame->needs_fg ? frame->frame_grain : frame->f); if (frame->flags & HEVC_FRAME_FLAG_BUMPING) ff_hevc_unref_frame(frame, HEVC_FRAME_FLAG_OUTPUT | HEVC_FRAME_FLAG_BUMPING); else @@ -220,7 +219,7 @@ int ff_hevc_output_frame(HEVCContext *s, AVFrame *out, int flush) if (ret < 0) return ret; - if (frame->needs_fg && (ret = av_frame_copy_props(out, frame->frame)) < 0) + if (frame->needs_fg && (ret = av_frame_copy_props(out, frame->f)) < 0) return ret; if (!(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN)) @@ -282,7 +281,7 @@ void ff_hevc_bump_frame(HEVCContext *s) static int init_slice_rpl(HEVCContext *s) { - HEVCFrame *frame = s->ref; + HEVCFrame *frame = s->cur_frame; int ctb_count = frame->ctb_count; int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[s->sh.slice_segment_addr]; int i; @@ -318,7 +317,7 @@ int ff_hevc_slice_rpl(HEVCContext *s) for (list_idx = 0; list_idx < nb_list; list_idx++) { RefPicList rpl_tmp = { { 0 } }; - RefPicList *rpl = &s->ref->refPicList[list_idx]; + RefPicList *rpl = &s->cur_frame->refPicList[list_idx]; /* The order of the elements is * ST_CURR_BEF - ST_CURR_AFT - LT_CURR for the L0 and @@ -340,8 +339,8 @@ int ff_hevc_slice_rpl(HEVCContext *s) } // Construct RefPicList0, RefPicList1 (8-8, 8-10) if (s->ps.pps->pps_curr_pic_ref_enabled_flag && rpl_tmp.nb_refs < HEVC_MAX_REFS) { - rpl_tmp.list[rpl_tmp.nb_refs] = s->ref->poc; - rpl_tmp.ref[rpl_tmp.nb_refs] = s->ref; + rpl_tmp.list[rpl_tmp.nb_refs] = s->cur_frame->poc; + rpl_tmp.ref[rpl_tmp.nb_refs] = s->cur_frame; rpl_tmp.isLongTerm[rpl_tmp.nb_refs] = 1; rpl_tmp.nb_refs++; } @@ -371,8 +370,8 @@ int ff_hevc_slice_rpl(HEVCContext *s) if (s->ps.pps->pps_curr_pic_ref_enabled_flag && !sh->rpl_modification_flag[list_idx] && rpl_tmp.nb_refs > sh->nb_refs[L0]) { - rpl->list[sh->nb_refs[L0] - 1] = s->ref->poc; - rpl->ref[sh->nb_refs[L0] - 1] = s->ref; + rpl->list[sh->nb_refs[L0] - 1] = s->cur_frame->poc; + rpl->ref[sh->nb_refs[L0] - 1] = s->cur_frame; } if (sh->collocated_list == list_idx && @@ -390,7 +389,7 @@ static HEVCFrame *find_ref_idx(HEVCContext *s, int poc, uint8_t use_msb) for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { HEVCFrame *ref = &s->DPB[i]; - if (ref->frame && ref->sequence == s->seq_decode) { + if (ref->f && ref->sequence == s->seq_decode) { if ((ref->poc & mask) == poc && (use_msb || ref->poc != s->poc)) return ref; } @@ -419,13 +418,13 @@ static HEVCFrame *generate_missing_ref(HEVCContext *s, int poc) if (!s->avctx->hwaccel) { if (!s->ps.sps->pixel_shift) { - for (i = 0; frame->frame->data[i]; i++) - memset(frame->frame->data[i], 1 << (s->ps.sps->bit_depth - 1), - frame->frame->linesize[i] * AV_CEIL_RSHIFT(s->ps.sps->height, s->ps.sps->vshift[i])); + for (i = 0; frame->f->data[i]; i++) + memset(frame->f->data[i], 1 << (s->ps.sps->bit_depth - 1), + frame->f->linesize[i] * AV_CEIL_RSHIFT(s->ps.sps->height, s->ps.sps->vshift[i])); } else { - for (i = 0; frame->frame->data[i]; i++) + for (i = 0; frame->f->data[i]; i++) for (y = 0; y < (s->ps.sps->height >> s->ps.sps->vshift[i]); y++) { - uint8_t *dst = frame->frame->data[i] + y * frame->frame->linesize[i]; + uint8_t *dst = frame->f->data[i] + y * frame->f->linesize[i]; AV_WN16(dst, 1 << (s->ps.sps->bit_depth - 1)); av_memcpy_backptr(dst + 2, 2, 2*(s->ps.sps->width >> s->ps.sps->hshift[i]) - 2); } @@ -448,7 +447,7 @@ static int add_candidate_ref(HEVCContext *s, RefPicList *list, { HEVCFrame *ref = find_ref_idx(s, poc, use_msb); - if (ref == s->ref || list->nb_refs >= HEVC_MAX_REFS) + if (ref == s->cur_frame || list->nb_refs >= HEVC_MAX_REFS) return AVERROR_INVALIDDATA; if (!ref) { @@ -483,7 +482,7 @@ int ff_hevc_frame_rps(HEVCContext *s) for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { HEVCFrame *frame = &s->DPB[i]; - if (frame == s->ref) + if (frame == s->cur_frame) continue; mark_ref(frame, 0); diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c b/src/ExtLib/ffmpeg/libavcodec/hevcdec.c index a230421bc0..b32b605cea 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevcdec.c @@ -617,15 +617,14 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, return ret; } -static int hls_slice_header(HEVCContext *s) +static int hls_slice_header(HEVCContext *s, GetBitContext *gb) { - GetBitContext *gb = &s->HEVClc->gb; SliceHeader *sh = &s->sh; int i, ret; // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); - if (s->ref && sh->first_slice_in_pic_flag) { + if (s->cur_frame && sh->first_slice_in_pic_flag) { av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n"); return 1; // This slice will be skipped later, do not corrupt state } @@ -999,8 +998,8 @@ static int hls_slice_header(HEVCContext *s) av_freep(&sh->offset); av_freep(&sh->size); sh->entry_point_offset = av_malloc_array(sh->num_entry_point_offsets, sizeof(unsigned)); - sh->offset = av_malloc_array(sh->num_entry_point_offsets, sizeof(int)); - sh->size = av_malloc_array(sh->num_entry_point_offsets, sizeof(int)); + sh->offset = av_malloc_array(sh->num_entry_point_offsets + 1, sizeof(int)); + sh->size = av_malloc_array(sh->num_entry_point_offsets + 1, sizeof(int)); if (!sh->entry_point_offset || !sh->offset || !sh->size) { sh->num_entry_point_offsets = 0; av_log(s->avctx, AV_LOG_ERROR, "Failed to allocate memory\n"); @@ -1029,6 +1028,13 @@ static int hls_slice_header(HEVCContext *s) skip_bits(gb, 8); // slice_header_extension_data_byte } + ret = get_bits1(gb); + if (!ret) { + av_log(s->avctx, AV_LOG_ERROR, "alignment_bit_equal_to_one=0\n"); + return AVERROR_INVALIDDATA; + } + sh->data_offset = align_get_bits(gb) - gb->buffer; + // Inferred parameters sh->slice_qp = 26U + s->ps.pps->pic_init_qp_minus26 + sh->slice_qp_delta; if (sh->slice_qp > 51 || @@ -1054,14 +1060,14 @@ static int hls_slice_header(HEVCContext *s) return AVERROR_INVALIDDATA; } - s->HEVClc->first_qp_group = !s->sh.dependent_slice_segment_flag; + s->local_ctx[0].first_qp_group = !s->sh.dependent_slice_segment_flag; if (!s->ps.pps->cu_qp_delta_enabled_flag) - s->HEVClc->qp_y = s->sh.slice_qp; + s->local_ctx[0].qp_y = s->sh.slice_qp; s->slice_initialized = 1; - s->HEVClc->tu.cu_qp_offset_cb = 0; - s->HEVClc->tu.cu_qp_offset_cr = 0; + s->local_ctx[0].tu.cu_qp_offset_cb = 0; + s->local_ctx[0].tu.cu_qp_offset_cr = 0; return 0; } @@ -1276,14 +1282,14 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0, log2_trafo_size_c, scan_idx_c, 1); else if (lc->tu.cross_pf) { - ptrdiff_t stride = s->frame->linesize[1]; + ptrdiff_t stride = s->cur_frame->f->linesize[1]; int hshift = s->ps.sps->hshift[1]; int vshift = s->ps.sps->vshift[1]; const int16_t *coeffs_y = (int16_t*)lc->edge_emu_buffer; int16_t *coeffs = (int16_t*)lc->edge_emu_buffer2; int size = 1 << log2_trafo_size_c; - uint8_t *dst = &s->frame->data[1][(y0 >> vshift) * stride + + uint8_t *dst = &s->cur_frame->f->data[1][(y0 >> vshift) * stride + ((x0 >> hshift) << s->ps.sps->pixel_shift)]; for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); @@ -1306,14 +1312,14 @@ static int hls_transform_unit(HEVCLocalContext *lc, int x0, int y0, log2_trafo_size_c, scan_idx_c, 2); else if (lc->tu.cross_pf) { - ptrdiff_t stride = s->frame->linesize[2]; + ptrdiff_t stride = s->cur_frame->f->linesize[2]; int hshift = s->ps.sps->hshift[2]; int vshift = s->ps.sps->vshift[2]; const int16_t *coeffs_y = (int16_t*)lc->edge_emu_buffer; int16_t *coeffs = (int16_t*)lc->edge_emu_buffer2; int size = 1 << log2_trafo_size_c; - uint8_t *dst = &s->frame->data[2][(y0 >> vshift) * stride + + uint8_t *dst = &s->cur_frame->f->data[2][(y0 >> vshift) * stride + ((x0 >> hshift) << s->ps.sps->pixel_shift)]; for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); @@ -1520,12 +1526,12 @@ static int hls_pcm_sample(HEVCLocalContext *lc, int x0, int y0, int log2_cb_size const HEVCContext *const s = lc->parent; GetBitContext gb; int cb_size = 1 << log2_cb_size; - ptrdiff_t stride0 = s->frame->linesize[0]; - ptrdiff_t stride1 = s->frame->linesize[1]; - ptrdiff_t stride2 = s->frame->linesize[2]; - uint8_t *dst0 = &s->frame->data[0][y0 * stride0 + (x0 << s->ps.sps->pixel_shift)]; - uint8_t *dst1 = &s->frame->data[1][(y0 >> s->ps.sps->vshift[1]) * stride1 + ((x0 >> s->ps.sps->hshift[1]) << s->ps.sps->pixel_shift)]; - uint8_t *dst2 = &s->frame->data[2][(y0 >> s->ps.sps->vshift[2]) * stride2 + ((x0 >> s->ps.sps->hshift[2]) << s->ps.sps->pixel_shift)]; + ptrdiff_t stride0 = s->cur_frame->f->linesize[0]; + ptrdiff_t stride1 = s->cur_frame->f->linesize[1]; + ptrdiff_t stride2 = s->cur_frame->f->linesize[2]; + uint8_t *dst0 = &s->cur_frame->f->data[0][y0 * stride0 + (x0 << s->ps.sps->pixel_shift)]; + uint8_t *dst1 = &s->cur_frame->f->data[1][(y0 >> s->ps.sps->vshift[1]) * stride1 + ((x0 >> s->ps.sps->hshift[1]) << s->ps.sps->pixel_shift)]; + uint8_t *dst2 = &s->cur_frame->f->data[2][(y0 >> s->ps.sps->vshift[2]) * stride2 + ((x0 >> s->ps.sps->hshift[2]) << s->ps.sps->pixel_shift)]; int length = cb_size * cb_size * s->ps.sps->pcm.bit_depth + (((cb_size >> s->ps.sps->hshift[1]) * (cb_size >> s->ps.sps->vshift[1])) + @@ -1594,7 +1600,7 @@ static void luma_mc_uni(HEVCLocalContext *lc, uint8_t *dst, ptrdiff_t dststride, if (x_off < QPEL_EXTRA_BEFORE || y_off < QPEL_EXTRA_AFTER || x_off >= pic_width - block_w - QPEL_EXTRA_AFTER || y_off >= pic_height - block_h - QPEL_EXTRA_AFTER || - ref == s->frame) { + ref == s->cur_frame->f) { const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << s->ps.sps->pixel_shift; int offset = QPEL_EXTRA_BEFORE * srcstride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shift); int buf_offset = QPEL_EXTRA_BEFORE * edge_emu_stride + (QPEL_EXTRA_BEFORE << s->ps.sps->pixel_shift); @@ -1744,7 +1750,7 @@ static void chroma_mc_uni(HEVCLocalContext *lc, uint8_t *dst0, intptr_t my = av_mod_uintp2(mv->y, 2 + vshift); intptr_t _mx = mx << (1 - hshift); intptr_t _my = my << (1 - vshift); - int emu = src0 == s->frame->data[1] || src0 == s->frame->data[2]; + int emu = src0 == s->cur_frame->f->data[1] || src0 == s->cur_frame->f->data[2]; x_off += mv->x >> (2 + hshift); y_off += mv->y >> (2 + vshift); @@ -1870,11 +1876,11 @@ static void chroma_mc_bi(HEVCLocalContext *lc, uint8_t *dst0, ptrdiff_t dststrid s->hevcdsp.put_hevc_epel[idx][!!my0][!!mx0](lc->tmp, src1, src1stride, block_h, _mx0, _my0, block_w); if (!weight_flag) - s->hevcdsp.put_hevc_epel_bi[idx][!!my1][!!mx1](dst0, s->frame->linesize[cidx+1], + s->hevcdsp.put_hevc_epel_bi[idx][!!my1][!!mx1](dst0, s->cur_frame->f->linesize[cidx+1], src2, src2stride, lc->tmp, block_h, _mx1, _my1, block_w); else - s->hevcdsp.put_hevc_epel_bi_w[idx][!!my1][!!mx1](dst0, s->frame->linesize[cidx+1], + s->hevcdsp.put_hevc_epel_bi_w[idx][!!my1][!!mx1](dst0, s->cur_frame->f->linesize[cidx+1], src2, src2stride, lc->tmp, block_h, s->sh.chroma_log2_weight_denom, @@ -1945,7 +1951,7 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, int log2_cb_size, int partIdx, int idx) { #define POS(c_idx, x, y) \ - &s->frame->data[c_idx][((y) >> s->ps.sps->vshift[c_idx]) * s->frame->linesize[c_idx] + \ + &s->cur_frame->f->data[c_idx][((y) >> s->ps.sps->vshift[c_idx]) * linesize[c_idx] + \ (((x) >> s->ps.sps->hshift[c_idx]) << s->ps.sps->pixel_shift)] const HEVCContext *const s = lc->parent; int merge_idx = 0; @@ -1953,9 +1959,10 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, int min_pu_width = s->ps.sps->min_pu_width; - MvField *tab_mvf = s->ref->tab_mvf; - const RefPicList *refPicList = s->ref->refPicList; + MvField *tab_mvf = s->cur_frame->tab_mvf; + const RefPicList *refPicList = s->cur_frame->refPicList; const HEVCFrame *ref0 = NULL, *ref1 = NULL; + const int *linesize = s->cur_frame->f->linesize; uint8_t *dst0 = POS(0, x0, y0); uint8_t *dst1 = POS(1, x0, y0); uint8_t *dst2 = POS(2, x0, y0); @@ -1993,13 +2000,13 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, if (current_mv.pred_flag & PF_L0) { ref0 = refPicList[0].ref[current_mv.ref_idx[0]]; - if (!ref0 || !ref0->frame) + if (!ref0 || !ref0->f) return; hevc_await_progress(s, ref0, ¤t_mv.mv[0], y0, nPbH); } if (current_mv.pred_flag & PF_L1) { ref1 = refPicList[1].ref[current_mv.ref_idx[1]]; - if (!ref1 || !ref1->frame) + if (!ref1 || !ref1->f) return; hevc_await_progress(s, ref1, ¤t_mv.mv[1], y0, nPbH); } @@ -2010,16 +2017,16 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, int nPbW_c = nPbW >> s->ps.sps->hshift[1]; int nPbH_c = nPbH >> s->ps.sps->vshift[1]; - luma_mc_uni(lc, dst0, s->frame->linesize[0], ref0->frame, + luma_mc_uni(lc, dst0, linesize[0], ref0->f, ¤t_mv.mv[0], x0, y0, nPbW, nPbH, s->sh.luma_weight_l0[current_mv.ref_idx[0]], s->sh.luma_offset_l0[current_mv.ref_idx[0]]); if (s->ps.sps->chroma_format_idc) { - chroma_mc_uni(lc, dst1, s->frame->linesize[1], ref0->frame->data[1], ref0->frame->linesize[1], + chroma_mc_uni(lc, dst1, linesize[1], ref0->f->data[1], ref0->f->linesize[1], 0, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, s->sh.chroma_weight_l0[current_mv.ref_idx[0]][0], s->sh.chroma_offset_l0[current_mv.ref_idx[0]][0]); - chroma_mc_uni(lc, dst2, s->frame->linesize[2], ref0->frame->data[2], ref0->frame->linesize[2], + chroma_mc_uni(lc, dst2, linesize[2], ref0->f->data[2], ref0->f->linesize[2], 0, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, s->sh.chroma_weight_l0[current_mv.ref_idx[0]][1], s->sh.chroma_offset_l0[current_mv.ref_idx[0]][1]); } @@ -2029,17 +2036,17 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, int nPbW_c = nPbW >> s->ps.sps->hshift[1]; int nPbH_c = nPbH >> s->ps.sps->vshift[1]; - luma_mc_uni(lc, dst0, s->frame->linesize[0], ref1->frame, + luma_mc_uni(lc, dst0, linesize[0], ref1->f, ¤t_mv.mv[1], x0, y0, nPbW, nPbH, s->sh.luma_weight_l1[current_mv.ref_idx[1]], s->sh.luma_offset_l1[current_mv.ref_idx[1]]); if (s->ps.sps->chroma_format_idc) { - chroma_mc_uni(lc, dst1, s->frame->linesize[1], ref1->frame->data[1], ref1->frame->linesize[1], + chroma_mc_uni(lc, dst1, linesize[1], ref1->f->data[1], ref1->f->linesize[1], 1, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, s->sh.chroma_weight_l1[current_mv.ref_idx[1]][0], s->sh.chroma_offset_l1[current_mv.ref_idx[1]][0]); - chroma_mc_uni(lc, dst2, s->frame->linesize[2], ref1->frame->data[2], ref1->frame->linesize[2], + chroma_mc_uni(lc, dst2, linesize[2], ref1->f->data[2], ref1->f->linesize[2], 1, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, s->sh.chroma_weight_l1[current_mv.ref_idx[1]][1], s->sh.chroma_offset_l1[current_mv.ref_idx[1]][1]); } @@ -2049,15 +2056,15 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int x0, int y0, int nPbW_c = nPbW >> s->ps.sps->hshift[1]; int nPbH_c = nPbH >> s->ps.sps->vshift[1]; - luma_mc_bi(lc, dst0, s->frame->linesize[0], ref0->frame, + luma_mc_bi(lc, dst0, linesize[0], ref0->f, ¤t_mv.mv[0], x0, y0, nPbW, nPbH, - ref1->frame, ¤t_mv.mv[1], ¤t_mv); + ref1->f, ¤t_mv.mv[1], ¤t_mv); if (s->ps.sps->chroma_format_idc) { - chroma_mc_bi(lc, dst1, s->frame->linesize[1], ref0->frame, ref1->frame, + chroma_mc_bi(lc, dst1, linesize[1], ref0->f, ref1->f, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, 0); - chroma_mc_bi(lc, dst2, s->frame->linesize[2], ref0->frame, ref1->frame, + chroma_mc_bi(lc, dst2, linesize[2], ref0->f, ref1->f, x0_c, y0_c, nPbW_c, nPbH_c, ¤t_mv, 1); } } @@ -2084,7 +2091,7 @@ static int luma_intra_pred_mode(HEVCLocalContext *lc, int x0, int y0, int pu_siz int y_ctb = (y0 >> (s->ps.sps->log2_ctb_size)) << (s->ps.sps->log2_ctb_size); - MvField *tab_mvf = s->ref->tab_mvf; + MvField *tab_mvf = s->cur_frame->tab_mvf; int intra_pred_mode; int candidate[3]; int i, j; @@ -2239,7 +2246,7 @@ static void intra_prediction_unit_default_value(HEVCLocalContext *lc, int pb_size = 1 << log2_cb_size; int size_in_pus = pb_size >> s->ps.sps->log2_min_pu_size; int min_pu_width = s->ps.sps->min_pu_width; - MvField *tab_mvf = s->ref->tab_mvf; + MvField *tab_mvf = s->cur_frame->tab_mvf; int x_pu = x0 >> s->ps.sps->log2_min_pu_size; int y_pu = y0 >> s->ps.sps->log2_min_pu_size; int j, k; @@ -2550,9 +2557,11 @@ static void hls_decode_neighbour(HEVCLocalContext *lc, int x_ctb, int y_ctb, lc->ctb_up_left_flag = ((x_ctb > 0) && (y_ctb > 0) && (ctb_addr_in_slice-1 >= s->ps.sps->ctb_width) && (s->ps.pps->tile_id[ctb_addr_ts] == s->ps.pps->tile_id[s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs-1 - s->ps.sps->ctb_width]])); } -static int hls_decode_entry(HEVCContext *s) +static int hls_decode_entry(HEVCContext *s, GetBitContext *gb) { - HEVCLocalContext *const lc = s->HEVClc; + HEVCLocalContext *const lc = &s->local_ctx[0]; + const uint8_t *slice_data = gb->buffer + s->sh.data_offset; + const size_t slice_size = gb->buffer_end - gb->buffer - s->sh.data_offset; int ctb_size = 1 << s->ps.sps->log2_ctb_size; int more_data = 1; int x_ctb = 0; @@ -2580,7 +2589,7 @@ static int hls_decode_entry(HEVCContext *s) y_ctb = (ctb_addr_rs / ((s->ps.sps->width + ctb_size - 1) >> s->ps.sps->log2_ctb_size)) << s->ps.sps->log2_ctb_size; hls_decode_neighbour(lc, x_ctb, y_ctb, ctb_addr_ts); - ret = ff_hevc_cabac_init(lc, ctb_addr_ts); + ret = ff_hevc_cabac_init(lc, ctb_addr_ts, slice_data, slice_size); if (ret < 0) { s->tab_slice_address[ctb_addr_rs] = -1; return ret; @@ -2622,14 +2631,14 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, int ctb_addr_rs = s->sh.slice_ctb_addr_rs + ctb_row * ((s->ps.sps->width + ctb_size - 1) >> s->ps.sps->log2_ctb_size); int ctb_addr_ts = s->ps.pps->ctb_addr_rs_to_ts[ctb_addr_rs]; int thread = ctb_row % s->threads_number; + + const uint8_t *data = s->data + s->sh.offset[ctb_row]; + const size_t data_size = s->sh.size[ctb_row]; + int ret; - if(ctb_row) { - ret = init_get_bits8(&lc->gb, s->data + s->sh.offset[ctb_row - 1], s->sh.size[ctb_row - 1]); - if (ret < 0) - goto error; - ff_init_cabac_decoder(&lc->cc, s->data + s->sh.offset[(ctb_row)-1], s->sh.size[ctb_row - 1]); - } + if (ctb_row) + ff_init_cabac_decoder(&lc->cc, data, data_size); while(more_data && ctb_addr_ts < s->ps.sps->ctb_size) { int x_ctb = (ctb_addr_rs % s->ps.sps->ctb_width) << s->ps.sps->log2_ctb_size; @@ -2647,7 +2656,7 @@ static int hls_decode_entry_wpp(AVCodecContext *avctxt, void *hevc_lclist, return 0; } - ret = ff_hevc_cabac_init(lc, ctb_addr_ts); + ret = ff_hevc_cabac_init(lc, ctb_addr_ts, data, data_size); if (ret < 0) goto error; hls_sao_param(lc, x_ctb >> s->ps.sps->log2_ctb_size, y_ctb >> s->ps.sps->log2_ctb_size); @@ -2698,7 +2707,6 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) { const uint8_t *data = nal->data; int length = nal->size; - HEVCLocalContext *lc; int *ret; int64_t offset; int64_t startheader, cmpt = 0; @@ -2721,7 +2729,6 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) memcpy(tmp, s->local_ctx, sizeof(*s->local_ctx) * s->nb_local_ctx); av_free(s->local_ctx); s->local_ctx = tmp; - s->HEVClc = &s->local_ctx[0]; for (unsigned i = s->nb_local_ctx; i < s->threads_number; i++) { tmp = &s->local_ctx[i]; @@ -2736,8 +2743,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) s->nb_local_ctx = s->threads_number; } - lc = &s->local_ctx[0]; - offset = (lc->gb.index >> 3); + offset = s->sh.data_offset; for (j = 0, cmpt = 0, startheader = offset + s->sh.entry_point_offset[0]; j < nal->skipped_bytes; j++) { if (nal->skipped_bytes_pos[j] >= offset && nal->skipped_bytes_pos[j] < startheader) { @@ -2755,25 +2761,27 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) cmpt++; } } - s->sh.size[i - 1] = s->sh.entry_point_offset[i] - cmpt; - s->sh.offset[i - 1] = offset; + s->sh.size[i] = s->sh.entry_point_offset[i] - cmpt; + s->sh.offset[i] = offset; } - if (s->sh.num_entry_point_offsets != 0) { - offset += s->sh.entry_point_offset[s->sh.num_entry_point_offsets - 1] - cmpt; - if (length < offset) { - av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n"); - return AVERROR_INVALIDDATA; - } - s->sh.size[s->sh.num_entry_point_offsets - 1] = length - offset; - s->sh.offset[s->sh.num_entry_point_offsets - 1] = offset; + offset += s->sh.entry_point_offset[s->sh.num_entry_point_offsets - 1] - cmpt; + if (length < offset) { + av_log(s->avctx, AV_LOG_ERROR, "entry_point_offset table is corrupted\n"); + return AVERROR_INVALIDDATA; } + s->sh.size [s->sh.num_entry_point_offsets] = length - offset; + s->sh.offset[s->sh.num_entry_point_offsets] = offset; + + s->sh.offset[0] = s->sh.data_offset; + s->sh.size[0] = s->sh.offset[1] - s->sh.offset[0]; + s->data = data; for (i = 1; i < s->threads_number; i++) { s->local_ctx[i].first_qp_group = 1; - s->local_ctx[i].qp_y = s->HEVClc->qp_y; + s->local_ctx[i].qp_y = s->local_ctx[0].qp_y; } atomic_store(&s->wpp_err, 0); @@ -2797,7 +2805,7 @@ static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal) static int set_side_data(HEVCContext *s) { - AVFrame *out = s->ref->frame; + AVFrame *out = s->cur_frame->f; int ret; // Decrement the mastering display and content light level flag when IRAP @@ -2814,7 +2822,7 @@ static int set_side_data(HEVCContext *s) ret = ff_h2645_sei_to_frame(out, &s->sei.common, AV_CODEC_ID_HEVC, s->avctx, &s->ps.sps->vui.common, s->ps.sps->bit_depth, s->ps.sps->bit_depth_chroma, - s->ref->poc /* no poc_offset in HEVC */); + s->cur_frame->poc /* no poc_offset in HEVC */); if (ret < 0) return ret; @@ -2892,7 +2900,6 @@ static int set_side_data(HEVCContext *s) static int hevc_frame_start(HEVCContext *s) { - HEVCLocalContext *lc = s->HEVClc; int pic_size_in_ctb = ((s->ps.sps->width >> s->ps.sps->log2_min_cb_size) + 1) * ((s->ps.sps->height >> s->ps.sps->log2_min_cb_size) + 1); int ret; @@ -2909,9 +2916,9 @@ static int hevc_frame_start(HEVCContext *s) s->no_rasl_output_flag = IS_IDR(s) || IS_BLA(s) || (s->nal_unit_type == HEVC_NAL_CRA_NUT && s->last_eos); if (s->ps.pps->tiles_enabled_flag) - lc->end_of_tiles_x = s->ps.pps->column_width[0] << s->ps.sps->log2_ctb_size; + s->local_ctx[0].end_of_tiles_x = s->ps.pps->column_width[0] << s->ps.sps->log2_ctb_size; - ret = ff_hevc_set_new_ref(s, &s->frame, s->poc); + ret = ff_hevc_set_new_ref(s, s->poc); if (ret < 0) goto fail; @@ -2922,12 +2929,12 @@ static int hevc_frame_start(HEVCContext *s) } if (IS_IRAP(s)) - s->ref->frame->flags |= AV_FRAME_FLAG_KEY; + s->cur_frame->f->flags |= AV_FRAME_FLAG_KEY; else - s->ref->frame->flags &= ~AV_FRAME_FLAG_KEY; + s->cur_frame->f->flags &= ~AV_FRAME_FLAG_KEY; - s->ref->needs_fg = (s->sei.common.film_grain_characteristics.present || - s->sei.common.aom_film_grain.enable) && + s->cur_frame->needs_fg = (s->sei.common.film_grain_characteristics.present || + s->sei.common.aom_film_grain.enable) && !(s->avctx->export_side_data & AV_CODEC_EXPORT_DATA_FILM_GRAIN) && !s->avctx->hwaccel; @@ -2935,25 +2942,25 @@ static int hevc_frame_start(HEVCContext *s) if (ret < 0) goto fail; - if (s->ref->needs_fg && + if (s->cur_frame->needs_fg && (s->sei.common.film_grain_characteristics.present && !ff_h274_film_grain_params_supported(s->sei.common.film_grain_characteristics.model_id, - s->ref->frame->format) - || !av_film_grain_params_select(s->ref->frame))) { + s->cur_frame->f->format) || + !av_film_grain_params_select(s->cur_frame->f))) { av_log_once(s->avctx, AV_LOG_WARNING, AV_LOG_DEBUG, &s->film_grain_warning_shown, "Unsupported film grain parameters. Ignoring film grain.\n"); - s->ref->needs_fg = 0; + s->cur_frame->needs_fg = 0; } - if (s->ref->needs_fg) { - s->ref->frame_grain->format = s->ref->frame->format; - s->ref->frame_grain->width = s->ref->frame->width; - s->ref->frame_grain->height = s->ref->frame->height; - if ((ret = ff_thread_get_buffer(s->avctx, s->ref->frame_grain, 0)) < 0) + if (s->cur_frame->needs_fg) { + s->cur_frame->frame_grain->format = s->cur_frame->f->format; + s->cur_frame->frame_grain->width = s->cur_frame->f->width; + s->cur_frame->frame_grain->height = s->cur_frame->f->height; + if ((ret = ff_thread_get_buffer(s->avctx, s->cur_frame->frame_grain, 0)) < 0) goto fail; } - s->frame->pict_type = 3 - s->sh.slice_type; + s->cur_frame->f->pict_type = 3 - s->sh.slice_type; if (!IS_IRAP(s)) ff_hevc_bump_frame(s); @@ -2969,31 +2976,31 @@ static int hevc_frame_start(HEVCContext *s) return 0; fail: - if (s->ref) - ff_hevc_unref_frame(s->ref, ~0); - s->ref = s->collocated_ref = NULL; + if (s->cur_frame) + ff_hevc_unref_frame(s->cur_frame, ~0); + s->cur_frame = s->collocated_ref = NULL; return ret; } static int hevc_frame_end(HEVCContext *s) { - HEVCFrame *out = s->ref; + HEVCFrame *out = s->cur_frame; const AVFilmGrainParams *fgp; av_unused int ret; if (out->needs_fg) { av_assert0(out->frame_grain->buf[0]); - fgp = av_film_grain_params_select(out->frame); + fgp = av_film_grain_params_select(out->f); switch (fgp->type) { case AV_FILM_GRAIN_PARAMS_NONE: av_assert0(0); return AVERROR_BUG; case AV_FILM_GRAIN_PARAMS_H274: - ret = ff_h274_apply_film_grain(out->frame_grain, out->frame, + ret = ff_h274_apply_film_grain(out->frame_grain, out->f, &s->h274db, fgp); break; case AV_FILM_GRAIN_PARAMS_AV1: - ret = ff_aom_apply_film_grain(out->frame_grain, out->frame, fgp); + ret = ff_aom_apply_film_grain(out->frame_grain, out->f, fgp); break; } av_assert1(ret >= 0); @@ -3004,11 +3011,9 @@ static int hevc_frame_end(HEVCContext *s) static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) { - HEVCLocalContext *lc = s->HEVClc; - GetBitContext *gb = &lc->gb; + GetBitContext gb = nal->gb; int ctb_addr_ts, ret; - *gb = nal->gb; s->nal_unit_type = nal->type; s->temporal_id = nal->temporal_id; @@ -3020,7 +3025,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (ret < 0) goto fail; } - ret = ff_hevc_decode_nal_vps(gb, s->avctx, &s->ps); + ret = ff_hevc_decode_nal_vps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; break; @@ -3031,7 +3036,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (ret < 0) goto fail; } - ret = ff_hevc_decode_nal_sps(gb, s->avctx, &s->ps, + ret = ff_hevc_decode_nal_sps(&gb, s->avctx, &s->ps, s->apply_defdispwin); if (ret < 0) goto fail; @@ -3043,7 +3048,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (ret < 0) goto fail; } - ret = ff_hevc_decode_nal_pps(gb, s->avctx, &s->ps); + ret = ff_hevc_decode_nal_pps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; break; @@ -3055,7 +3060,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (ret < 0) goto fail; } - ret = ff_hevc_decode_nal_sei(gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type); + ret = ff_hevc_decode_nal_sei(&gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type); if (ret < 0) goto fail; break; @@ -3075,7 +3080,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) case HEVC_NAL_RADL_R: case HEVC_NAL_RASL_N: case HEVC_NAL_RASL_R: - ret = hls_slice_header(s); + ret = hls_slice_header(s, &gb); if (ret < 0) return ret; if (ret == 1) { @@ -3114,7 +3119,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) ret = hevc_frame_start(s); if (ret < 0) return ret; - } else if (!s->ref) { + } else if (!s->cur_frame) { av_log(s->avctx, AV_LOG_ERROR, "First slice in a frame missing.\n"); goto fail; } @@ -3157,7 +3162,7 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) if (s->threads_number > 1 && s->sh.num_entry_point_offsets > 0) ctb_addr_ts = hls_slice_data_wpp(s, nal); else - ctb_addr_ts = hls_decode_entry(s); + ctb_addr_ts = hls_decode_entry(s, &gb); if (ctb_addr_ts >= (s->ps.sps->ctb_width * s->ps.sps->ctb_height)) { ret = hevc_frame_end(s); if (ret < 0) @@ -3197,7 +3202,7 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) int i, ret = 0; int eos_at_start = 1; - s->ref = s->collocated_ref = NULL; + s->cur_frame = s->collocated_ref = NULL; s->last_eos = s->eos; s->eos = 0; s->overlap = 0; @@ -3276,8 +3281,8 @@ static int decode_nal_units(HEVCContext *s, const uint8_t *buf, int length) } fail: - if (s->ref && s->threads_type == FF_THREAD_FRAME) - ff_progress_frame_report(&s->ref->tf, INT_MAX); + if (s->cur_frame && s->threads_type == FF_THREAD_FRAME) + ff_progress_frame_report(&s->cur_frame->tf, INT_MAX); return ret; } @@ -3412,25 +3417,25 @@ static int hevc_decode_frame(AVCodecContext *avctx, AVFrame *rframe, old, s->dovi_ctx.cfg.dv_profile); } - s->ref = s->collocated_ref = NULL; + s->cur_frame = s->collocated_ref = NULL; ret = decode_nal_units(s, avpkt->data, avpkt->size); if (ret < 0) return ret; if (avctx->hwaccel) { - if (s->ref && (ret = FF_HW_SIMPLE_CALL(avctx, end_frame)) < 0) { + if (s->cur_frame && (ret = FF_HW_SIMPLE_CALL(avctx, end_frame)) < 0) { av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); - ff_hevc_unref_frame(s->ref, ~0); + ff_hevc_unref_frame(s->cur_frame, ~0); return ret; } } else { /* verify the SEI checksum */ - if (avctx->err_recognition & AV_EF_CRCCHECK && s->ref && s->is_decoded && + if (avctx->err_recognition & AV_EF_CRCCHECK && s->cur_frame && s->is_decoded && s->sei.picture_hash.is_md5) { - ret = verify_md5(s, s->ref->frame); + ret = verify_md5(s, s->cur_frame->f); if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) { - ff_hevc_unref_frame(s->ref, ~0); + ff_hevc_unref_frame(s->cur_frame, ~0); return ret; } } @@ -3531,11 +3536,9 @@ static av_cold int hevc_init_context(AVCodecContext *avctx) return AVERROR(ENOMEM); s->nb_local_ctx = 1; - s->HEVClc = &s->local_ctx[0]; - - s->HEVClc->parent = s; - s->HEVClc->logctx = avctx; - s->HEVClc->common_cabac_state = &s->cabac; + s->local_ctx[0].parent = s; + s->local_ctx[0].logctx = avctx; + s->local_ctx[0].common_cabac_state = &s->cabac; s->output_frame = av_frame_alloc(); if (!s->output_frame) @@ -3573,7 +3576,7 @@ static int hevc_update_thread_context(AVCodecContext *dst, for (i = 0; i < FF_ARRAY_ELEMS(s->DPB); i++) { ff_hevc_unref_frame(&s->DPB[i], ~0); - if (s0->DPB[i].frame) { + if (s0->DPB[i].f) { ret = hevc_ref_frame(&s->DPB[i], &s0->DPB[i]); if (ret < 0) return ret; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h b/src/ExtLib/ffmpeg/libavcodec/hevcdec.h index 5aa3d40450..0cd6b8c2b4 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevcdec.h @@ -277,6 +277,7 @@ typedef struct SliceHeader { int16_t chroma_offset_l1[16][2]; int slice_ctb_addr_rs; + unsigned data_offset; } SliceHeader; typedef struct CodingUnit { @@ -354,7 +355,7 @@ typedef struct DBParams { typedef struct HEVCFrame { union { struct { - AVFrame *frame; + AVFrame *f; }; ProgressFrame tf; }; @@ -393,7 +394,6 @@ typedef struct HEVCLocalContext { void *logctx; const struct HEVCContext *parent; - GetBitContext gb; CABACContext cc; /** @@ -452,8 +452,6 @@ typedef struct HEVCContext { HEVCLocalContext *local_ctx; unsigned nb_local_ctx; - HEVCLocalContext *HEVClc; - uint8_t threads_type; uint8_t threads_number; @@ -463,7 +461,6 @@ typedef struct HEVCContext { /** 1 if the independent slice segment header was successfully parsed */ uint8_t slice_initialized; - AVFrame *frame; AVFrame *output_frame; uint8_t *sao_pixel_buffer_h[3]; uint8_t *sao_pixel_buffer_v[3]; @@ -483,7 +480,7 @@ typedef struct HEVCContext { DBParams *deblock; enum HEVCNALUnitType nal_unit_type; int temporal_id; ///< temporal_id_plus1 - 1 - HEVCFrame *ref; + HEVCFrame *cur_frame; HEVCFrame *collocated_ref; HEVCFrame DPB[32]; int poc; @@ -582,7 +579,8 @@ int ff_hevc_frame_rps(HEVCContext *s); int ff_hevc_slice_rpl(HEVCContext *s); void ff_hevc_save_states(HEVCLocalContext *lc, int ctb_addr_ts); -int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts); +int ff_hevc_cabac_init(HEVCLocalContext *lc, int ctb_addr_ts, + const uint8_t *data, size_t size); int ff_hevc_sao_merge_flag_decode(HEVCLocalContext *lc); int ff_hevc_sao_type_idx_decode(HEVCLocalContext *lc); int ff_hevc_sao_band_position_decode(HEVCLocalContext *lc); @@ -619,7 +617,7 @@ int ff_hevc_res_scale_sign_flag(HEVCLocalContext *lc, int idx); */ int ff_hevc_frame_nb_refs(const HEVCContext *s); -int ff_hevc_set_new_ref(HEVCContext *s, AVFrame **frame, int poc); +int ff_hevc_set_new_ref(HEVCContext *s, int poc); static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c b/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c index 43ac991570..59c77ec8b2 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c @@ -33,7 +33,7 @@ static av_always_inline void FUNC(intra_pred)(HEVCLocalContext *lc, int x0, int #define PU(x) \ ((x) >> s->ps.sps->log2_min_pu_size) #define MVF(x, y) \ - (s->ref->tab_mvf[(x) + (y) * min_pu_width]) + (s->cur_frame->tab_mvf[(x) + (y) * min_pu_width]) #define MVF_PU(x, y) \ MVF(PU(x0 + ((x) * (1 << hshift))), PU(y0 + ((y) * (1 << vshift)))) #define IS_INTRA(x, y) \ @@ -87,8 +87,8 @@ do { \ int cur_tb_addr = MIN_TB_ADDR_ZS(x_tb, y_tb); - ptrdiff_t stride = s->frame->linesize[c_idx] / sizeof(pixel); - pixel *src = (pixel*)s->frame->data[c_idx] + x + y * stride; + ptrdiff_t stride = s->cur_frame->f->linesize[c_idx] / sizeof(pixel); + pixel *src = (pixel*)s->cur_frame->f->data[c_idx] + x + y * stride; int min_pu_width = s->ps.sps->min_pu_width; diff --git a/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c b/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c index 3d704666d0..381f8da97e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c @@ -34,7 +34,7 @@ static void dpb_add(CUVIDHEVCPICPARAMS *pp, int idx, const HEVCFrame *src) { - FrameDecodeData *fdd = (FrameDecodeData*)src->frame->private_ref->data; + FrameDecodeData *fdd = (FrameDecodeData*)src->f->private_ref->data; const NVDECFrame *cf = fdd->hwaccel_priv; pp->RefPicIdx[idx] = cf ? cf->idx : -1; @@ -84,11 +84,11 @@ static int nvdec_hevc_start_frame(AVCodecContext *avctx, int i, j, dpb_size, ret; - ret = ff_nvdec_start_frame(avctx, s->ref->frame); + ret = ff_nvdec_start_frame(avctx, s->cur_frame->f); if (ret < 0) return ret; - fdd = (FrameDecodeData*)s->ref->frame->private_ref->data; + fdd = (FrameDecodeData*)s->cur_frame->f->private_ref->data; cf = (NVDECFrame*)fdd->hwaccel_priv; *pp = (CUVIDPICPARAMS) { @@ -191,7 +191,7 @@ static int nvdec_hevc_start_frame(AVCodecContext *avctx, .NumPocStCurrBefore = s->rps[ST_CURR_BEF].nb_refs, .NumPocStCurrAfter = s->rps[ST_CURR_AFT].nb_refs, .NumPocLtCurr = s->rps[LT_CURR].nb_refs, - .CurrPicOrderCntVal = s->ref->poc, + .CurrPicOrderCntVal = s->cur_frame->poc, }, }; diff --git a/src/ExtLib/ffmpeg/libavcodec/rv34.c b/src/ExtLib/ffmpeg/libavcodec/rv34.c index 23a570bb80..cfd4cd259a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/rv34.c +++ b/src/ExtLib/ffmpeg/libavcodec/rv34.c @@ -98,6 +98,8 @@ static av_cold void rv34_gen_vlc_ext(const uint8_t *bits, int size, VLC *vlc, uint16_t cw[MAX_VLC_SIZE]; int maxbits; + av_assert1(size > 0); + for (int i = 0; i < size; i++) counts[bits[i]]++; diff --git a/src/ExtLib/ffmpeg/libavcodec/sinewin_fixed_tablegen.h b/src/ExtLib/ffmpeg/libavcodec/sinewin_fixed_tablegen.h index 056735704c..660c0056b5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/sinewin_fixed_tablegen.h +++ b/src/ExtLib/ffmpeg/libavcodec/sinewin_fixed_tablegen.h @@ -44,10 +44,12 @@ #include "libavutil/attributes.h" #define SINETABLE_CONST +SINETABLE( 96); SINETABLE( 120); SINETABLE( 128); SINETABLE( 480); SINETABLE( 512); +SINETABLE( 768); SINETABLE( 960); SINETABLE(1024); @@ -62,10 +64,12 @@ static av_cold void sine_window_init_fixed(int *window, int n) static av_cold void init_sine_windows_fixed(void) { + sine_window_init_fixed(sine_96_fixed, 96); sine_window_init_fixed(sine_120_fixed, 120); sine_window_init_fixed(sine_128_fixed, 128); sine_window_init_fixed(sine_480_fixed, 480); sine_window_init_fixed(sine_512_fixed, 512); + sine_window_init_fixed(sine_768_fixed, 768); sine_window_init_fixed(sine_960_fixed, 960); sine_window_init_fixed(sine_1024_fixed, 1024); } diff --git a/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c b/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c index 829a91261e..76c9e7c48b 100644 --- a/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/speedhqdec.c @@ -58,6 +58,8 @@ typedef struct SHQContext { enum { SHQ_SUBSAMPLING_420, SHQ_SUBSAMPLING_422, SHQ_SUBSAMPLING_444 } subsampling; enum { SHQ_NO_ALPHA, SHQ_RLE_ALPHA, SHQ_DCT_ALPHA } alpha_type; + AVPacket *avpkt; + uint32_t second_field_offset; } SHQContext; /* NOTE: The first element is always 16, unscaled. */ @@ -266,9 +268,10 @@ static int decode_speedhq_border(const SHQContext *s, GetBitContext *gb, AVFrame return 0; } -static int decode_speedhq_field(const SHQContext *s, const uint8_t *buf, int buf_size, AVFrame *frame, int field_number, int start, int end, int line_stride) +static int decode_speedhq_field(const SHQContext *s, const uint8_t *buf, int buf_size, AVFrame *frame, int field_number, int start, int end, int line_stride, int slice_number) { - int ret, slice_number, slice_offsets[5]; + int ret, x, y, slice_offsets[5]; + uint32_t slice_begin, slice_end; int linesize_y = frame->linesize[0] * line_stride; int linesize_cb = frame->linesize[1] * line_stride; int linesize_cr = frame->linesize[2] * line_stride; @@ -283,121 +286,137 @@ static int decode_speedhq_field(const SHQContext *s, const uint8_t *buf, int buf slice_offsets[0] = start; slice_offsets[4] = end; - for (slice_number = 1; slice_number < 4; slice_number++) { + for (x = 1; x < 4; x++) { uint32_t last_offset, slice_len; - last_offset = slice_offsets[slice_number - 1]; + last_offset = slice_offsets[x - 1]; slice_len = AV_RL24(buf + last_offset); - slice_offsets[slice_number] = last_offset + slice_len; + slice_offsets[x] = last_offset + slice_len; - if (slice_len < 3 || slice_offsets[slice_number] > end - 3) + if (slice_len < 3 || slice_offsets[x] > end - 3) return AVERROR_INVALIDDATA; } - for (slice_number = 0; slice_number < 4; slice_number++) { - uint32_t slice_begin, slice_end; - int x, y; + slice_begin = slice_offsets[slice_number]; + slice_end = slice_offsets[slice_number + 1]; - slice_begin = slice_offsets[slice_number]; - slice_end = slice_offsets[slice_number + 1]; + if ((ret = init_get_bits8(&gb, buf + slice_begin + 3, slice_end - slice_begin - 3)) < 0) + return ret; - if ((ret = init_get_bits8(&gb, buf + slice_begin + 3, slice_end - slice_begin - 3)) < 0) - return ret; + for (y = slice_number * 16 * line_stride; y < frame->height; y += line_stride * 64) { + uint8_t *dest_y, *dest_cb, *dest_cr, *dest_a; + int last_dc[4] = { 1024, 1024, 1024, 1024 }; + uint8_t last_alpha[16]; - for (y = slice_number * 16 * line_stride; y < frame->height; y += line_stride * 64) { - uint8_t *dest_y, *dest_cb, *dest_cr, *dest_a; - int last_dc[4] = { 1024, 1024, 1024, 1024 }; - uint8_t last_alpha[16]; + memset(last_alpha, 255, sizeof(last_alpha)); - memset(last_alpha, 255, sizeof(last_alpha)); + dest_y = frame->data[0] + frame->linesize[0] * (y + field_number); + if (s->subsampling == SHQ_SUBSAMPLING_420) { + dest_cb = frame->data[1] + frame->linesize[1] * (y/2 + field_number); + dest_cr = frame->data[2] + frame->linesize[2] * (y/2 + field_number); + } else { + dest_cb = frame->data[1] + frame->linesize[1] * (y + field_number); + dest_cr = frame->data[2] + frame->linesize[2] * (y + field_number); + } + if (s->alpha_type != SHQ_NO_ALPHA) { + dest_a = frame->data[3] + frame->linesize[3] * (y + field_number); + } - dest_y = frame->data[0] + frame->linesize[0] * (y + field_number); - if (s->subsampling == SHQ_SUBSAMPLING_420) { - dest_cb = frame->data[1] + frame->linesize[1] * (y/2 + field_number); - dest_cr = frame->data[2] + frame->linesize[2] * (y/2 + field_number); - } else { - dest_cb = frame->data[1] + frame->linesize[1] * (y + field_number); - dest_cr = frame->data[2] + frame->linesize[2] * (y + field_number); - } - if (s->alpha_type != SHQ_NO_ALPHA) { - dest_a = frame->data[3] + frame->linesize[3] * (y + field_number); - } + for (x = 0; x < frame->width - 8 * (s->subsampling != SHQ_SUBSAMPLING_444); x += 16) { + /* Decode the four luma blocks. */ + if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y, linesize_y)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8, linesize_y)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8 * linesize_y, linesize_y)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8 * linesize_y + 8, linesize_y)) < 0) + return ret; - for (x = 0; x < frame->width - 8 * (s->subsampling != SHQ_SUBSAMPLING_444); x += 16) { - /* Decode the four luma blocks. */ - if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y, linesize_y)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8, linesize_y)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8 * linesize_y, linesize_y)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 0, dest_y + 8 * linesize_y + 8, linesize_y)) < 0) - return ret; + /* + * Decode the first chroma block. For 4:2:0, this is the only one; + * for 4:2:2, it's the top block; for 4:4:4, it's the top-left block. + */ + if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb, linesize_cb)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr, linesize_cr)) < 0) + return ret; - /* - * Decode the first chroma block. For 4:2:0, this is the only one; - * for 4:2:2, it's the top block; for 4:4:4, it's the top-left block. - */ - if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb, linesize_cb)) < 0) + if (s->subsampling != SHQ_SUBSAMPLING_420) { + /* For 4:2:2, this is the bottom block; for 4:4:4, it's the bottom-left block. */ + if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8 * linesize_cb, linesize_cb)) < 0) return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr, linesize_cr)) < 0) + if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8 * linesize_cr, linesize_cr)) < 0) return ret; - if (s->subsampling != SHQ_SUBSAMPLING_420) { - /* For 4:2:2, this is the bottom block; for 4:4:4, it's the bottom-left block. */ - if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8 * linesize_cb, linesize_cb)) < 0) + if (s->subsampling == SHQ_SUBSAMPLING_444) { + /* Top-right and bottom-right blocks. */ + if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8, linesize_cb)) < 0) return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8 * linesize_cr, linesize_cr)) < 0) + if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8, linesize_cr)) < 0) return ret; - - if (s->subsampling == SHQ_SUBSAMPLING_444) { - /* Top-right and bottom-right blocks. */ - if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8, linesize_cb)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8, linesize_cr)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8 * linesize_cb + 8, linesize_cb)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8 * linesize_cr + 8, linesize_cr)) < 0) - return ret; - - dest_cb += 8; - dest_cr += 8; - } - } - dest_y += 16; - dest_cb += 8; - dest_cr += 8; - - if (s->alpha_type == SHQ_RLE_ALPHA) { - /* Alpha coded using 16x8 RLE blocks. */ - if ((ret = decode_alpha_block(s, &gb, last_alpha, dest_a, linesize_a)) < 0) - return ret; - if ((ret = decode_alpha_block(s, &gb, last_alpha, dest_a + 8 * linesize_a, linesize_a)) < 0) - return ret; - dest_a += 16; - } else if (s->alpha_type == SHQ_DCT_ALPHA) { - /* Alpha encoded exactly like luma. */ - if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a, linesize_a)) < 0) + if ((ret = decode_dct_block(s, &gb, last_dc, 1, dest_cb + 8 * linesize_cb + 8, linesize_cb)) < 0) return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8, linesize_a)) < 0) + if ((ret = decode_dct_block(s, &gb, last_dc, 2, dest_cr + 8 * linesize_cr + 8, linesize_cr)) < 0) return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8 * linesize_a, linesize_a)) < 0) - return ret; - if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8 * linesize_a + 8, linesize_a)) < 0) - return ret; - dest_a += 16; + + dest_cb += 8; + dest_cr += 8; } } + dest_y += 16; + dest_cb += 8; + dest_cr += 8; + + if (s->alpha_type == SHQ_RLE_ALPHA) { + /* Alpha coded using 16x8 RLE blocks. */ + if ((ret = decode_alpha_block(s, &gb, last_alpha, dest_a, linesize_a)) < 0) + return ret; + if ((ret = decode_alpha_block(s, &gb, last_alpha, dest_a + 8 * linesize_a, linesize_a)) < 0) + return ret; + dest_a += 16; + } else if (s->alpha_type == SHQ_DCT_ALPHA) { + /* Alpha encoded exactly like luma. */ + if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a, linesize_a)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8, linesize_a)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8 * linesize_a, linesize_a)) < 0) + return ret; + if ((ret = decode_dct_block(s, &gb, last_dc, 3, dest_a + 8 * linesize_a + 8, linesize_a)) < 0) + return ret; + dest_a += 16; + } } } - if (s->subsampling != SHQ_SUBSAMPLING_444 && (frame->width & 15)) + if (s->subsampling != SHQ_SUBSAMPLING_444 && (frame->width & 15) && slice_number == 3) return decode_speedhq_border(s, &gb, frame, field_number, line_stride); return 0; } +static int decode_slice_progressive(AVCodecContext *avctx, void *arg, int jobnr, int threadnr) +{ + SHQContext *s = avctx->priv_data; + (void)threadnr; + + return decode_speedhq_field(avctx->priv_data, s->avpkt->data, s->avpkt->size, arg, 0, 4, s->avpkt->size, 1, jobnr); +} + +static int decode_slice_interlaced(AVCodecContext *avctx, void *arg, int jobnr, int threadnr) +{ + SHQContext *s = avctx->priv_data; + int field_number = jobnr / 4; + int slice_number = jobnr % 4; + (void)threadnr; + + if (field_number == 0) + return decode_speedhq_field(avctx->priv_data, s->avpkt->data, s->avpkt->size, arg, 0, 4, s->second_field_offset, 2, slice_number); + else + return decode_speedhq_field(avctx->priv_data, s->avpkt->data, s->avpkt->size, arg, 1, s->second_field_offset, s->avpkt->size, 2, slice_number); +} + static void compute_quant_matrix(int *output, int qscale) { int i; @@ -411,7 +430,6 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; uint8_t quality; - uint32_t second_field_offset; int ret; if (buf_size < 4 || avctx->width < 8 || avctx->width % 8 != 0) @@ -429,8 +447,8 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, compute_quant_matrix(s->quant_matrix, 100 - quality); - second_field_offset = AV_RL24(buf + 1); - if (second_field_offset >= buf_size - 3) { + s->second_field_offset = AV_RL24(buf + 1); + if (s->second_field_offset >= buf_size - 3) { return AVERROR_INVALIDDATA; } @@ -441,7 +459,9 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; } - if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { + s->avpkt = avpkt; + + if (s->second_field_offset == 4 || s->second_field_offset == (buf_size-4)) { /* * Overlapping first and second fields is used to signal * encoding only a single field. In this case, "height" @@ -451,12 +471,10 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, * but this matches the convention used in NDI, which is * the primary user of this trick. */ - if ((ret = decode_speedhq_field(s, buf, buf_size, frame, 0, 4, buf_size, 1)) < 0) + if ((ret = avctx->execute2(avctx, decode_slice_progressive, frame, NULL, 4)) < 0) return ret; } else { - if ((ret = decode_speedhq_field(s, buf, buf_size, frame, 0, 4, second_field_offset, 2)) < 0) - return ret; - if ((ret = decode_speedhq_field(s, buf, buf_size, frame, 1, second_field_offset, buf_size, 2)) < 0) + if ((ret = avctx->execute2(avctx, decode_slice_interlaced, frame, NULL, 8)) < 0) return ret; } @@ -652,5 +670,5 @@ const FFCodec ff_speedhq_decoder = { .priv_data_size = sizeof(SHQContext), .init = speedhq_decode_init, FF_CODEC_DECODE_CB(speedhq_decode_frame), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, }; diff --git a/src/ExtLib/ffmpeg/libavcodec/version.h b/src/ExtLib/ffmpeg/libavcodec/version.h index 3d2de546b3..da54f87887 100644 --- a/src/ExtLib/ffmpeg/libavcodec/version.h +++ b/src/ExtLib/ffmpeg/libavcodec/version.h @@ -29,8 +29,8 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 5 -#define LIBAVCODEC_VERSION_MICRO 104 +#define LIBAVCODEC_VERSION_MINOR 6 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c b/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c index e78a9b4694..b96e750272 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c @@ -412,12 +412,11 @@ void ff_vvc_store_sb_mvs(const VVCLocalContext *lc, PredictionUnit *pu) const int sbw = cu->cb_width / mi->num_sb_x; const int sbh = cu->cb_height / mi->num_sb_y; SubblockParams params[2]; - MvField mvf; + MvField mvf = {0}; mvf.pred_flag = mi->pred_flag; mvf.bcw_idx = mi->bcw_idx; mvf.hpel_if_idx = mi->hpel_if_idx; - mvf.ciip_flag = 0; for (int i = 0; i < 2; i++) { const PredFlag mask = i + 1; if (mi->pred_flag & mask) { @@ -505,12 +504,11 @@ void ff_vvc_store_mvf(const VVCLocalContext *lc, const MvField *mvf) void ff_vvc_store_mv(const VVCLocalContext *lc, const MotionInfo *mi) { const CodingUnit *cu = lc->cu; - MvField mvf; + MvField mvf = {0}; mvf.hpel_if_idx = mi->hpel_if_idx; mvf.bcw_idx = mi->bcw_idx; mvf.pred_flag = mi->pred_flag; - mvf.ciip_flag = 0; for (int i = 0; i < 2; i++) { const PredFlag mask = i + 1; diff --git a/src/ExtLib/ffmpeg/libavcodec/wavpack.c b/src/ExtLib/ffmpeg/libavcodec/wavpack.c index d4cf489c0f..bf9aa0cdce 100644 --- a/src/ExtLib/ffmpeg/libavcodec/wavpack.c +++ b/src/ExtLib/ffmpeg/libavcodec/wavpack.c @@ -1418,13 +1418,13 @@ static int wavpack_decode_block(AVCodecContext *avctx, AVFrame *frame, int block chmask = bytestream2_get_le32(&gb); break; case 4: - size = bytestream2_get_byte(&gb); + bytestream2_get_byte(&gb); chan |= (bytestream2_get_byte(&gb) & 0xF) << 8; chan += 1; chmask = bytestream2_get_le24(&gb); break; case 5: - size = bytestream2_get_byte(&gb); + bytestream2_get_byte(&gb); chan |= (bytestream2_get_byte(&gb) & 0xF) << 8; chan += 1; chmask = bytestream2_get_le32(&gb); diff --git a/src/ExtLib/ffmpeg/libavutil/channel_layout.c b/src/ExtLib/ffmpeg/libavutil/channel_layout.c index 77e2be9e28..34f88290bd 100644 --- a/src/ExtLib/ffmpeg/libavutil/channel_layout.c +++ b/src/ExtLib/ffmpeg/libavutil/channel_layout.c @@ -75,6 +75,10 @@ static const struct channel_name channel_names[] = { [AV_CHAN_BOTTOM_FRONT_CENTER ] = { "BFC", "bottom front center" }, [AV_CHAN_BOTTOM_FRONT_LEFT ] = { "BFL", "bottom front left" }, [AV_CHAN_BOTTOM_FRONT_RIGHT ] = { "BFR", "bottom front right" }, + [AV_CHAN_SIDE_SURROUND_LEFT ] = { "SSL", "side surround left" }, + [AV_CHAN_SIDE_SURROUND_RIGHT ] = { "SSR", "side surround right" }, + [AV_CHAN_TOP_SURROUND_LEFT ] = { "TTL", "top surround left" }, + [AV_CHAN_TOP_SURROUND_RIGHT ] = { "TTR", "top surround right" }, }; void av_channel_name_bprint(AVBPrint *bp, enum AVChannel channel_id) diff --git a/src/ExtLib/ffmpeg/libavutil/channel_layout.h b/src/ExtLib/ffmpeg/libavutil/channel_layout.h index d9929f3c03..3516fa7719 100644 --- a/src/ExtLib/ffmpeg/libavutil/channel_layout.h +++ b/src/ExtLib/ffmpeg/libavutil/channel_layout.h @@ -79,6 +79,10 @@ enum AVChannel { AV_CHAN_BOTTOM_FRONT_CENTER, AV_CHAN_BOTTOM_FRONT_LEFT, AV_CHAN_BOTTOM_FRONT_RIGHT, + AV_CHAN_SIDE_SURROUND_LEFT, ///< +90 degrees, Lss, SiL + AV_CHAN_SIDE_SURROUND_RIGHT, ///< -90 degrees, Rss, SiR + AV_CHAN_TOP_SURROUND_LEFT, ///< +110 degrees, Lvs, TpLS + AV_CHAN_TOP_SURROUND_RIGHT, ///< -110 degrees, Rvs, TpRS /** Channel is empty can be safely skipped. */ AV_CHAN_UNUSED = 0x200, @@ -195,6 +199,10 @@ enum AVChannelOrder { #define AV_CH_BOTTOM_FRONT_CENTER (1ULL << AV_CHAN_BOTTOM_FRONT_CENTER ) #define AV_CH_BOTTOM_FRONT_LEFT (1ULL << AV_CHAN_BOTTOM_FRONT_LEFT ) #define AV_CH_BOTTOM_FRONT_RIGHT (1ULL << AV_CHAN_BOTTOM_FRONT_RIGHT ) +#define AV_CH_SIDE_SURROUND_LEFT (1ULL << AV_CHAN_SIDE_SURROUND_LEFT ) +#define AV_CH_SIDE_SURROUND_RIGHT (1ULL << AV_CHAN_SIDE_SURROUND_RIGHT ) +#define AV_CH_TOP_SURROUND_LEFT (1ULL << AV_CHAN_TOP_SURROUND_LEFT ) +#define AV_CH_TOP_SURROUND_RIGHT (1ULL << AV_CHAN_TOP_SURROUND_RIGHT ) /** * @} diff --git a/src/ExtLib/ffmpeg/libavutil/version.h b/src/ExtLib/ffmpeg/libavutil/version.h index 9c7146c228..9d08d56884 100644 --- a/src/ExtLib/ffmpeg/libavutil/version.h +++ b/src/ExtLib/ffmpeg/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 20 +#define LIBAVUTIL_VERSION_MINOR 21 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ diff --git a/src/ExtLib/ffmpeg/libavutil/x86/float_dsp.asm b/src/ExtLib/ffmpeg/libavutil/x86/float_dsp.asm index e84ba52566..cac2a2b668 100644 --- a/src/ExtLib/ffmpeg/libavutil/x86/float_dsp.asm +++ b/src/ExtLib/ffmpeg/libavutil/x86/float_dsp.asm @@ -567,6 +567,58 @@ cglobal scalarproduct_float, 3,5,8, v1, v2, size, len, offset %endif RET +;--------------------------------------------------------------------------------- +; double scalarproduct_double(const double *v1, const double *v2, size_t len) +;--------------------------------------------------------------------------------- +%macro SCALARPRODUCT_DOUBLE 0 +cglobal scalarproduct_double, 3,3,8, v1, v2, offset + shl offsetq, 3 + add v1q, offsetq + add v2q, offsetq + neg offsetq + xorpd m0, m0 + xorpd m1, m1 + movapd m2, m0 + movapd m3, m1 +align 16 +.loop: + movapd m4, [v1q+offsetq+mmsize*0] + movapd m5, [v1q+offsetq+mmsize*1] + movapd m6, [v1q+offsetq+mmsize*2] + movapd m7, [v1q+offsetq+mmsize*3] + mulpd m4, [v2q+offsetq+mmsize*0] + mulpd m5, [v2q+offsetq+mmsize*1] + mulpd m6, [v2q+offsetq+mmsize*2] + mulpd m7, [v2q+offsetq+mmsize*3] + addpd m0, m4 + addpd m1, m5 + addpd m2, m6 + addpd m3, m7 + add offsetq, mmsize*4 + jl .loop + addpd m0, m1 + addpd m2, m3 + addpd m0, m2 +%if mmsize == 32 + vextractf128 xm1, m0, 1 + addpd xm0, xm1 +%endif + movhlps xm1, xm0 + addsd xm0, xm1 +%if ARCH_X86_64 == 0 + movsd r0m, xm0 + fld qword r0m +%endif + RET +%endmacro + +INIT_XMM sse2 +SCALARPRODUCT_DOUBLE +%if HAVE_AVX_EXTERNAL +INIT_YMM avx +SCALARPRODUCT_DOUBLE +%endif + ;----------------------------------------------------------------------------- ; void ff_butterflies_float(float *src0, float *src1, int len); ;----------------------------------------------------------------------------- diff --git a/src/ExtLib/ffmpeg/libavutil/x86/float_dsp_init.c b/src/ExtLib/ffmpeg/libavutil/x86/float_dsp_init.c index 093bce9b94..6cf0b4a277 100644 --- a/src/ExtLib/ffmpeg/libavutil/x86/float_dsp_init.c +++ b/src/ExtLib/ffmpeg/libavutil/x86/float_dsp_init.c @@ -73,6 +73,9 @@ void ff_vector_fmul_reverse_avx2(float *dst, const float *src0, float ff_scalarproduct_float_sse(const float *v1, const float *v2, int order); float ff_scalarproduct_float_fma3(const float *v1, const float *v2, int order); +double ff_scalarproduct_double_sse2(const double *v1, const double *v2, size_t order); +double ff_scalarproduct_double_avx(const double *v1, const double *v2, size_t order); + void ff_butterflies_float_sse(float *restrict src0, float *restrict src1, int len); av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) @@ -93,6 +96,7 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) fdsp->vector_dmul = ff_vector_dmul_sse2; fdsp->vector_dmac_scalar = ff_vector_dmac_scalar_sse2; fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2; + fdsp->scalarproduct_double = ff_scalarproduct_double_sse2; } if (EXTERNAL_AVX_FAST(cpu_flags)) { fdsp->vector_fmul = ff_vector_fmul_avx; @@ -102,6 +106,7 @@ av_cold void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) fdsp->vector_dmac_scalar = ff_vector_dmac_scalar_avx; fdsp->vector_fmul_add = ff_vector_fmul_add_avx; fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_avx; + fdsp->scalarproduct_double = ff_scalarproduct_double_avx; } if (EXTERNAL_AVX2_FAST(cpu_flags)) { fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_avx2; From cdd63c2f3b2385855a74b33b9e5f2dd5acd4e2af Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 18:17:01 +0300 Subject: [PATCH 46/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20ffmpeg=20git-n7.1-dev-1158-g7560db93?= =?UTF-8?q?7d.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Changelog.Rus.txt | 2 +- docs/Changelog.txt | 2 +- src/ExtLib/ffmpeg/ffmpeg.mak | 28 +- src/ExtLib/ffmpeg/libavcodec/aac.h | 2 +- src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c | 8 +- src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h | 3 + .../ffmpeg/libavcodec/aac/aacdec_usac.c | 197 ++++--- src/ExtLib/ffmpeg/libavcodec/aactab.c | 8 + src/ExtLib/ffmpeg/libavcodec/aactab.h | 3 + .../ffmpeg/libavcodec/bsf/extract_extradata.c | 3 +- .../ffmpeg/libavcodec/bsf/hevc_mp4toannexb.c | 3 +- .../ffmpeg/libavcodec/bsf/remove_extradata.c | 3 +- src/ExtLib/ffmpeg/libavcodec/cbs_h2645.c | 2 +- src/ExtLib/ffmpeg/libavcodec/cbs_h265.h | 3 +- src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c | 4 +- src/ExtLib/ffmpeg/libavcodec/defs.h | 1 + src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c | 4 +- src/ExtLib/ffmpeg/libavcodec/h2645_parse.c | 3 +- .../libavcodec/{hevc_cabac.c => hevc/cabac.c} | 2 +- .../libavcodec/{hevc_data.c => hevc/data.c} | 2 +- .../libavcodec/{hevc_data.h => hevc/data.h} | 0 .../libavcodec/{hevcdsp.c => hevc/dsp.c} | 10 +- .../libavcodec/{hevcdsp.h => hevc/dsp.h} | 8 +- .../dsp_template.c} | 2 +- .../{hevc_filter.c => hevc/filter.c} | 0 .../ffmpeg/libavcodec/{ => hevc}/hevc.h | 6 +- .../ffmpeg/libavcodec/{ => hevc}/hevcdec.c | 38 +- .../ffmpeg/libavcodec/{ => hevc}/hevcdec.h | 36 +- .../libavcodec/{hevc_mvs.c => hevc/mvs.c} | 0 .../libavcodec/{hevc_parse.c => hevc/parse.c} | 2 +- .../libavcodec/{hevc_parse.h => hevc/parse.h} | 4 +- .../{hevc_parser.c => hevc/parser.c} | 6 +- .../libavcodec/{hevcpred.c => hevc/pred.c} | 10 +- .../libavcodec/{hevcpred.h => hevc/pred.h} | 6 +- .../pred_template.c} | 2 +- .../libavcodec/{hevc_ps.c => hevc/ps.c} | 4 +- .../libavcodec/{hevc_ps.h => hevc/ps.h} | 7 +- .../libavcodec/{hevc_refs.c => hevc/refs.c} | 0 .../libavcodec/{hevc_sei.c => hevc/sei.c} | 4 +- .../libavcodec/{hevc_sei.h => hevc/sei.h} | 7 +- src/ExtLib/ffmpeg/libavcodec/mpeg4audio.h | 83 +-- src/ExtLib/ffmpeg/libavcodec/nvdec_hevc.c | 4 +- src/ExtLib/ffmpeg/libavcodec/profiles.c | 1 + src/ExtLib/ffmpeg/libavcodec/profiles.h | 1 + src/ExtLib/ffmpeg/libavcodec/version.h | 2 +- src/ExtLib/ffmpeg/libavcodec/vp8.c | 12 +- src/ExtLib/ffmpeg/libavcodec/vvc/dec.c | 3 +- src/ExtLib/ffmpeg/libavcodec/vvc/inter.c | 508 ++++++++++-------- .../libavcodec/x86/hevc_idct_intrinsic.c | 2 +- .../libavcodec/x86/hevc_intra_intrinsic.c | 2 +- .../ffmpeg/libavcodec/x86/hevcdsp_init.c | 4 +- .../ffmpeg/libswscale/x86/yuv_2_rgb.asm | 8 +- 52 files changed, 598 insertions(+), 467 deletions(-) rename src/ExtLib/ffmpeg/libavcodec/{hevc_cabac.c => hevc/cabac.c} (99%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_data.c => hevc/data.c} (94%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_data.h => hevc/data.h} (100%) rename src/ExtLib/ffmpeg/libavcodec/{hevcdsp.c => hevc/dsp.c} (97%) rename src/ExtLib/ffmpeg/libavcodec/{hevcdsp.h => hevc/dsp.h} (98%) rename src/ExtLib/ffmpeg/libavcodec/{hevcdsp_template.c => hevc/dsp_template.c} (99%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_filter.c => hevc/filter.c} (100%) rename src/ExtLib/ffmpeg/libavcodec/{ => hevc}/hevc.h (95%) rename src/ExtLib/ffmpeg/libavcodec/{ => hevc}/hevcdec.c (96%) rename src/ExtLib/ffmpeg/libavcodec/{ => hevc}/hevcdec.h (97%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_mvs.c => hevc/mvs.c} (100%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_parse.c => hevc/parse.c} (99%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_parse.h => hevc/parse.h} (96%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_parser.c => hevc/parser.c} (96%) rename src/ExtLib/ffmpeg/libavcodec/{hevcpred.c => hevc/pred.c} (94%) rename src/ExtLib/ffmpeg/libavcodec/{hevcpred.h => hevc/pred.h} (95%) rename src/ExtLib/ffmpeg/libavcodec/{hevcpred_template.c => hevc/pred_template.c} (97%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_ps.c => hevc/ps.c} (97%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_ps.h => hevc/ps.h} (96%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_refs.c => hevc/refs.c} (100%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_sei.c => hevc/sei.c} (99%) rename src/ExtLib/ffmpeg/libavcodec/{hevc_sei.h => hevc/sei.h} (96%) diff --git a/docs/Changelog.Rus.txt b/docs/Changelog.Rus.txt index 0f74d593cf..70550f5ed6 100644 --- a/docs/Changelog.Rus.txt +++ b/docs/Changelog.Rus.txt @@ -3,7 +3,7 @@ 1.7.2.x dev ============================= Обновлены библиотеки: - ffmpeg git-n7.1-dev-1103-gba56a300a9. + ffmpeg git-n7.1-dev-1158-g7560db937d. 1.7.2 - 2024-06-07 diff --git a/docs/Changelog.txt b/docs/Changelog.txt index 9cb7a4a648..607617f143 100644 --- a/docs/Changelog.txt +++ b/docs/Changelog.txt @@ -3,7 +3,7 @@ 1.7.2.x dev ============================= Updated libraries: - ffmpeg git-n7.1-dev-1103-gba56a300a9. + ffmpeg git-n7.1-dev-1158-g7560db937d. 1.7.2 - 2024-06-07 diff --git a/src/ExtLib/ffmpeg/ffmpeg.mak b/src/ExtLib/ffmpeg/ffmpeg.mak index 316ce10642..bbb94aa942 100644 --- a/src/ExtLib/ffmpeg/ffmpeg.mak +++ b/src/ExtLib/ffmpeg/ffmpeg.mak @@ -67,6 +67,7 @@ OBJ_DIRS = $(OBJ_DIR) \ $(OBJ_DIR)libavcodec \ $(OBJ_DIR)libavcodec/bsf \ $(OBJ_DIR)libavcodec/aac \ + $(OBJ_DIR)libavcodec/hevc \ $(OBJ_DIR)libavcodec/vvc \ $(OBJ_DIR)libavcodec/x86 \ $(OBJ_DIR)libavcodec/x86/h26x \ @@ -292,18 +293,6 @@ SRCS_LC = \ libavcodec/half2float.c \ libavcodec/hap.c \ libavcodec/hapdec.c \ - libavcodec/hevc_cabac.c \ - libavcodec/hevc_data.c \ - libavcodec/hevc_filter.c \ - libavcodec/hevc_mvs.c \ - libavcodec/hevc_parse.c \ - libavcodec/hevc_parser.c \ - libavcodec/hevc_ps.c \ - libavcodec/hevc_refs.c \ - libavcodec/hevc_sei.c \ - libavcodec/hevcdec.c \ - libavcodec/hevcdsp.c \ - libavcodec/hevcpred.c \ libavcodec/hpeldsp.c \ libavcodec/hq_hqa.c \ libavcodec/hq_hqadsp.c \ @@ -425,7 +414,20 @@ SRCS_LC = \ libavcodec/aac/aacdec_float.c \ libavcodec/aac/aacdec_lpd.c \ libavcodec/aac/aacdec_tab.c \ - libavcodec/aac/aacdec_usac.c + libavcodec/aac/aacdec_usac.c \ + \ + libavcodec/hevc/cabac.c \ + libavcodec/hevc/data.c \ + libavcodec/hevc/dsp.c \ + libavcodec/hevc/filter.c \ + libavcodec/hevc/hevcdec.c \ + libavcodec/hevc/mvs.c \ + libavcodec/hevc/parse.c \ + libavcodec/hevc/parser.c \ + libavcodec/hevc/pred.c \ + libavcodec/hevc/ps.c \ + libavcodec/hevc/refs.c \ + libavcodec/hevc/sei.c SRCS_LC_B = \ libavcodec/nvdec.c \ diff --git a/src/ExtLib/ffmpeg/libavcodec/aac.h b/src/ExtLib/ffmpeg/libavcodec/aac.h index 9508760fa6..fc6d1361b2 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac.h +++ b/src/ExtLib/ffmpeg/libavcodec/aac.h @@ -31,7 +31,7 @@ #define AVCODEC_AAC_H #define MAX_CHANNELS 64 -#define MAX_ELEM_ID 16 +#define MAX_ELEM_ID 64 #define TNS_MAX_ORDER 20 #define MAX_LTP_LONG_SFB 40 diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c index 2b8322fc68..eecb6d8f3d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.c @@ -1046,7 +1046,6 @@ static int decode_audio_specific_config_gb(AACDecContext *ac, return ret; break; #if CONFIG_AAC_DECODER - case AOT_USAC_NOSBR: /* fallthrough */ case AOT_USAC: if ((ret = ff_aac_usac_config_decode(ac, avctx, gb, oc, m4ac->chan_config)) < 0) @@ -1335,6 +1334,7 @@ static int decode_ics_info(AACDecContext *ac, IndividualChannelStream *ics, ics->use_kb_window[1] = ics->use_kb_window[0]; ics->use_kb_window[0] = get_bits1(gb); } + ics->prev_num_window_groups = FFMAX(ics->num_window_groups, 1); ics->num_window_groups = 1; ics->group_len[0] = 1; if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { @@ -1571,8 +1571,7 @@ int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics) { int tns_max_order = INT32_MAX; - const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC || - ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR; + const int is_usac = ac->oc[1].m4ac.object_type == AOT_USAC; int w, filt, i, coef_len, coef_res, coef_compress; const int is8 = ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE; @@ -2421,8 +2420,7 @@ static int aac_decode_frame_int(AVCodecContext *avctx, AVFrame *frame, ac->tags_mapped = 0; - if ((ac->oc[1].m4ac.object_type == AOT_USAC) || - (ac->oc[1].m4ac.object_type == AOT_USAC_NOSBR)) { + if (ac->oc[1].m4ac.object_type == AOT_USAC) { if (ac->is_fixed) { avpriv_report_missing_feature(ac->avctx, "AAC USAC fixed-point decoding"); diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h index ee21a94007..86faf6454a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec.h @@ -125,6 +125,7 @@ typedef struct LongTermPrediction { typedef struct AACUsacElemData { uint8_t core_mode; uint8_t scale_factor_grouping; + uint8_t tns_data_present; /* Timewarping ratio */ #define NUM_TW_NODES 16 @@ -163,6 +164,7 @@ typedef struct IndividualChannelStream { enum WindowSequence window_sequence[2]; uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window. int num_window_groups; + int prev_num_window_groups; ///< Previous frame's number of window groups uint8_t group_len[8]; LongTermPrediction ltp; const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window @@ -230,6 +232,7 @@ typedef struct SingleChannelElement { typedef struct AACUsacStereo { uint8_t common_window; uint8_t common_tw; + uint8_t tns_on_lr; ///< Apply TNS before M/S and stereo prediction uint8_t ms_mask_mode; uint8_t config_idx; diff --git a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c index 7b36b49d63..aa89b83182 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c +++ b/src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c @@ -268,17 +268,25 @@ int ff_aac_usac_reset_state(AACDecContext *ac, OutputConfiguration *oc) /* Initialize state */ for (int i = 0; i < usac->nb_elems; i++) { AACUsacElemConfig *e = &usac->elems[i]; - if (e->type != ID_USAC_SCE && e->type != ID_USAC_CPE) + if (e->type == ID_USAC_EXT) continue; - if (e->type == ID_USAC_SCE) { + switch (e->type) { + case ID_USAC_SCE: ch = 1; type = TYPE_SCE; id = elem_id[0]++; - } else { + break; + case ID_USAC_CPE: ch = 2; type = TYPE_CPE; id = elem_id[1]++; + break; + case ID_USAC_LFE: + ch = 1; + type = TYPE_LFE; + id = elem_id[2]++; + break; } che = ff_aac_get_che(ac, type, id); @@ -318,7 +326,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, AACUSACConfig *usac = &oc->usac; int elem_id[3 /* SCE, CPE, LFE */]; - uint8_t layout_map[MAX_ELEM_ID*4][3]; + int map_pos_set = 0; + uint8_t layout_map[MAX_ELEM_ID*4][3] = { 0 }; memset(usac, 0, sizeof(*usac)); @@ -371,8 +380,6 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, for (int i = 0; i < nb_channels; i++) { AVChannelCustom *cm = &ac->oc[1].ch_layout.u.map[i]; cm->id = usac_ch_pos_to_av[get_bits(gb, 5)]; /* bsOutputChannelPos */ - if (cm->id == AV_CHAN_NONE) - cm->id = AV_CHAN_UNKNOWN; } ret = av_channel_layout_retype(&ac->oc[1].ch_layout, @@ -393,6 +400,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, /* Fill in the number of expected channels */ for (int i = 0; i < nb_elements; i++) nb_channels += layout_map[i][0] == TYPE_CPE ? 2 : 1; + + map_pos_set = 1; } /* UsacDecoderConfig */ @@ -401,18 +410,20 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, if (usac->nb_elems > 64) { av_log(ac->avctx, AV_LOG_ERROR, "Too many elements: %i\n", usac->nb_elems); + usac->nb_elems = 0; return AVERROR(EINVAL); } for (int i = 0; i < usac->nb_elems; i++) { + int map_count = elem_id[0] + elem_id[1] + elem_id[2]; AACUsacElemConfig *e = &usac->elems[i]; memset(e, 0, sizeof(*e)); e->type = get_bits(gb, 2); /* usacElementType */ - if (e->type != ID_USAC_EXT && - (elem_id[0] + elem_id[1] + elem_id[2] + 1) > nb_channels) { + if (e->type != ID_USAC_EXT && (map_count + 1) > nb_channels) { av_log(ac->avctx, AV_LOG_ERROR, "Too many channels for the channel " "configuration\n"); + usac->nb_elems = 0; return AVERROR(EINVAL); } @@ -425,27 +436,31 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, decode_usac_element_core(e, gb, sbr_ratio); if (e->sbr.ratio > 0) decode_usac_sbr_data(e, gb); - layout_map[i][0] = TYPE_SCE; - layout_map[i][1] = i; - layout_map[i][2] = AAC_CHANNEL_FRONT; - elem_id[0]++; + layout_map[map_count][0] = TYPE_SCE; + layout_map[map_count][1] = elem_id[0]++; + if (!map_pos_set) + layout_map[map_count][2] = AAC_CHANNEL_FRONT; break; case ID_USAC_CPE: /* UsacChannelPairElementConf */ /* UsacCoreConfig */ decode_usac_element_core(e, gb, sbr_ratio); decode_usac_element_pair(e, gb); - layout_map[i][0] = TYPE_CPE; - layout_map[i][1] = i; - layout_map[i][2] = AAC_CHANNEL_FRONT; - elem_id[1]++; + layout_map[map_count][0] = TYPE_CPE; + layout_map[map_count][1] = elem_id[1]++; + if (!map_pos_set) + layout_map[map_count][2] = AAC_CHANNEL_FRONT; break; case ID_USAC_LFE: /* LFE */ /* LFE has no need for any configuration */ e->tw_mdct = 0; e->noise_fill = 0; - elem_id[2]++; + layout_map[map_count][0] = TYPE_LFE; + layout_map[map_count][1] = elem_id[2]++; + if (!map_pos_set) + layout_map[map_count][2] = AAC_CHANNEL_LFE; + break; case ID_USAC_EXT: /* EXT */ ret = decode_usac_extension(ac, e, gb); @@ -455,9 +470,11 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, }; } - ret = ff_aac_output_configure(ac, layout_map, elem_id[0] + elem_id[1] + elem_id[2], OC_GLOBAL_HDR, 0); + ret = ff_aac_output_configure(ac, layout_map, elem_id[0] + elem_id[1] + elem_id[2], + OC_GLOBAL_HDR, 0); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Unable to parse channel config!\n"); + usac->nb_elems = 0; return ret; } @@ -494,6 +511,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, AVCodecContext *avctx, } } + ac->avctx->profile = AV_PROFILE_AAC_USAC; + ret = ff_aac_usac_reset_state(ac, oc); if (ret < 0) return ret; @@ -553,9 +572,15 @@ static int decode_spectrum_and_dequant_ac(AACDecContext *s, float coef[1024], int gb_count; GetBitContext gb2; - ff_aac_ac_init(&ac, gb); c = ff_aac_ac_map_process(state, reset, N); + if (!len) { + ff_aac_ac_finish(state, 0, N); + return 0; + } + + ff_aac_ac_init(&ac, gb); + /* Backup reader for rolling back by 14 bits at the end */ gb2 = *gb; gb_count = get_bits_count(&gb2); @@ -633,7 +658,9 @@ static int decode_spectrum_and_dequant_ac(AACDecContext *s, float coef[1024], static int decode_usac_stereo_cplx(AACDecContext *ac, AACUsacStereo *us, ChannelElement *cpe, GetBitContext *gb, - int num_window_groups, int indep_flag) + int num_window_groups, + int prev_num_window_groups, + int indep_flag) { int delta_code_time; IndividualChannelStream *ics = &cpe->ch[0].ics; @@ -664,6 +691,10 @@ static int decode_usac_stereo_cplx(AACDecContext *ac, AACUsacStereo *us, if (!indep_flag) delta_code_time = get_bits1(gb); + /* Alpha values must be zeroed out if pred_used is 0. */ + memset(us->alpha_q_re, 0, sizeof(us->alpha_q_re)); + memset(us->alpha_q_im, 0, sizeof(us->alpha_q_im)); + /* TODO: shouldn't be needed */ for (int g = 0; g < num_window_groups; g++) { for (int sfb = 0; sfb < cpe->max_sfb_ste; sfb += SFB_PER_PRED_BAND) { @@ -671,15 +702,18 @@ static int decode_usac_stereo_cplx(AACDecContext *ac, AACUsacStereo *us, float last_alpha_q_im = 0; if (delta_code_time) { if (g) { - last_alpha_q_re = us->prev_alpha_q_re[(g - 1)*cpe->max_sfb_ste + sfb]; - last_alpha_q_im = us->prev_alpha_q_im[(g - 1)*cpe->max_sfb_ste + sfb]; - } else if ((ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) && - ics->window_sequence[1] == EIGHT_SHORT_SEQUENCE || - ics->window_sequence[1] == EIGHT_SHORT_SEQUENCE) { + /* Transient, after the first group - use the current frame, + * previous window, alpha values. */ + last_alpha_q_re = us->alpha_q_re[(g - 1)*cpe->max_sfb_ste + sfb]; + last_alpha_q_im = us->alpha_q_im[(g - 1)*cpe->max_sfb_ste + sfb]; + } else if (!g && + (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) && + (ics->window_sequence[1] == EIGHT_SHORT_SEQUENCE)) { /* The spec doesn't explicitly mention this, but it doesn't make * any other sense otherwise! */ - last_alpha_q_re = us->prev_alpha_q_re[7*cpe->max_sfb_ste + sfb]; - last_alpha_q_im = us->prev_alpha_q_im[7*cpe->max_sfb_ste + sfb]; + const int wg = prev_num_window_groups - 1; + last_alpha_q_re = us->prev_alpha_q_re[wg*cpe->max_sfb_ste + sfb]; + last_alpha_q_im = us->prev_alpha_q_im[wg*cpe->max_sfb_ste + sfb]; } else { last_alpha_q_re = us->prev_alpha_q_re[g*cpe->max_sfb_ste + sfb]; last_alpha_q_im = us->prev_alpha_q_im[g*cpe->max_sfb_ste + sfb]; @@ -724,6 +758,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, IndividualChannelStream *ics = &sce->ics; /* Setup window parameters */ + ics->prev_num_window_groups = FFMAX(ics->num_window_groups, 1); if (ics->window_sequence[0] == EIGHT_SHORT_SEQUENCE) { if (usac->core_frame_len == 768) { ics->swb_offset = ff_swb_offset_96[usac->rate_idx]; @@ -732,7 +767,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, ics->swb_offset = ff_swb_offset_128[usac->rate_idx]; ics->num_swb = ff_aac_num_swb_128[usac->rate_idx]; } - ics->tns_max_bands = ff_tns_max_bands_128[usac->rate_idx]; + ics->tns_max_bands = ff_tns_max_bands_usac_128[usac->rate_idx]; /* Setup scalefactor grouping. 7 bit mask. */ ics->num_window_groups = 0; @@ -755,7 +790,7 @@ static int setup_sce(AACDecContext *ac, SingleChannelElement *sce, ics->swb_offset = ff_swb_offset_1024[usac->rate_idx]; ics->num_swb = ff_aac_num_swb_1024[usac->rate_idx]; } - ics->tns_max_bands = ff_tns_max_bands_1024[usac->rate_idx]; + ics->tns_max_bands = ff_tns_max_bands_usac_1024[usac->rate_idx]; ics->group_len[0] = 1; ics->num_window_groups = 1; @@ -844,7 +879,9 @@ static int decode_usac_stereo_info(AACDecContext *ac, AACUSACConfig *usac, memset(cpe->ms_mask, 0xFF, sizeof(cpe->ms_mask)); } else if ((us->ms_mask_mode == 3) && !ec->stereo_config_index) { ret = decode_usac_stereo_cplx(ac, us, cpe, gb, - ics1->num_window_groups, indep_flag); + ics1->num_window_groups, + ics1->prev_num_window_groups, + indep_flag); if (ret < 0) return ret; } @@ -857,28 +894,30 @@ static int decode_usac_stereo_info(AACDecContext *ac, AACUSACConfig *usac, return AVERROR_PATCHWELCOME; } - sce1->tns.present = sce2->tns.present = 0; + us->tns_on_lr = 0; + ue1->tns_data_present = ue2->tns_data_present = 0; if (tns_active) { - av_unused int tns_on_lr; int common_tns = 0; if (us->common_window) common_tns = get_bits1(gb); - tns_on_lr = get_bits1(gb); + us->tns_on_lr = get_bits1(gb); if (common_tns) { ret = ff_aac_decode_tns(ac, &sce1->tns, gb, ics1); if (ret < 0) return ret; memcpy(&sce2->tns, &sce1->tns, sizeof(sce1->tns)); - sce2->tns.present = 0; - sce1->tns.present = 0; + sce2->tns.present = 1; + sce1->tns.present = 1; + ue1->tns_data_present = 0; + ue2->tns_data_present = 0; } else { if (get_bits1(gb)) { - sce2->tns.present = 1; - sce1->tns.present = 1; + ue1->tns_data_present = 1; + ue2->tns_data_present = 1; } else { - sce2->tns.present = get_bits1(gb); - sce1->tns.present = !sce2->tns.present; + ue2->tns_data_present = get_bits1(gb); + ue1->tns_data_present = !ue2->tns_data_present; } } } @@ -903,7 +942,7 @@ static void apply_noise_fill(AACDecContext *ac, SingleChannelElement *sce, float *coef; IndividualChannelStream *ics = &sce->ics; - float noise_val = pow(2, (ue->noise.level - 14)/3); + float noise_val = powf(2, ((float)ue->noise.level - 14.0f)/3.0f); int noise_offset = ue->noise.offset - 16; int band_off; @@ -1195,6 +1234,14 @@ static void spectrum_decode(AACDecContext *ac, AACUSACConfig *usac, } if (nb_channels > 1 && us->common_window) { + for (int ch = 0; ch < nb_channels; ch++) { + SingleChannelElement *sce = &cpe->ch[ch]; + + /* Apply TNS, if the tns_on_lr bit is not set. */ + if (sce->tns.present && !us->tns_on_lr) + ac->dsp.apply_tns(sce->coeffs, &sce->tns, &sce->ics, 1); + } + if (us->ms_mask_mode == 3) { const float *filt; complex_stereo_downmix_cur(ac, cpe, us->dmix_re); @@ -1229,8 +1276,8 @@ static void spectrum_decode(AACDecContext *ac, AACUSACConfig *usac, for (int ch = 0; ch < nb_channels; ch++) { SingleChannelElement *sce = &cpe->ch[ch]; - /* Apply TNS */ - if (sce->tns.present) + /* Apply TNS, if it hasn't been applied yet. */ + if (sce->tns.present && ((nb_channels == 1) || (us->tns_on_lr))) ac->dsp.apply_tns(sce->coeffs, &sce->tns, &sce->ics, 1); ac->oc[1].m4ac.frame_length_short ? ac->dsp.imdct_and_windowing_768(ac, sce) : @@ -1250,12 +1297,14 @@ static int decode_usac_core_coder(AACDecContext *ac, AACUSACConfig *usac, uint8_t global_gain; us->common_window = 0; - che->ch[0].tns.present = che->ch[1].tns.present = 0; for (int ch = 0; ch < nb_channels; ch++) { SingleChannelElement *sce = &che->ch[ch]; AACUsacElemData *ue = &sce->ue; + sce->tns.present = 0; + ue->tns_data_present = 0; + ue->core_mode = get_bits1(gb); } @@ -1274,11 +1323,12 @@ static int decode_usac_core_coder(AACDecContext *ac, AACUSACConfig *usac, ret = ff_aac_ldp_parse_channel_stream(ac, usac, ue, gb); if (ret < 0) return ret; + continue; } if ((nb_channels == 1) || (che->ch[0].ue.core_mode != che->ch[1].ue.core_mode)) - sce->tns.present = get_bits1(gb); + ue->tns_data_present = get_bits1(gb); /* fd_channel_stream */ global_gain = get_bits(gb, 8); @@ -1323,7 +1373,8 @@ static int decode_usac_core_coder(AACDecContext *ac, AACUSACConfig *usac, ac->dsp.dequant_scalefactors(sce); - if (sce->tns.present) { + if (ue->tns_data_present) { + sce->tns.present = 1; ret = ff_aac_decode_tns(ac, &sce->tns, gb, ics); if (ret < 0) return ret; @@ -1525,52 +1576,60 @@ static int parse_ext_ele(AACDecContext *ac, AACUsacElemConfig *e, int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, GetBitContext *gb, int *got_frame_ptr) { - int ret, nb_ch_el, is_dmono = 0; + int ret, is_dmono = 0; int indep_flag, samples = 0; - int audio_found = 0, sce_count = 0; + int audio_found = 0; + int elem_id[3 /* SCE, CPE, LFE */] = { 0, 0, 0 }; + AVFrame *frame = ac->frame; ff_aac_output_configure(ac, ac->oc[1].layout_map, ac->oc[1].layout_map_tags, ac->oc[1].status, 0); + ac->avctx->profile = AV_PROFILE_AAC_USAC; + indep_flag = get_bits1(gb); - nb_ch_el = 0; for (int i = 0; i < ac->oc[1].usac.nb_elems; i++) { + int layout_id; + int layout_type; AACUsacElemConfig *e = &ac->oc[1].usac.elems[i]; ChannelElement *che; + if (e->type == ID_USAC_SCE) { + layout_id = elem_id[0]++; + layout_type = TYPE_SCE; + che = ff_aac_get_che(ac, TYPE_SCE, layout_id); + } else if (e->type == ID_USAC_CPE) { + layout_id = elem_id[1]++; + layout_type = TYPE_CPE; + che = ff_aac_get_che(ac, TYPE_CPE, layout_id); + } else if (e->type == ID_USAC_LFE) { + layout_id = elem_id[2]++; + layout_type = TYPE_LFE; + che = ff_aac_get_che(ac, TYPE_LFE, layout_id); + } + + if (e->type != ID_USAC_EXT && !che) { + av_log(ac->avctx, AV_LOG_ERROR, + "channel element %d.%d is not allocated\n", + layout_type, layout_id); + return AVERROR_INVALIDDATA; + } + switch (e->type) { case ID_USAC_LFE: /* Fallthrough */ case ID_USAC_SCE: - che = ff_aac_get_che(ac, TYPE_SCE, nb_ch_el++); - if (!che) { - av_log(ac->avctx, AV_LOG_ERROR, - "channel element %d.%d is not allocated\n", - TYPE_SCE, nb_ch_el - 1); - return AVERROR_INVALIDDATA; - } - ret = decode_usac_core_coder(ac, &ac->oc[1].usac, e, che, gb, indep_flag, 1); if (ret < 0) return ret; - sce_count++; audio_found = 1; che->present = 1; - samples = ac->oc[1].m4ac.frame_length_short ? 768 : 1024; break; case ID_USAC_CPE: - che = ff_aac_get_che(ac, TYPE_CPE, nb_ch_el++); - if (!che) { - av_log(ac->avctx, AV_LOG_ERROR, - "channel element %d.%d is not allocated\n", - TYPE_CPE, nb_ch_el - 1); - return AVERROR_INVALIDDATA; - } - ret = decode_usac_core_coder(ac, &ac->oc[1].usac, e, che, gb, indep_flag, 2); if (ret < 0) @@ -1578,7 +1637,6 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, audio_found = 1; che->present = 1; - samples = ac->oc[1].m4ac.frame_length_short ? 768 : 1024; break; case ID_USAC_EXT: ret = parse_ext_ele(ac, e, gb); @@ -1588,6 +1646,9 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, } } + if (audio_found) + samples = ac->oc[1].m4ac.frame_length_short ? 768 : 1024; + if (ac->oc[1].status && audio_found) { avctx->sample_rate = ac->oc[1].m4ac.sample_rate; avctx->frame_size = samples; @@ -1611,7 +1672,7 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, AACDecContext *ac, } /* for dual-mono audio (SCE + SCE) */ - is_dmono = ac->dmono_mode && sce_count == 2 && + is_dmono = ac->dmono_mode && elem_id[0] == 2 && !av_channel_layout_compare(&ac->oc[1].ch_layout, &(AVChannelLayout)AV_CHANNEL_LAYOUT_STEREO); if (is_dmono) { diff --git a/src/ExtLib/ffmpeg/libavcodec/aactab.c b/src/ExtLib/ffmpeg/libavcodec/aactab.c index 2f266eba6d..b967e7f8d8 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aactab.c +++ b/src/ExtLib/ffmpeg/libavcodec/aactab.c @@ -1985,6 +1985,10 @@ const uint8_t ff_tns_max_bands_1024[] = { 31, 31, 34, 40, 42, 51, 46, 46, 42, 42, 42, 39, 39 }; +const uint8_t ff_tns_max_bands_usac_1024[] = { + 31, 31, 34, 40, 42, 51, 47, 47, 43, 43, 43, 40, 40 +}; + const uint8_t ff_tns_max_bands_512[] = { 0, 0, 0, 31, 32, 37, 31, 31, 0, 0, 0, 0, 0 }; @@ -1996,6 +2000,10 @@ const uint8_t ff_tns_max_bands_480[] = { const uint8_t ff_tns_max_bands_128[] = { 9, 9, 10, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 }; + +const uint8_t ff_tns_max_bands_usac_128[] = { + 9, 9, 10, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15 +}; // @} const uint8_t ff_usac_noise_fill_start_offset[2][2] = { diff --git a/src/ExtLib/ffmpeg/libavcodec/aactab.h b/src/ExtLib/ffmpeg/libavcodec/aactab.h index d140b3524e..4d5a0c3ed7 100644 --- a/src/ExtLib/ffmpeg/libavcodec/aactab.h +++ b/src/ExtLib/ffmpeg/libavcodec/aactab.h @@ -115,6 +115,9 @@ extern const uint8_t ff_tns_max_bands_512 [13]; extern const uint8_t ff_tns_max_bands_480 [13]; extern const uint8_t ff_tns_max_bands_128 [13]; +extern const uint8_t ff_tns_max_bands_usac_1024[13]; +extern const uint8_t ff_tns_max_bands_usac_128[13]; + /* [x][y], x == 1 -> frame len is 768 frames, y == 1 -> is eight_short */ extern const uint8_t ff_usac_noise_fill_start_offset[2][2]; diff --git a/src/ExtLib/ffmpeg/libavcodec/bsf/extract_extradata.c b/src/ExtLib/ffmpeg/libavcodec/bsf/extract_extradata.c index dc6e6d5417..8c5c907eb5 100644 --- a/src/ExtLib/ffmpeg/libavcodec/bsf/extract_extradata.c +++ b/src/ExtLib/ffmpeg/libavcodec/bsf/extract_extradata.c @@ -29,11 +29,12 @@ #include "bytestream.h" #include "h2645_parse.h" #include "h264.h" -#include "hevc.h" #include "startcode.h" #include "vc1_common.h" #include "vvc.h" +#include "hevc/hevc.h" + typedef struct ExtractExtradataContext { const AVClass *class; diff --git a/src/ExtLib/ffmpeg/libavcodec/bsf/hevc_mp4toannexb.c b/src/ExtLib/ffmpeg/libavcodec/bsf/hevc_mp4toannexb.c index 8eec18f31e..f281185769 100644 --- a/src/ExtLib/ffmpeg/libavcodec/bsf/hevc_mp4toannexb.c +++ b/src/ExtLib/ffmpeg/libavcodec/bsf/hevc_mp4toannexb.c @@ -28,7 +28,8 @@ #include "bsf_internal.h" #include "bytestream.h" #include "defs.h" -#include "hevc.h" + +#include "hevc/hevc.h" #define MIN_HEVCC_LENGTH 23 diff --git a/src/ExtLib/ffmpeg/libavcodec/bsf/remove_extradata.c b/src/ExtLib/ffmpeg/libavcodec/bsf/remove_extradata.c index 3010eba058..b4a0359434 100644 --- a/src/ExtLib/ffmpeg/libavcodec/bsf/remove_extradata.c +++ b/src/ExtLib/ffmpeg/libavcodec/bsf/remove_extradata.c @@ -25,10 +25,11 @@ #include "bsf.h" #include "bsf_internal.h" #include "h264.h" -#include "hevc.h" #include "startcode.h" #include "vc1_common.h" +#include "hevc/hevc.h" + enum RemoveFreq { REMOVE_FREQ_KEYFRAME, REMOVE_FREQ_ALL, diff --git a/src/ExtLib/ffmpeg/libavcodec/cbs_h2645.c b/src/ExtLib/ffmpeg/libavcodec/cbs_h2645.c index 1a45d424ba..c5f167334d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/cbs_h2645.c +++ b/src/ExtLib/ffmpeg/libavcodec/cbs_h2645.c @@ -28,10 +28,10 @@ #include "cbs_h266.h" #include "h264.h" #include "h2645_parse.h" -#include "hevc.h" #include "refstruct.h" #include "vvc.h" +#include "hevc/hevc.h" static int cbs_read_ue_golomb(CodedBitstreamContext *ctx, GetBitContext *gbc, const char *name, const int *subscripts, diff --git a/src/ExtLib/ffmpeg/libavcodec/cbs_h265.h b/src/ExtLib/ffmpeg/libavcodec/cbs_h265.h index 1b1195f198..91a5a55317 100644 --- a/src/ExtLib/ffmpeg/libavcodec/cbs_h265.h +++ b/src/ExtLib/ffmpeg/libavcodec/cbs_h265.h @@ -24,7 +24,8 @@ #include "cbs_h2645.h" #include "cbs_sei.h" -#include "hevc.h" + +#include "hevc/hevc.h" typedef struct H265RawNALUnitHeader { uint8_t nal_unit_type; diff --git a/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c b/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c index 0afa752825..87c1daed71 100644 --- a/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/d3d12va_hevc.c @@ -24,8 +24,8 @@ #include "libavutil/avassert.h" #include "libavutil/hwcontext_d3d12va_internal.h" -#include "hevc_data.h" -#include "hevcdec.h" +#include "hevc/data.h" +#include "hevc/hevcdec.h" #include "dxva2_internal.h" #include "d3d12va_decode.h" #include diff --git a/src/ExtLib/ffmpeg/libavcodec/defs.h b/src/ExtLib/ffmpeg/libavcodec/defs.h index 00d840ec19..7ddfdcad0b 100644 --- a/src/ExtLib/ffmpeg/libavcodec/defs.h +++ b/src/ExtLib/ffmpeg/libavcodec/defs.h @@ -73,6 +73,7 @@ #define AV_PROFILE_AAC_HE_V2 28 #define AV_PROFILE_AAC_LD 22 #define AV_PROFILE_AAC_ELD 38 +#define AV_PROFILE_AAC_USAC 41 #define AV_PROFILE_MPEG2_AAC_LOW 128 #define AV_PROFILE_MPEG2_AAC_HE 131 diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c index c67580b8a9..fecfbb81df 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2_hevc.c @@ -25,8 +25,8 @@ #include "libavutil/avassert.h" #include "dxva2_internal.h" -#include "hevc_data.h" -#include "hevcdec.h" +#include "hevc/data.h" +#include "hevc/hevcdec.h" #include "hwaccel_internal.h" #define MAX_SLICES 256 diff --git a/src/ExtLib/ffmpeg/libavcodec/h2645_parse.c b/src/ExtLib/ffmpeg/libavcodec/h2645_parse.c index d89c9ce8e5..f13c0b13a1 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h2645_parse.c +++ b/src/ExtLib/ffmpeg/libavcodec/h2645_parse.c @@ -27,11 +27,12 @@ #include "libavutil/mem.h" #include "bytestream.h" -#include "hevc.h" #include "h264.h" #include "h2645_parse.h" #include "vvc.h" +#include "hevc/hevc.h" + int ff_h2645_extract_rbsp(const uint8_t *src, int length, H2645RBSP *rbsp, H2645NAL *nal, int small_padding) { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c b/src/ExtLib/ffmpeg/libavcodec/hevc/cabac.c similarity index 99% rename from src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/cabac.c index c9da4d7fc1..37f144758a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_cabac.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/cabac.c @@ -25,7 +25,7 @@ #include "libavutil/common.h" #include "cabac_functions.h" -#include "hevc_data.h" +#include "data.h" #include "hevc.h" #include "hevcdec.h" diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_data.c b/src/ExtLib/ffmpeg/libavcodec/hevc/data.c similarity index 94% rename from src/ExtLib/ffmpeg/libavcodec/hevc_data.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/data.c index c461ed0291..e1199c88df 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_data.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/data.c @@ -20,7 +20,7 @@ #include -#include "hevc_data.h" +#include "data.h" const uint8_t ff_hevc_diag_scan4x4_x[16] = { 0, 0, 1, 0, diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_data.h b/src/ExtLib/ffmpeg/libavcodec/hevc/data.h similarity index 100% rename from src/ExtLib/ffmpeg/libavcodec/hevc_data.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/data.h diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdsp.c b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp.c similarity index 97% rename from src/ExtLib/ffmpeg/libavcodec/hevcdsp.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/dsp.c index 89a07fe478..2f7e9cea9b 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdsp.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp.c @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "hevcdsp.h" +#include "dsp.h" static const int8_t transform[32][32] = { { 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, @@ -110,19 +110,19 @@ DECLARE_ALIGNED(16, const int8_t, ff_hevc_qpel_filters)[4][16] = { }; #define BIT_DEPTH 8 -#include "hevcdsp_template.c" +#include "dsp_template.c" #undef BIT_DEPTH #define BIT_DEPTH 9 -#include "hevcdsp_template.c" +#include "dsp_template.c" #undef BIT_DEPTH #define BIT_DEPTH 10 -#include "hevcdsp_template.c" +#include "dsp_template.c" #undef BIT_DEPTH #define BIT_DEPTH 12 -#include "hevcdsp_template.c" +#include "dsp_template.c" #undef BIT_DEPTH void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth) diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdsp.h b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp.h similarity index 98% rename from src/ExtLib/ffmpeg/libavcodec/hevcdsp.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/dsp.h index a5933dcac4..02b8e0e8e2 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdsp.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp.h @@ -22,12 +22,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_HEVCDSP_H -#define AVCODEC_HEVCDSP_H +#ifndef AVCODEC_HEVC_DSP_H +#define AVCODEC_HEVC_DSP_H #include "libavutil/mem_internal.h" -#include "get_bits.h" +#include "libavcodec/get_bits.h" #define MAX_PB_SIZE 64 @@ -137,4 +137,4 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth); void ff_hevc_dsp_init_mips(HEVCDSPContext *c, const int bit_depth); void ff_hevc_dsp_init_loongarch(HEVCDSPContext *c, const int bit_depth); -#endif /* AVCODEC_HEVCDSP_H */ +#endif /* AVCODEC_HEVC_DSP_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdsp_template.c b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp_template.c similarity index 99% rename from src/ExtLib/ffmpeg/libavcodec/hevcdsp_template.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/dsp_template.c index 121c44c401..aebccd1a0c 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdsp_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/dsp_template.c @@ -24,7 +24,7 @@ #include "hevcdec.h" #include "bit_depth_template.c" -#include "hevcdsp.h" +#include "dsp.h" #include "h26x/h2656_sao_template.c" #include "h26x/h2656_inter_template.c" diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_filter.c b/src/ExtLib/ffmpeg/libavcodec/hevc/filter.c similarity index 100% rename from src/ExtLib/ffmpeg/libavcodec/hevc_filter.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/filter.c diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc.h b/src/ExtLib/ffmpeg/libavcodec/hevc/hevc.h similarity index 95% rename from src/ExtLib/ffmpeg/libavcodec/hevc.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/hevc.h index c6faa022c3..3024e45f03 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/hevc.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_HEVC_H -#define AVCODEC_HEVC_H +#ifndef AVCODEC_HEVC_HEVC_H +#define AVCODEC_HEVC_HEVC_H /** * Table 7-1 – NAL unit type codes and NAL unit type classes in @@ -160,4 +160,4 @@ enum { }; -#endif /* AVCODEC_HEVC_H */ +#endif /* AVCODEC_HEVC_HEVC_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c b/src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.c similarity index 96% rename from src/ExtLib/ffmpeg/libavcodec/hevcdec.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.c index b32b605cea..5fb9d863c9 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.c @@ -43,7 +43,7 @@ #include "decode.h" #include "golomb.h" #include "hevc.h" -#include "hevc_parse.h" +#include "parse.h" #include "hevcdec.h" #include "hwaccel_internal.h" #include "hwconfig.h" @@ -3017,49 +3017,37 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal) s->nal_unit_type = nal->type; s->temporal_id = nal->temporal_id; + if (FF_HW_HAS_CB(s->avctx, decode_params) && + (s->nal_unit_type == HEVC_NAL_VPS || + s->nal_unit_type == HEVC_NAL_SPS || + s->nal_unit_type == HEVC_NAL_PPS || + s->nal_unit_type == HEVC_NAL_SEI_PREFIX || + s->nal_unit_type == HEVC_NAL_SEI_SUFFIX)) { + ret = FF_HW_CALL(s->avctx, decode_params, + nal->type, nal->raw_data, nal->raw_size); + if (ret < 0) + goto fail; + } + switch (s->nal_unit_type) { case HEVC_NAL_VPS: - if (FF_HW_HAS_CB(s->avctx, decode_params)) { - ret = FF_HW_CALL(s->avctx, decode_params, - nal->type, nal->raw_data, nal->raw_size); - if (ret < 0) - goto fail; - } ret = ff_hevc_decode_nal_vps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; break; case HEVC_NAL_SPS: - if (FF_HW_HAS_CB(s->avctx, decode_params)) { - ret = FF_HW_CALL(s->avctx, decode_params, - nal->type, nal->raw_data, nal->raw_size); - if (ret < 0) - goto fail; - } ret = ff_hevc_decode_nal_sps(&gb, s->avctx, &s->ps, s->apply_defdispwin); if (ret < 0) goto fail; break; case HEVC_NAL_PPS: - if (FF_HW_HAS_CB(s->avctx, decode_params)) { - ret = FF_HW_CALL(s->avctx, decode_params, - nal->type, nal->raw_data, nal->raw_size); - if (ret < 0) - goto fail; - } ret = ff_hevc_decode_nal_pps(&gb, s->avctx, &s->ps); if (ret < 0) goto fail; break; case HEVC_NAL_SEI_PREFIX: case HEVC_NAL_SEI_SUFFIX: - if (FF_HW_HAS_CB(s->avctx, decode_params)) { - ret = FF_HW_CALL(s->avctx, decode_params, - nal->type, nal->raw_data, nal->raw_size); - if (ret < 0) - goto fail; - } ret = ff_hevc_decode_nal_sei(&gb, s->avctx, &s->sei, &s->ps, s->nal_unit_type); if (ret < 0) goto fail; diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h b/src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.h similarity index 97% rename from src/ExtLib/ffmpeg/libavcodec/hevcdec.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.h index 0cd6b8c2b4..33ad4ac0aa 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcdec.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/hevcdec.h @@ -20,28 +20,29 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_HEVCDEC_H -#define AVCODEC_HEVCDEC_H +#ifndef AVCODEC_HEVC_HEVCDEC_H +#define AVCODEC_HEVC_HEVCDEC_H #include #include "libavutil/buffer.h" #include "libavutil/mem_internal.h" -#include "avcodec.h" -#include "bswapdsp.h" -#include "cabac.h" -#include "dovi_rpu.h" -#include "get_bits.h" -#include "hevcpred.h" -#include "h2645_parse.h" +#include "libavcodec/avcodec.h" +#include "libavcodec/bswapdsp.h" +#include "libavcodec/cabac.h" +#include "libavcodec/dovi_rpu.h" +#include "libavcodec/get_bits.h" +#include "libavcodec/h2645_parse.h" +#include "libavcodec/h274.h" +#include "libavcodec/progressframe.h" +#include "libavcodec/videodsp.h" + +#include "dsp.h" #include "hevc.h" -#include "hevc_ps.h" -#include "hevc_sei.h" -#include "hevcdsp.h" -#include "h274.h" -#include "progressframe.h" -#include "videodsp.h" +#include "pred.h" +#include "ps.h" +#include "sei.h" #define SHIFT_CTB_WPP 2 @@ -455,9 +456,6 @@ typedef struct HEVCContext { uint8_t threads_type; uint8_t threads_number; - int width; - int height; - /** 1 if the independent slice segment header was successfully parsed */ uint8_t slice_initialized; @@ -675,4 +673,4 @@ extern const uint8_t ff_hevc_qpel_extra_before[4]; extern const uint8_t ff_hevc_qpel_extra_after[4]; extern const uint8_t ff_hevc_qpel_extra[4]; -#endif /* AVCODEC_HEVCDEC_H */ +#endif /* AVCODEC_HEVC_HEVCDEC_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c b/src/ExtLib/ffmpeg/libavcodec/hevc/mvs.c similarity index 100% rename from src/ExtLib/ffmpeg/libavcodec/hevc_mvs.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/mvs.c diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_parse.c b/src/ExtLib/ffmpeg/libavcodec/hevc/parse.c similarity index 99% rename from src/ExtLib/ffmpeg/libavcodec/hevc_parse.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/parse.c index 7bc28fd081..53b040d964 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_parse.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/parse.c @@ -19,7 +19,7 @@ #include "bytestream.h" #include "h2645_parse.h" #include "hevc.h" -#include "hevc_parse.h" +#include "parse.h" static int hevc_decode_nal_units(const uint8_t *buf, int buf_size, HEVCParamSets *ps, HEVCSEI *sei, int is_nalff, int nal_length_size, diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_parse.h b/src/ExtLib/ffmpeg/libavcodec/hevc/parse.h similarity index 96% rename from src/ExtLib/ffmpeg/libavcodec/hevc_parse.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/parse.h index 4ab96ab1cb..b3bcbde500 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_parse.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/parse.h @@ -26,8 +26,8 @@ #include -#include "hevc_ps.h" -#include "hevc_sei.h" +#include "ps.h" +#include "sei.h" int ff_hevc_decode_extradata(const uint8_t *data, int size, HEVCParamSets *ps, HEVCSEI *sei, int *is_nalff, int *nal_length_size, diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c b/src/ExtLib/ffmpeg/libavcodec/hevc/parser.c similarity index 96% rename from src/ExtLib/ffmpeg/libavcodec/hevc_parser.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/parser.c index 512a58549f..7090270b95 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_parser.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/parser.c @@ -25,9 +25,9 @@ #include "golomb.h" #include "hevc.h" -#include "hevc_parse.h" -#include "hevc_ps.h" -#include "hevc_sei.h" +#include "parse.h" +#include "ps.h" +#include "sei.h" #include "h2645_parse.h" #include "parser.h" diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcpred.c b/src/ExtLib/ffmpeg/libavcodec/hevc/pred.c similarity index 94% rename from src/ExtLib/ffmpeg/libavcodec/hevcpred.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/pred.c index 112f392295..2c247a2374 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcpred.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/pred.c @@ -22,22 +22,22 @@ #include "hevcdec.h" -#include "hevcpred.h" +#include "pred.h" #define BIT_DEPTH 8 -#include "hevcpred_template.c" +#include "pred_template.c" #undef BIT_DEPTH #define BIT_DEPTH 9 -#include "hevcpred_template.c" +#include "pred_template.c" #undef BIT_DEPTH #define BIT_DEPTH 10 -#include "hevcpred_template.c" +#include "pred_template.c" #undef BIT_DEPTH #define BIT_DEPTH 12 -#include "hevcpred_template.c" +#include "pred_template.c" #undef BIT_DEPTH void ff_hevc_pred_init(HEVCPredContext *hpc, int bit_depth) diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcpred.h b/src/ExtLib/ffmpeg/libavcodec/hevc/pred.h similarity index 95% rename from src/ExtLib/ffmpeg/libavcodec/hevcpred.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/pred.h index 91cc17c416..7828303805 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcpred.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/pred.h @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_HEVCPRED_H -#define AVCODEC_HEVCPRED_H +#ifndef AVCODEC_HEVC_PRED_H +#define AVCODEC_HEVC_PRED_H #include #include @@ -46,4 +46,4 @@ void ff_hevc_pred_init_mips(HEVCPredContext *hpc, int bit_depth); void ff_hevc_pred_init_x86(HEVCPredContext *hpc, int bit_depth); // ==> End patch MPC -#endif /* AVCODEC_HEVCPRED_H */ +#endif /* AVCODEC_HEVC_PRED_H */ diff --git a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c b/src/ExtLib/ffmpeg/libavcodec/hevc/pred_template.c similarity index 97% rename from src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/pred_template.c index 59c77ec8b2..f698164fe7 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevcpred_template.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/pred_template.c @@ -23,7 +23,7 @@ #include "libavutil/pixdesc.h" #include "bit_depth_template.c" -#include "hevcpred.h" +#include "pred.h" #define POS(x, y) src[(x) + stride * (y)] diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c b/src/ExtLib/ffmpeg/libavcodec/hevc/ps.c similarity index 97% rename from src/ExtLib/ffmpeg/libavcodec/hevc_ps.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/ps.c index 9107cfba7a..a3c2bde4c4 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/ps.c @@ -27,8 +27,8 @@ #include "libavutil/mem.h" #include "golomb.h" #include "h2645_vui.h" -#include "hevc_data.h" -#include "hevc_ps.h" +#include "data.h" +#include "ps.h" #include "refstruct.h" static const uint8_t default_scaling_list_intra[] = { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h b/src/ExtLib/ffmpeg/libavcodec/hevc/ps.h similarity index 96% rename from src/ExtLib/ffmpeg/libavcodec/hevc_ps.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/ps.h index c1794256ed..d299885df0 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_ps.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/ps.h @@ -26,9 +26,10 @@ #include "libavutil/pixfmt.h" #include "libavutil/rational.h" -#include "avcodec.h" -#include "get_bits.h" -#include "h2645_vui.h" +#include "libavcodec/avcodec.h" +#include "libavcodec/get_bits.h" +#include "libavcodec/h2645_vui.h" + #include "hevc.h" typedef struct HEVCSublayerHdrParams { diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_refs.c b/src/ExtLib/ffmpeg/libavcodec/hevc/refs.c similarity index 100% rename from src/ExtLib/ffmpeg/libavcodec/hevc_refs.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/refs.c diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_sei.c b/src/ExtLib/ffmpeg/libavcodec/hevc/sei.c similarity index 99% rename from src/ExtLib/ffmpeg/libavcodec/hevc_sei.c rename to src/ExtLib/ffmpeg/libavcodec/hevc/sei.c index abdb52acd3..e39ac0c38a 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_sei.c +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/sei.c @@ -24,8 +24,8 @@ #include "bytestream.h" #include "golomb.h" -#include "hevc_ps.h" -#include "hevc_sei.h" +#include "ps.h" +#include "sei.h" static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetByteContext *gb) diff --git a/src/ExtLib/ffmpeg/libavcodec/hevc_sei.h b/src/ExtLib/ffmpeg/libavcodec/hevc/sei.h similarity index 96% rename from src/ExtLib/ffmpeg/libavcodec/hevc_sei.h rename to src/ExtLib/ffmpeg/libavcodec/hevc/sei.h index a23a64ec4f..c97d22d423 100644 --- a/src/ExtLib/ffmpeg/libavcodec/hevc_sei.h +++ b/src/ExtLib/ffmpeg/libavcodec/hevc/sei.h @@ -25,10 +25,11 @@ #include "libavutil/buffer.h" -#include "get_bits.h" +#include "libavcodec/get_bits.h" +#include "libavcodec/h2645_sei.h" +#include "libavcodec/sei.h" + #include "hevc.h" -#include "h2645_sei.h" -#include "sei.h" typedef enum { diff --git a/src/ExtLib/ffmpeg/libavcodec/mpeg4audio.h b/src/ExtLib/ffmpeg/libavcodec/mpeg4audio.h index f7ed68ac3e..d1922fb0db 100644 --- a/src/ExtLib/ffmpeg/libavcodec/mpeg4audio.h +++ b/src/ExtLib/ffmpeg/libavcodec/mpeg4audio.h @@ -71,50 +71,51 @@ int avpriv_mpeg4audio_get_config2(MPEG4AudioConfig *c, const uint8_t *buf, int size, int sync_extension, void *logctx); enum AudioObjectType { - AOT_NULL, + AOT_NULL = 0, // Support? Name - AOT_AAC_MAIN, ///< Y Main - AOT_AAC_LC, ///< Y Low Complexity - AOT_AAC_SSR, ///< N (code in SoC repo) Scalable Sample Rate - AOT_AAC_LTP, ///< Y Long Term Prediction - AOT_SBR, ///< Y Spectral Band Replication - AOT_AAC_SCALABLE, ///< N Scalable - AOT_TWINVQ, ///< N Twin Vector Quantizer - AOT_CELP, ///< N Code Excited Linear Prediction - AOT_HVXC, ///< N Harmonic Vector eXcitation Coding + AOT_AAC_MAIN = 1, ///< Y Main + AOT_AAC_LC = 2, ///< Y Low Complexity + AOT_AAC_SSR = 3, ///< N (code in SoC repo) Scalable Sample Rate + AOT_AAC_LTP = 4, ///< Y Long Term Prediction + AOT_SBR = 5, ///< Y Spectral Band Replication + AOT_AAC_SCALABLE = 6, ///< N Scalable + AOT_TWINVQ = 7, ///< N Twin Vector Quantizer + AOT_CELP = 8, ///< N Code Excited Linear Prediction + AOT_HVXC = 9, ///< N Harmonic Vector eXcitation Coding + AOT_TTSI = 12, ///< N Text-To-Speech Interface - AOT_MAINSYNTH, ///< N Main Synthesis - AOT_WAVESYNTH, ///< N Wavetable Synthesis - AOT_MIDI, ///< N General MIDI - AOT_SAFX, ///< N Algorithmic Synthesis and Audio Effects - AOT_ER_AAC_LC, ///< N Error Resilient Low Complexity + AOT_MAINSYNTH = 13, ///< N Main Synthesis + AOT_WAVESYNTH = 14, ///< N Wavetable Synthesis + AOT_MIDI = 15, ///< N General MIDI + AOT_SAFX = 16, ///< N Algorithmic Synthesis and Audio Effects + AOT_ER_AAC_LC = 17, ///< N Error Resilient Low Complexity + AOT_ER_AAC_LTP = 19, ///< N Error Resilient Long Term Prediction - AOT_ER_AAC_SCALABLE, ///< N Error Resilient Scalable - AOT_ER_TWINVQ, ///< N Error Resilient Twin Vector Quantizer - AOT_ER_BSAC, ///< N Error Resilient Bit-Sliced Arithmetic Coding - AOT_ER_AAC_LD, ///< N Error Resilient Low Delay - AOT_ER_CELP, ///< N Error Resilient Code Excited Linear Prediction - AOT_ER_HVXC, ///< N Error Resilient Harmonic Vector eXcitation Coding - AOT_ER_HILN, ///< N Error Resilient Harmonic and Individual Lines plus Noise - AOT_ER_PARAM, ///< N Error Resilient Parametric - AOT_SSC, ///< N SinuSoidal Coding - AOT_PS, ///< N Parametric Stereo - AOT_SURROUND, ///< N MPEG Surround - AOT_ESCAPE, ///< Y Escape Value - AOT_L1, ///< Y Layer 1 - AOT_L2, ///< Y Layer 2 - AOT_L3, ///< Y Layer 3 - AOT_DST, ///< N Direct Stream Transfer - AOT_ALS, ///< Y Audio LosslesS - AOT_SLS, ///< N Scalable LosslesS - AOT_SLS_NON_CORE, ///< N Scalable LosslesS (non core) - AOT_ER_AAC_ELD, ///< N Error Resilient Enhanced Low Delay - AOT_SMR_SIMPLE, ///< N Symbolic Music Representation Simple - AOT_SMR_MAIN, ///< N Symbolic Music Representation Main - AOT_USAC_NOSBR, ///< N Unified Speech and Audio Coding (no SBR) - AOT_SAOC, ///< N Spatial Audio Object Coding - AOT_LD_SURROUND, ///< N Low Delay MPEG Surround - AOT_USAC, ///< N Unified Speech and Audio Coding + AOT_ER_AAC_SCALABLE = 20, ///< N Error Resilient Scalable + AOT_ER_TWINVQ = 21, ///< N Error Resilient Twin Vector Quantizer + AOT_ER_BSAC = 22, ///< N Error Resilient Bit-Sliced Arithmetic Coding + AOT_ER_AAC_LD = 23, ///< N Error Resilient Low Delay + AOT_ER_CELP = 24, ///< N Error Resilient Code Excited Linear Prediction + AOT_ER_HVXC = 25, ///< N Error Resilient Harmonic Vector eXcitation Coding + AOT_ER_HILN = 26, ///< N Error Resilient Harmonic and Individual Lines plus Noise + AOT_ER_PARAM = 27, ///< N Error Resilient Parametric + AOT_SSC = 28, ///< N SinuSoidal Coding + AOT_PS = 29, ///< N Parametric Stereo + AOT_SURROUND = 30, ///< N MPEG Surround + AOT_ESCAPE = 31, ///< Y Escape Value + AOT_L1 = 32, ///< Y Layer 1 + AOT_L2 = 33, ///< Y Layer 2 + AOT_L3 = 34, ///< Y Layer 3 + AOT_DST = 35, ///< N Direct Stream Transfer + AOT_ALS = 36, ///< Y Audio LosslesS + AOT_SLS = 37, ///< N Scalable LosslesS + AOT_SLS_NON_CORE = 38, ///< N Scalable LosslesS (non core) + AOT_ER_AAC_ELD = 39, ///< N Error Resilient Enhanced Low Delay + AOT_SMR_SIMPLE = 40, ///< N Symbolic Music Representation Simple + AOT_SMR_MAIN = 41, ///< N Symbolic Music Representation Main + AOT_USAC = 42, ///< Y Unified Speech and Audio Coding + AOT_SAOC = 43, ///< N Spatial Audio Object Coding + AOT_LD_SURROUND = 44, ///< N Low Delay MPEG Surround }; #define MAX_PCE_SIZE 320 ///thread_data[i].lock, NULL); - pthread_cond_init(&s->thread_data[i].cond, NULL); + ret = pthread_mutex_init(&s->thread_data[i].lock, NULL); + if (ret) { + free_buffers(s); + return AVERROR(ret); + } + ret = pthread_cond_init(&s->thread_data[i].cond, NULL); + if (ret) { + free_buffers(s); + return AVERROR(ret); + } #endif } diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c index 7884c118ae..9a50ce2222 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/dec.c @@ -214,7 +214,8 @@ static void pixel_buffer_nz_tl_init(TabList *l, VVCFrameContext *fc) const int c_end = chroma_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; const int changed = fc->tab.sz.chroma_format_idc != chroma_idc || fc->tab.sz.width != width || fc->tab.sz.height != height || - fc->tab.sz.ctu_width != ctu_width || fc->tab.sz.ctu_height != ctu_height; + fc->tab.sz.ctu_width != ctu_width || fc->tab.sz.ctu_height != ctu_height || + fc->tab.sz.pixel_shift != ps; tl_init(l, 0, changed); diff --git a/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c b/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c index e1011b4fa1..98cb43322f 100644 --- a/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c +++ b/src/ExtLib/ffmpeg/libavcodec/vvc/inter.c @@ -30,41 +30,61 @@ #define PROF_TEMP_OFFSET (MAX_PB_SIZE + 32) static const int bcw_w_lut[] = {4, 5, 3, 10, -2}; -static void subpic_offset(int *x_off, int *y_off, - const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_chroma) +typedef struct VVCRect { + int l; // left + int t; // top + int r; // right + int b; // bottom +} VVCRect; + +static void subpic_get_rect(VVCRect *r, const VVCFrame *src_frame, const int subpic_idx, const int is_chroma) { - *x_off -= pps->subpic_x[subpic_idx] >> sps->hshift[is_chroma]; - *y_off -= pps->subpic_y[subpic_idx] >> sps->vshift[is_chroma]; + const VVCSPS *sps = src_frame->sps; + const VVCPPS *pps = src_frame->pps; + const int hs = sps->hshift[is_chroma]; + const int vs = sps->vshift[is_chroma]; + + r->l = pps->subpic_x[subpic_idx] >> hs; + r->t = pps->subpic_y[subpic_idx] >> vs; + r->r = r->l + (pps->subpic_width[subpic_idx] >> hs); + r->b = r->t + (pps->subpic_height[subpic_idx] >> vs); } -static void subpic_width_height(int *pic_width, int *pic_height, - const VVCSPS *sps, const VVCPPS *pps, const int subpic_idx, const int is_chroma) +// clip to subblock and subpicture process in 8.5.6.3.2 Luma sample interpolation filtering process +static void clip_to_subpic(int *x_off, int *y_off, int *pic_width, int *pic_height, const VVCRect *subpic, const VVCRect *sb, const int dmvr_clip) { - *pic_width = pps->subpic_width[subpic_idx] >> sps->hshift[is_chroma]; - *pic_height = pps->subpic_height[subpic_idx] >> sps->vshift[is_chroma]; + const int l = dmvr_clip ? FFMIN(FFMAX(subpic->l, sb->l), subpic->r - 1) : subpic->l; + const int t = dmvr_clip ? FFMIN(FFMAX(subpic->t, sb->t), subpic->b - 1) : subpic->t; + const int r = dmvr_clip ? FFMAX(FFMIN(subpic->r, sb->r), subpic->l + 1) : subpic->r; + const int b = dmvr_clip ? FFMAX(FFMIN(subpic->b, sb->b), subpic->t + 1) : subpic->b; + + *x_off -= l; + *y_off -= t; + *pic_width = r - l; + *pic_height = b - t; } -static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, const VVCFrame *src_frame, - int x_off, int y_off, const int block_w, const int block_h, const int is_chroma) +static void emulated_edge_no_wrap(const VVCLocalContext *lc, uint8_t *dst, + const uint8_t **src, ptrdiff_t *src_stride, + int x_off, int y_off, const int block_w, const int block_h, + const int extra_before, const int extra_after, + const VVCRect *subpic, const VVCRect *sb, const int dmvr_clip) { const VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = src_frame->sps; - const VVCPPS *pps = src_frame->pps; - const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; - const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; - const int extra_after = is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER; - const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; + const int extra = extra_before + extra_after; int pic_width, pic_height; - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_chroma); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_chroma); + *src += y_off * *src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); - if (x_off < extra_before || y_off < extra_before || + clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, sb, dmvr_clip); + + if (dmvr_clip || x_off < extra_before || y_off < extra_before || x_off >= pic_width - block_w - extra_after || y_off >= pic_height - block_h - extra_after) { - const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << fc->ps.sps->pixel_shift; - int offset = extra_before * *src_stride + (extra_before << fc->ps.sps->pixel_shift); - int buf_offset = extra_before * edge_emu_stride + (extra_before << fc->ps.sps->pixel_shift); + const int ps = fc->ps.sps->pixel_shift; + const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << ps; + const int offset = extra_before * *src_stride + (extra_before << ps); + const int buf_offset = extra_before * edge_emu_stride + (extra_before << ps); fc->vdsp.emulated_edge_mc(dst, *src - offset, edge_emu_stride, *src_stride, block_w + extra, block_h + extra, x_off - extra_before, y_off - extra_before, @@ -72,97 +92,126 @@ static int emulated_edge(const VVCLocalContext *lc, uint8_t *dst, const uint8_t *src = dst + buf_offset; *src_stride = edge_emu_stride; - return 1; } - return 0; } -static void emulated_edge_dmvr(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - int x_sb, int y_sb, int x_off, int y_off, const int block_w, const int block_h, const int is_chroma) +static void emulated_half(const VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, + const uint8_t *src, const ptrdiff_t src_stride, const int ps, + int x_off, int y_off, const int block_w, const int block_h, + const VVCRect *subpic,const VVCRect *half_sb, const int dmvr_clip) { const VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = fc->ps.sps; - const VVCPPS *pps = fc->ps.pps; - const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; - const int extra_before = is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE; - const int extra_after = is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER; - const int extra = is_chroma ? CHROMA_EXTRA : LUMA_EXTRA; int pic_width, pic_height; - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, is_chroma); - subpic_offset(&x_sb, &y_sb, sps, pps, subpic_idx, is_chroma); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, is_chroma); - - if (x_off < extra_before || y_off < extra_before || - x_off >= pic_width - block_w - extra_after || - y_off >= pic_height - block_h - extra_after|| - (x_off != x_sb || y_off != y_sb)) { - const int ps = fc->ps.sps->pixel_shift; - const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << ps; - const int offset = extra_before * *src_stride + (extra_before << ps); - const int buf_offset = extra_before * edge_emu_stride + (extra_before << ps); + src += y_off * src_stride + x_off * (1 << ps); - const int start_x = FFMIN(FFMAX(x_sb - extra_before, 0), pic_width - 1); - const int start_y = FFMIN(FFMAX(y_sb - extra_before, 0), pic_height - 1); - const int width = FFMAX(FFMIN(pic_width, x_sb + block_w + extra_after) - start_x, 1); - const int height = FFMAX(FFMIN(pic_height, y_sb + block_h + extra_after) - start_y, 1); + clip_to_subpic(&x_off, &y_off, &pic_width, &pic_height, subpic, half_sb, dmvr_clip); - fc->vdsp.emulated_edge_mc(dst, *src - offset, edge_emu_stride, *src_stride, block_w + extra, block_h + extra, - x_off - start_x - extra_before, y_off - start_y - extra_before, width, height); + fc->vdsp.emulated_edge_mc(dst, src, dst_stride, src_stride, + block_w, block_h, x_off, y_off, pic_width, pic_height); +} - *src = dst + buf_offset; - *src_stride = edge_emu_stride; - } +static void sb_set_lr(VVCRect *sb, const int l, const int r) +{ + sb->l = l; + sb->r = r; } -static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, const uint8_t **src, ptrdiff_t *src_stride, - int x_off, int y_off, const int block_w, const int block_h) +static void sb_wrap(VVCRect *sb, const int wrap) { - const VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = fc->ps.sps; - const VVCPPS *pps = fc->ps.pps; - const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; - int pic_width, pic_height; + sb_set_lr(sb, sb->l + wrap, sb->r + wrap); +} - subpic_offset(&x_off, &y_off, sps, pps, subpic_idx, 0); - subpic_width_height(&pic_width, &pic_height, sps, pps, subpic_idx, 0); +static void emulated_edge(const VVCLocalContext *lc, uint8_t *dst, + const uint8_t **src, ptrdiff_t *src_stride, const VVCFrame *src_frame, + int x_sb, int y_sb, int x_off, int y_off, int block_w, int block_h, const int wrap_enabled, + const int is_chroma, const int extra_before, const int extra_after) +{ + const VVCSPS *sps = src_frame->sps; + const VVCPPS *pps = src_frame->pps; + const int ps = sps->pixel_shift; + const int subpic_idx = lc->sc->sh.r->curr_subpic_idx; + const int extra = extra_before + extra_after; + const int dmvr_clip = x_sb != x_off || y_sb != y_off; + const int dmvr_left = FFMAX(x_off, x_sb) - extra_before; + const int dmvr_right = FFMIN(x_off, x_sb) + block_w + extra_after; + const int left = x_off - extra_before; + const int top = y_off - extra_before; + const int pic_width = pps->width >> sps->hshift[is_chroma]; + const int wrap = pps->ref_wraparound_offset << (sps->min_cb_log2_size_y - sps->hshift[is_chroma]); + const ptrdiff_t dst_stride = EDGE_EMU_BUFFER_STRIDE << ps; + VVCRect sb = { x_sb - extra_before, y_sb - extra_before, x_sb + block_w + extra_after, y_sb + block_h + extra_after }; + VVCRect subpic; + + subpic_get_rect(&subpic, src_frame, subpic_idx, is_chroma); + + if (!wrap_enabled || (dmvr_left >= 0 && dmvr_right <= pic_width)) { + return emulated_edge_no_wrap(lc, dst, src, src_stride, + x_off, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip); + } + if (dmvr_right <= 0) { + sb_wrap(&sb, wrap); + return emulated_edge_no_wrap(lc, dst, src, src_stride, + x_off + wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip); + } + if (dmvr_left >= pic_width) { + sb_wrap(&sb, -wrap); + return emulated_edge_no_wrap(lc, dst, src, src_stride, + x_off - wrap, y_off, block_w, block_h, extra_before, extra_after, &subpic, &sb, dmvr_clip); + } - if (x_off < BILINEAR_EXTRA_BEFORE || y_off < BILINEAR_EXTRA_BEFORE || - x_off >= pic_width - block_w - BILINEAR_EXTRA_AFTER || - y_off >= pic_height - block_h - BILINEAR_EXTRA_AFTER) { - const ptrdiff_t edge_emu_stride = EDGE_EMU_BUFFER_STRIDE << fc->ps.sps->pixel_shift; - const int offset = BILINEAR_EXTRA_BEFORE * *src_stride + (BILINEAR_EXTRA_BEFORE << fc->ps.sps->pixel_shift); - const int buf_offset = BILINEAR_EXTRA_BEFORE * edge_emu_stride + (BILINEAR_EXTRA_BEFORE << fc->ps.sps->pixel_shift); + block_w += extra; + block_h += extra; - fc->vdsp.emulated_edge_mc(dst, *src - offset, edge_emu_stride, *src_stride, block_w + BILINEAR_EXTRA, block_h + BILINEAR_EXTRA, - x_off - BILINEAR_EXTRA_BEFORE, y_off - BILINEAR_EXTRA_BEFORE, pic_width, pic_height); + // half block are wrapped + if (dmvr_left < 0 ) { + const int w = -left; + VVCRect half_sb = { sb.l + wrap, sb.t, 0 + wrap, sb.b }; + emulated_half(lc, dst, dst_stride, *src, *src_stride, ps, + left + wrap, top, w, block_h, &subpic, &half_sb, dmvr_clip); - *src = dst + buf_offset; - *src_stride = edge_emu_stride; + sb_set_lr(&half_sb, 0, sb.r); + emulated_half(lc, dst + (w << ps), dst_stride, *src, *src_stride, ps, + 0, top, block_w - w, block_h, &subpic, &half_sb, dmvr_clip); + } else { + const int w = pic_width - left; + VVCRect half_sb = { sb.l, sb.t, pic_width, sb.b }; + emulated_half(lc, dst, dst_stride, *src, *src_stride, ps, + left, top, w, block_h, &subpic, &half_sb, dmvr_clip); + + sb_set_lr(&half_sb, pic_width - wrap, sb.r - wrap); + emulated_half(lc, dst + (w << ps), dst_stride, *src, *src_stride, ps, + pic_width - wrap , top, block_w - w, block_h, &subpic, &half_sb, dmvr_clip); } + + *src = dst + extra_before * dst_stride + (extra_before << ps); + *src_stride = dst_stride; } -#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \ - emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, block_w, block_h, is_chroma) +#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off) \ + emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \ + is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER) -#define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ - emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, is_chroma) +#define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off) \ + emulated_edge(lc, dst, src, src_stride, ref, x_sb, y_sb, x_off, y_off, block_w, block_h, wrap_enabled, is_chroma, \ + is_chroma ? CHROMA_EXTRA_BEFORE : LUMA_EXTRA_BEFORE, is_chroma ? CHROMA_EXTRA_AFTER : LUMA_EXTRA_AFTER) -#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ - emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h) +#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off) \ + emulated_edge(lc, dst, src, src_stride, ref, x_off, y_off, x_off, y_off, pred_w, pred_h, wrap_enabled, 0, \ + BILINEAR_EXTRA_BEFORE, BILINEAR_EXTRA_AFTER) // part of 8.5.6.6 Weighted sample prediction process static int derive_weight_uni(int *denom, int *wx, int *ox, const VVCLocalContext *lc, const MvField *mvf, const int c_idx) { - const VVCFrameContext *fc = lc->fc; - const VVCPPS *pps = fc->ps.pps; - const VVCSH *sh = &lc->sc->sh; - const int weight_flag = (IS_P(sh->r) && pps->r->pps_weighted_pred_flag) || + const VVCFrameContext *fc = lc->fc; + const VVCPPS *pps = fc->ps.pps; + const VVCSH *sh = &lc->sc->sh; + const int weight_flag = (IS_P(sh->r) && pps->r->pps_weighted_pred_flag) || (IS_B(sh->r) && pps->r->pps_weighted_bipred_flag); if (weight_flag) { - const int lx = mvf->pred_flag - PF_L0; - const PredWeightTable *w = pps->r->pps_wp_info_in_ph_flag ? &fc->ps.ph.pwt : &sh->pwt; + const int lx = mvf->pred_flag - PF_L0; + const PredWeightTable *w = pps->r->pps_wp_info_in_ph_flag ? &fc->ps.ph.pwt : &sh->pwt; *denom = w->log2_denom[c_idx > 0]; *wx = w->weight[lx][c_idx][mvf->ref_idx[lx]]; @@ -175,11 +224,11 @@ static int derive_weight_uni(int *denom, int *wx, int *ox, static int derive_weight(int *denom, int *w0, int *w1, int *o0, int *o1, const VVCLocalContext *lc, const MvField *mvf, const int c_idx, const int dmvr_flag) { - const VVCFrameContext *fc = lc->fc; - const VVCPPS *pps = fc->ps.pps; - const VVCSH *sh = &lc->sc->sh; - const int bcw_idx = mvf->bcw_idx; - const int weight_flag = (IS_P(sh->r) && pps->r->pps_weighted_pred_flag) || + const VVCFrameContext *fc = lc->fc; + const VVCPPS *pps = fc->ps.pps; + const VVCSH *sh = &lc->sc->sh; + const int bcw_idx = mvf->bcw_idx; + const int weight_flag = (IS_P(sh->r) && pps->r->pps_weighted_pred_flag) || (IS_B(sh->r) && pps->r->pps_weighted_bipred_flag && !dmvr_flag); if ((!weight_flag && !bcw_idx) || (bcw_idx && lc->cu->ciip_flag)) return 0; @@ -190,7 +239,7 @@ static int derive_weight(int *denom, int *w0, int *w1, int *o0, int *o1, *w0 = 8 - *w1; *o0 = *o1 = 0; } else { - const VVCPPS *pps = fc->ps.pps; + const VVCPPS *pps = fc->ps.pps; const PredWeightTable *w = pps->r->pps_wp_info_in_ph_flag ? &fc->ps.ph.pwt : &sh->pwt; *denom = w->log2_denom[c_idx > 0]; @@ -207,23 +256,23 @@ static int derive_weight(int *denom, int *w0, int *w1, int *o0, int *o1, static void mc(VVCLocalContext *lc, int16_t *dst, const VVCFrame *ref, const Mv *mv, int x_off, int y_off, const int block_w, const int block_h, const int c_idx) { - const VVCFrameContext *fc = lc->fc; - const PredictionUnit *pu = &lc->cu->pu; - const uint8_t *src = ref->frame->data[c_idx]; - ptrdiff_t src_stride = ref->frame->linesize[c_idx]; - const int is_chroma = !!c_idx; - const int hs = fc->ps.sps->hshift[c_idx]; - const int vs = fc->ps.sps->vshift[c_idx]; - const int idx = av_log2(block_w) - 1; - const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); - const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); - const int hpel_if_idx = (is_chroma || pu->merge_gpm_flag) ? 0 : pu->mi.hpel_if_idx; - const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); - const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = ref->frame->data[c_idx]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; + const int is_chroma = !!c_idx; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; + const int idx = av_log2(block_w) - 1; + const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int hpel_if_idx = (is_chroma || pu->merge_gpm_flag) ? 0 : pu->mi.hpel_if_idx; + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; x_off += mv->x >> (4 + hs); y_off += mv->y >> (4 + vs); - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); fc->vvcdsp.inter.put[is_chroma][idx][!!my][!!mx](dst, src, src_stride, block_h, hf, vf, block_w); @@ -233,26 +282,26 @@ static void mc_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride const VVCFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, const int c_idx) { - const VVCFrameContext *fc = lc->fc; - const PredictionUnit *pu = &lc->cu->pu; - const uint8_t *src = ref->frame->data[c_idx]; - ptrdiff_t src_stride = ref->frame->linesize[c_idx]; - const int lx = mvf->pred_flag - PF_L0; - const int hs = fc->ps.sps->hshift[c_idx]; - const int vs = fc->ps.sps->vshift[c_idx]; - const int idx = av_log2(block_w) - 1; - const Mv *mv = &mvf->mv[lx]; - const int is_chroma = !!c_idx; - const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); - const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); - const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; - const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); - const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const uint8_t *src = ref->frame->data[c_idx]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; + const int lx = mvf->pred_flag - PF_L0; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; + const int idx = av_log2(block_w) - 1; + const Mv *mv = &mvf->mv[lx]; + const int is_chroma = !!c_idx; + const intptr_t mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const intptr_t my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; int denom, wx, ox; x_off += mv->x >> (4 + hs); y_off += mv->y >> (4 + vs); - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); if (derive_weight_uni(&denom, &wx, &ox, lc, mvf, c_idx)) { @@ -269,29 +318,30 @@ static void mc_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_stride, const int x_off, const int y_off, const int block_w, const int block_h, const int c_idx, const int sb_bdof_flag) { - const VVCFrameContext *fc = lc->fc; - const PredictionUnit *pu = &lc->cu->pu; - const int hs = fc->ps.sps->hshift[c_idx]; - const int vs = fc->ps.sps->vshift[c_idx]; - const int idx = av_log2(block_w) - 1; - const VVCFrame *refs[] = { ref0, ref1 }; - int16_t *tmp[] = { lc->tmp + sb_bdof_flag * PROF_TEMP_OFFSET, lc->tmp1 + sb_bdof_flag * PROF_TEMP_OFFSET }; + const VVCFrameContext *fc = lc->fc; + const PredictionUnit *pu = &lc->cu->pu; + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; + const int idx = av_log2(block_w) - 1; + const VVCFrame *refs[] = { ref0, ref1 }; + int16_t *tmp[] = { lc->tmp + sb_bdof_flag * PROF_TEMP_OFFSET, lc->tmp1 + sb_bdof_flag * PROF_TEMP_OFFSET }; int denom, w0, w1, o0, o1; - const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, c_idx, pu->dmvr_flag); - const int is_chroma = !!c_idx; - const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; + const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, c_idx, pu->dmvr_flag); + const int is_chroma = !!c_idx; + const int hpel_if_idx = is_chroma ? 0 : pu->mi.hpel_if_idx; for (int i = L0; i <= L1; i++) { - const Mv *mv = mvf->mv + i; - const int mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); - const int my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); - const int ox = x_off + (mv->x >> (4 + hs)); - const int oy = y_off + (mv->y >> (4 + vs)); - const VVCFrame *ref = refs[i]; - ptrdiff_t src_stride = ref->frame->linesize[c_idx]; - const uint8_t *src = ref->frame->data[c_idx] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); - const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); - const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const Mv *mv = mvf->mv + i; + const int mx = av_mod_uintp2(mv->x, 4 + hs) << (is_chroma - hs); + const int my = av_mod_uintp2(mv->y, 4 + vs) << (is_chroma - vs); + const int ox = x_off + (mv->x >> (4 + hs)); + const int oy = y_off + (mv->y >> (4 + vs)); + const VVCFrame *ref = refs[i]; + ptrdiff_t src_stride = ref->frame->linesize[c_idx]; + const uint8_t *src = ref->frame->data[c_idx]; + const int8_t *hf = INTER_FILTER(hpel_if_idx, mx); + const int8_t *vf = INTER_FILTER(hpel_if_idx, my); + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; if (pu->dmvr_flag) { const int x_sb = x_off + (orig_mv->mv[i].x >> (4 + hs)); @@ -357,23 +407,19 @@ static void scaled_ref_pos_and_step(const VVCLocalContext *lc, const VVCRefPic * } static void emulated_edge_scaled(VVCLocalContext *lc, const uint8_t **src, ptrdiff_t *src_stride, int *src_height, - const VVCFrame *ref, const int x, const int y, const int dx, const int dy, - const int block_w, const int block_h, const int is_chroma) + const VVCFrame *ref, const int x, const int y, const int dx, const int dy, const int w, const int h, const int is_chroma) { - const VVCFrameContext *fc = lc->fc; - const int x0 = SCALED_INT(x); - const int y0 = SCALED_INT(y); - const int x_end = SCALED_INT(x + block_w * dx); - const int y_end = SCALED_INT(y + block_h * dy); - const int x_last = SCALED_INT(x + (block_w - 1) * dx); - const int y_last = SCALED_INT(y + (block_h - 1) * dy); - const int src_width = x_end - x0 + (x_end == x_last); - - *src_height = y_end - y0 + (y_end == y_last); - - *src += y0 * *src_stride + (x0 * (1 << fc->ps.sps->pixel_shift)); - - emulated_edge(lc, lc->edge_emu_buffer, src, src_stride, ref, x0, y0, src_width, *src_height, is_chroma); + const int x_off = SCALED_INT(x); + const int y_off = SCALED_INT(y); + const int x_end = SCALED_INT(x + w * dx); + const int y_end = SCALED_INT(y + h * dy); + const int x_last = SCALED_INT(x + (w - 1) * dx); + const int y_last = SCALED_INT(y + (h - 1) * dy); + const int block_w = x_end - x_off + (x_end == x_last); + const int block_h = *src_height = y_end - y_off + (y_end == y_last); + const int wrap_enabled = 0; + + MC_EMULATED_EDGE(lc->edge_emu_buffer, src, src_stride, x_off, y_off); } static void mc_scaled(VVCLocalContext *lc, int16_t *dst, const VVCRefPic *refp, const Mv *mv, @@ -452,24 +498,24 @@ static void luma_prof_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst const VVCFrame *ref, const MvField *mvf, int x_off, int y_off, const int block_w, const int block_h, const int cb_prof_flag, const int16_t *diff_mv_x, const int16_t *diff_mv_y) { - const VVCFrameContext *fc = lc->fc; - const uint8_t *src = ref->frame->data[LUMA]; - ptrdiff_t src_stride = ref->frame->linesize[LUMA]; - uint16_t *prof_tmp = lc->tmp + PROF_TEMP_OFFSET; - const int idx = av_log2(block_w) - 1; - const int lx = mvf->pred_flag - PF_L0; - const Mv *mv = mvf->mv + lx; - const int mx = mv->x & 0xf; - const int my = mv->y & 0xf; - const int8_t *hf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][mx]; - const int8_t *vf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][my]; + const VVCFrameContext *fc = lc->fc; + const uint8_t *src = ref->frame->data[LUMA]; + ptrdiff_t src_stride = ref->frame->linesize[LUMA]; + uint16_t *prof_tmp = lc->tmp + PROF_TEMP_OFFSET; + const int idx = av_log2(block_w) - 1; + const int lx = mvf->pred_flag - PF_L0; + const Mv *mv = mvf->mv + lx; + const int mx = mv->x & 0xf; + const int my = mv->y & 0xf; + const int8_t *hf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][mx]; + const int8_t *vf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][my]; int denom, wx, ox; - const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA); - const int is_chroma = 0; + const int weight_flag = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA); + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; + const int is_chroma = 0; x_off += mv->x >> 4; y_off += mv->y >> 4; - src += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift)); MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off); if (cb_prof_flag) { @@ -499,10 +545,11 @@ static void luma_prof(VVCLocalContext *lc, int16_t *dst, const VVCFrame *ref, const int idx = av_log2(block_w) - 1; const int is_chroma = 0; uint16_t *prof_tmp = lc->tmp2 + PROF_TEMP_OFFSET; - ptrdiff_t src_stride = ref->frame->linesize[0]; - const uint8_t *src = ref->frame->data[0] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); + ptrdiff_t src_stride = ref->frame->linesize[LUMA]; + const uint8_t *src = ref->frame->data[LUMA]; const int8_t *hf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][mx]; const int8_t *vf = ff_vvc_inter_luma_filters[VVC_INTER_LUMA_FILTER_TYPE_AFFINE][my]; + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, ox, oy); if (!pu->cb_prof_flag[lx]) { @@ -518,11 +565,11 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ const VVCRefPic *ref0, const VVCRefPic *ref1, const MvField *mvf, const int x_off, const int y_off, const int block_w, const int block_h) { - const VVCFrameContext *fc = lc->fc; - const VVCRefPic *refps[] = { ref0, ref1 }; - int16_t *tmp[] = { lc->tmp, lc->tmp1 }; + const VVCFrameContext *fc = lc->fc; + const VVCRefPic *refps[] = { ref0, ref1 }; + int16_t *tmp[] = { lc->tmp, lc->tmp1 }; int denom, w0, w1, o0, o1; - const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0); + const int weight_flag = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0); for (int i = L0; i <= L1; i++) { const VVCRefPic *refp = refps[i]; @@ -561,16 +608,16 @@ static int pred_get_refs(const VVCLocalContext *lc, VVCRefPic *refp[2], const Mv static void pred_gpm_blk(VVCLocalContext *lc) { - const VVCFrameContext *fc = lc->fc; - const CodingUnit *cu = lc->cu; - const PredictionUnit *pu = &cu->pu; + const VVCFrameContext *fc = lc->fc; + const CodingUnit *cu = lc->cu; + const PredictionUnit *pu = &cu->pu; const uint8_t angle_idx = ff_vvc_gpm_angle_idx[pu->gpm_partition_idx]; const uint8_t weights_idx = ff_vvc_gpm_angle_to_weights_idx[angle_idx]; - const int w = av_log2(cu->cb_width) - 3; - const int h = av_log2(cu->cb_height) - 3; - const uint8_t off_x = ff_vvc_gpm_weights_offset_x[pu->gpm_partition_idx][h][w]; - const uint8_t off_y = ff_vvc_gpm_weights_offset_y[pu->gpm_partition_idx][h][w]; + const int w = av_log2(cu->cb_width) - 3; + const int h = av_log2(cu->cb_height) - 3; + const uint8_t off_x = ff_vvc_gpm_weights_offset_x[pu->gpm_partition_idx][h][w]; + const uint8_t off_y = ff_vvc_gpm_weights_offset_y[pu->gpm_partition_idx][h][w]; const uint8_t mirror_type = ff_vvc_gpm_angle_to_mirror[angle_idx]; const uint8_t *weights; @@ -579,13 +626,13 @@ static void pred_gpm_blk(VVCLocalContext *lc) int16_t *tmp[2] = {lc->tmp, lc->tmp1}; for (int c_idx = 0; c_idx < c_end; c_idx++) { - const int hs = fc->ps.sps->hshift[c_idx]; - const int vs = fc->ps.sps->vshift[c_idx]; - const int x = lc->cu->x0 >> hs; - const int y = lc->cu->y0 >> vs; - const int width = cu->cb_width >> hs; - const int height = cu->cb_height >> vs; - uint8_t *dst = POS(c_idx, lc->cu->x0, lc->cu->y0); + const int hs = fc->ps.sps->hshift[c_idx]; + const int vs = fc->ps.sps->vshift[c_idx]; + const int x = lc->cu->x0 >> hs; + const int y = lc->cu->y0 >> vs; + const int width = cu->cb_width >> hs; + const int height = cu->cb_height >> vs; + uint8_t *dst = POS(c_idx, lc->cu->x0, lc->cu->y0); ptrdiff_t dst_stride = fc->frame->linesize[c_idx]; int step_x = 1 << hs; @@ -602,8 +649,9 @@ static void pred_gpm_blk(VVCLocalContext *lc) for (int i = 0; i < 2; i++) { const MvField *mv = pu->gpm_mv + i; - const int lx = mv->pred_flag - PF_L0; - VVCRefPic *refp = lc->sc->rpl[lx].refs + mv->ref_idx[lx]; + const int lx = mv->pred_flag - PF_L0; + VVCRefPic *refp = lc->sc->rpl[lx].refs + mv->ref_idx[lx]; + if (!refp->ref) return; if (refp->is_scaled) @@ -619,15 +667,14 @@ static void pred_gpm_blk(VVCLocalContext *lc) static int ciip_derive_intra_weight(const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) { - const VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = fc->ps.sps; - const int x0b = av_mod_uintp2(x0, sps->ctb_log2_size_y); - const int y0b = av_mod_uintp2(y0, sps->ctb_log2_size_y); - const int available_l = lc->ctb_left_flag || x0b; - const int available_u = lc->ctb_up_flag || y0b; - const int min_pu_width = fc->ps.pps->min_pu_width; - - int w = 1; + const VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const int x0b = av_mod_uintp2(x0, sps->ctb_log2_size_y); + const int y0b = av_mod_uintp2(y0, sps->ctb_log2_size_y); + const int available_l = lc->ctb_left_flag || x0b; + const int available_u = lc->ctb_up_flag || y0b; + const int min_pu_width = fc->ps.pps->min_pu_width; + int w = 1; if (available_u &&fc->tab.mvf[((y0 - 1) >> MIN_PU_LOG2) * min_pu_width + ((x0 - 1 + width)>> MIN_PU_LOG2)].pred_flag == PF_INTRA) w++; @@ -737,12 +784,12 @@ static int parametric_mv_refine(const int *sad, const int stride) #define SAD_ARRAY_SIZE 5 //8.5.3 Decoder-side motion vector refinement process static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv, int *sb_bdof_flag, - const AVFrame *ref0, const AVFrame *ref1, const int x_off, const int y_off, const int block_w, const int block_h) + const VVCFrame *ref0, const VVCFrame *ref1, const int x_off, const int y_off, const int block_w, const int block_h) { - const VVCFrameContext *fc = lc->fc; - const int sr_range = 2; - const AVFrame *ref[] = { ref0, ref1 }; - int16_t *tmp[] = { lc->tmp, lc->tmp1 }; + const VVCFrameContext *fc = lc->fc; + const int sr_range = 2; + const VVCFrame *refs[] = { ref0, ref1 }; + int16_t *tmp[] = { lc->tmp, lc->tmp1 }; int sad[SAD_ARRAY_SIZE][SAD_ARRAY_SIZE]; int min_dx, min_dy, min_sad, dx, dy; @@ -757,8 +804,11 @@ static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv, const int my = mv->y & 0xf; const int ox = x_off + (mv->x >> 4) - sr_range; const int oy = y_off + (mv->y >> 4) - sr_range; - ptrdiff_t src_stride = ref[i]->linesize[LUMA]; - const uint8_t *src = ref[i]->data[LUMA] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift)); + const VVCFrame *ref = refs[i]; + ptrdiff_t src_stride = ref->frame->linesize[LUMA]; + const uint8_t *src = ref->frame->data[LUMA]; + const int wrap_enabled = fc->ps.pps->r->pps_ref_wraparound_enabled_flag; + MC_EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy); fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w); } @@ -828,16 +878,16 @@ static void derive_sb_mv(VVCLocalContext *lc, MvField *mv, MvField *orig_mv, int VVCRefPic *refp[2]; if (pred_get_refs(lc, refp, mv) < 0) return; - dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, refp[L0]->ref->frame, refp[L1]->ref->frame, x0, y0, sbw, sbh); + dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, refp[L0]->ref, refp[L1]->ref, x0, y0, sbw, sbh); set_dmvr_info(fc, x0, y0, sbw, sbh, mv); } } static void pred_regular_blk(VVCLocalContext *lc, const int skip_ciip) { - const CodingUnit *cu = lc->cu; - PredictionUnit *pu = &lc->cu->pu; - const MotionInfo *mi = &pu->mi; + const CodingUnit *cu = lc->cu; + PredictionUnit *pu = &lc->cu->pu; + const MotionInfo *mi = &pu->mi; MvField mv, orig_mv; int sbw, sbh, sb_bdof_flag = 0; @@ -881,17 +931,17 @@ static void derive_affine_mvc(MvField *mvc, const VVCFrameContext *fc, const MvF static void pred_affine_blk(VVCLocalContext *lc) { - const VVCFrameContext *fc = lc->fc; - const CodingUnit *cu = lc->cu; - const PredictionUnit *pu = &cu->pu; - const MotionInfo *mi = &pu->mi; - const int x0 = cu->x0; - const int y0 = cu->y0; - const int sbw = cu->cb_width / mi->num_sb_x; - const int sbh = cu->cb_height / mi->num_sb_y; - const int hs = fc->ps.sps->hshift[1]; - const int vs = fc->ps.sps->vshift[1]; - const int dst_stride = fc->frame->linesize[LUMA]; + const VVCFrameContext *fc = lc->fc; + const CodingUnit *cu = lc->cu; + const PredictionUnit *pu = &cu->pu; + const MotionInfo *mi = &pu->mi; + const int x0 = cu->x0; + const int y0 = cu->y0; + const int sbw = cu->cb_width / mi->num_sb_x; + const int sbh = cu->cb_height / mi->num_sb_y; + const int hs = fc->ps.sps->hshift[1]; + const int vs = fc->ps.sps->vshift[1]; + const int dst_stride = fc->frame->linesize[LUMA]; for (int sby = 0; sby < mi->num_sb_y; sby++) { for (int sbx = 0; sbx < mi->num_sb_x; sbx++) { @@ -932,9 +982,9 @@ static void pred_affine_blk(VVCLocalContext *lc) static void predict_inter(VVCLocalContext *lc) { - const VVCFrameContext *fc = lc->fc; - const CodingUnit *cu = lc->cu; - const PredictionUnit *pu = &cu->pu; + const VVCFrameContext *fc = lc->fc; + const CodingUnit *cu = lc->cu; + const PredictionUnit *pu = &cu->pu; if (pu->merge_gpm_flag) pred_gpm_blk(lc); @@ -956,9 +1006,9 @@ static int has_inter_luma(const CodingUnit *cu) int ff_vvc_predict_inter(VVCLocalContext *lc, const int rs) { - const VVCFrameContext *fc = lc->fc; - const CTU *ctu = fc->tab.ctus + rs; - CodingUnit *cu = ctu->cus; + const VVCFrameContext *fc = lc->fc; + const CTU *ctu = fc->tab.ctus + rs; + CodingUnit *cu = ctu->cus; while (cu) { lc->cu = cu; diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/hevc_idct_intrinsic.c b/src/ExtLib/ffmpeg/libavcodec/x86/hevc_idct_intrinsic.c index 77a3bac3bd..adb010ca2e 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/hevc_idct_intrinsic.c +++ b/src/ExtLib/ffmpeg/libavcodec/x86/hevc_idct_intrinsic.c @@ -2,7 +2,7 @@ #include "libavutil/avassert.h" #include "libavutil/mem_internal.h" #include "libavutil/pixdesc.h" -#include "libavcodec/hevc.h" +#include "libavcodec/hevc/hevc.h" #include "libavcodec/x86/hevcdsp.h" #ifdef __GNUC__ diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/hevc_intra_intrinsic.c b/src/ExtLib/ffmpeg/libavcodec/x86/hevc_intra_intrinsic.c index 611c0416b5..cbaff0fd6d 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/hevc_intra_intrinsic.c +++ b/src/ExtLib/ffmpeg/libavcodec/x86/hevc_intra_intrinsic.c @@ -2,7 +2,7 @@ #include "libavutil/avassert.h" #include "libavutil/pixdesc.h" #include "libavcodec/get_bits.h" -#include "libavcodec/hevc.h" +#include "libavcodec/hevc/hevc.h" #include "libavcodec/x86/hevcpred.h" #ifdef __GNUC__ diff --git a/src/ExtLib/ffmpeg/libavcodec/x86/hevcdsp_init.c b/src/ExtLib/ffmpeg/libavcodec/x86/hevcdsp_init.c index 0cf686e906..55e629f799 100644 --- a/src/ExtLib/ffmpeg/libavcodec/x86/hevcdsp_init.c +++ b/src/ExtLib/ffmpeg/libavcodec/x86/hevcdsp_init.c @@ -26,7 +26,7 @@ #include "libavutil/mem_internal.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" -#include "libavcodec/hevcdsp.h" +#include "libavcodec/hevc/dsp.h" #include "libavcodec/x86/hevcdsp.h" #include "libavcodec/x86/h26x/h2656dsp.h" @@ -1266,7 +1266,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } // ==> Start patch MPC -#include "libavcodec/hevcpred.h" +#include "libavcodec/hevc/pred.h" #include "libavcodec/x86/hevcpred.h" #undef FUNC diff --git a/src/ExtLib/ffmpeg/libswscale/x86/yuv_2_rgb.asm b/src/ExtLib/ffmpeg/libswscale/x86/yuv_2_rgb.asm index e3470fd9ad..a1f9134e08 100644 --- a/src/ExtLib/ffmpeg/libswscale/x86/yuv_2_rgb.asm +++ b/src/ExtLib/ffmpeg/libswscale/x86/yuv_2_rgb.asm @@ -195,15 +195,15 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters mova m5, m7 paddsw m3, m0 ; B1 B3 B5 B7 ... paddsw m5, m1 ; R1 R3 R5 R7 ... - paddsw m7, m2 ; G1 G3 G4 G7 ... + paddsw m7, m2 ; G1 G3 G5 G7 ... paddsw m0, m6 ; B0 B2 B4 B6 ... paddsw m1, m6 ; R0 R2 R4 R6 ... paddsw m2, m6 ; G0 G2 G4 G6 ... %if %3 == 24 ; PACK RGB24 %define depth 3 - packuswb m0, m3 ; R0 R2 R4 R6 ... R1 R3 R5 R7 ... - packuswb m1, m5 ; B0 B2 B4 B6 ... B1 B3 B5 B7 ... + packuswb m0, m3 ; B0 B2 B4 B6 ... B1 B3 B5 B7 ... + packuswb m1, m5 ; R0 R2 R4 R6 ... R1 R3 R5 R7 ... packuswb m2, m7 ; G0 G2 G4 G6 ... G1 G3 G5 G7 ... mova m3, m_red mova m6, m_blue @@ -248,7 +248,7 @@ cglobal %1_420_%2%3, GPR_num, GPR_num, reg_num, parameters psrlq m5, 32 movd [imageq + 20], m2 ; -- -- G7 B7 movd [imageq + 18], m5 ; R6 G6 B6 R7 -%endif ; mmsize = 8 +%endif ; cpuflag %else ; mmsize == 16 pshufb m3, [rgb24_shuf1] ; r0 g0 r6 g6 r12 g12 r2 g2 r8 g8 r14 g14 r4 g4 r10 g10 pshufb m6, [rgb24_shuf2] ; b10 r11 b0 r1 b6 r7 b12 r13 b2 r3 b8 r9 b14 r15 b4 r5 From b9d38034e1713a5f1c9a5e09f59e9077bf6c7b58 Mon Sep 17 00:00:00 2001 From: Andrei Miloiu Date: Sat, 8 Jun 2024 17:29:11 +0300 Subject: [PATCH 47/57] Update mplayerc.ro.rc.txt --- src/apps/mpcresources/text/mplayerc.ro.rc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/mpcresources/text/mplayerc.ro.rc.txt b/src/apps/mpcresources/text/mplayerc.ro.rc.txt index f58c3ac238..2c39746528 100644 --- a/src/apps/mpcresources/text/mplayerc.ro.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.ro.rc.txt @@ -434,10 +434,10 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "Afișează timpul de căutare" 38 "Dezactivează meniul ""Deschide Disc""" 39 "Prioritatea procesării peste normal" -40 "Network timeouts" -41 "Connection:" +40 "Întreruperi de rețea" +41 "Conexiune:" 44 "sec." -45 "Receiving data:" +45 "Se primesc date:" 48 "sec." END From 1fc72871c9e4e734dae704b5d794276e98574b47 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 20:35:12 +0300 Subject: [PATCH 48/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D1=80=D1=83=D0=BC=D1=8B=D0=BD=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D1=80=20Andrei=20Miloiu).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.ro.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.ro.rc b/src/apps/mpcresources/mplayerc.ro.rc index 61a70918d2..f71e5b5e92 100644 --- a/src/apps/mpcresources/mplayerc.ro.rc +++ b/src/apps/mpcresources/mplayerc.ro.rc @@ -293,12 +293,12 @@ BEGIN CONTROL "Afișează timpul de căutare",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "Dezactivează meniul ""Deschide Disc""",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "Prioritatea procesării peste normal",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "Întreruperi de rețea",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "Conexiune:",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "sec.",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "Se primesc date:",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 LTEXT "sec.",IDC_STATIC,263,249,26,8 From 0144e4fbd2a34c9e9485f95296ed7c434ec873e9 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 21:29:39 +0300 Subject: [PATCH 49/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=20BaseClasses=20(=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D1=80=D0=B5=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20MEDIATYPE=5FSubtit?= =?UTF-8?q?le=20=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ExtLib/BaseClasses | 2 +- src/ExtLib/BaseClasses.vcxproj | 2 ++ src/ExtLib/BaseClasses.vcxproj.filters | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ExtLib/BaseClasses b/src/ExtLib/BaseClasses index 1887eb5fd5..9efca08dd9 160000 --- a/src/ExtLib/BaseClasses +++ b/src/ExtLib/BaseClasses @@ -1 +1 @@ -Subproject commit 1887eb5fd5fc48669f4a6716c0323bb083481b85 +Subproject commit 9efca08dd9cc1176908ea46b42d13597ea8c352e diff --git a/src/ExtLib/BaseClasses.vcxproj b/src/ExtLib/BaseClasses.vcxproj index b3eb0cfbcc..27940471eb 100644 --- a/src/ExtLib/BaseClasses.vcxproj +++ b/src/ExtLib/BaseClasses.vcxproj @@ -63,6 +63,7 @@ + @@ -101,6 +102,7 @@ + diff --git a/src/ExtLib/BaseClasses.vcxproj.filters b/src/ExtLib/BaseClasses.vcxproj.filters index ab3a146fa2..32fa0e9732 100644 --- a/src/ExtLib/BaseClasses.vcxproj.filters +++ b/src/ExtLib/BaseClasses.vcxproj.filters @@ -44,6 +44,9 @@ Header Files + + Header Files + Header Files @@ -154,6 +157,9 @@ Source Files + + Source Files + Source Files From a5e883ac5aa5d7863906f666b97216e66693c2d5 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sat, 8 Jun 2024 21:52:39 +0300 Subject: [PATCH 50/57] =?UTF-8?q?BaseClasses:=20=D0=92=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B0=D0=B5=D0=BC=20=D0=BF=D1=80=D0=B5=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=B5?= =?UTF-8?q?=D0=B4=D0=B8=D0=B0=D1=82=D0=B8=D0=BF=D0=BE=D0=B2=20FOURCC=20?= =?UTF-8?q?=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=B8=D0=B7=D0=B2=D0=B5=D1=81=D1=82=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?GUID=20=D0=B2=20HEX-=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83.=20DSU?= =?UTF-8?q?til:=20=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=20MEDIATYPE=5FSubtitle=20?= =?UTF-8?q?=D0=B8=D0=B7=20MPC=5Fg=5FGuidNames,=20=D0=BA=D0=B0=D0=BA=20?= =?UTF-8?q?=D0=B1=D0=BE=D0=BB=D0=B5=D0=B5=20=D0=BD=D0=B5=D0=BD=D1=83=D0=B6?= =?UTF-8?q?=D0=BD=D1=8B=D0=B9=20=D0=B2=20=D1=8D=D1=82=D0=BE=D0=B9=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DSUtil/GUIDString.cpp | 1 - src/ExtLib/BaseClasses.vcxproj | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DSUtil/GUIDString.cpp b/src/DSUtil/GUIDString.cpp index ceecd18fb0..71c097290e 100644 --- a/src/DSUtil/GUIDString.cpp +++ b/src/DSUtil/GUIDString.cpp @@ -91,7 +91,6 @@ static const GUID_STRING_ENTRY MPC_g_GuidNames[] = { ADDENTRY(MEDIASUBTYPE_Vorbis2) ADDENTRY(FORMAT_VorbisFormat2) ADDENTRY(MEDIASUBTYPE_Matroska) - ADDENTRY(MEDIATYPE_Subtitle) ADDENTRY(MEDIASUBTYPE_UTF8) ADDENTRY(MEDIASUBTYPE_SSA) ADDENTRY(MEDIASUBTYPE_ASS) diff --git a/src/ExtLib/BaseClasses.vcxproj b/src/ExtLib/BaseClasses.vcxproj index 27940471eb..d175e5eb5c 100644 --- a/src/ExtLib/BaseClasses.vcxproj +++ b/src/ExtLib/BaseClasses.vcxproj @@ -43,7 +43,7 @@ - _LIB;%(PreprocessorDefinitions) + _LIB;USE_STD_STRING;%(PreprocessorDefinitions) Use streams.h From beef55e7f943cd5b7132e00b4edde2ac11e3189c Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 9 Jun 2024 07:55:42 +0300 Subject: [PATCH 51/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=20BaseClasses=20(=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BF=D1=80=D0=B5=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B5?= =?UTF-8?q?=D0=B8=D0=B7=D0=B2=D0=B5=D1=81=D1=82=D0=BD=D0=BE=D0=B3=D0=BE=20?= =?UTF-8?q?GUID=20=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20HEX).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ExtLib/BaseClasses | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExtLib/BaseClasses b/src/ExtLib/BaseClasses index 9efca08dd9..2aa2182dfe 160000 --- a/src/ExtLib/BaseClasses +++ b/src/ExtLib/BaseClasses @@ -1 +1 @@ -Subproject commit 9efca08dd9cc1176908ea46b42d13597ea8c352e +Subproject commit 2aa2182dfe1a1befc74e4277b9a7f32a0804ad58 From f29a274467c63ab375d1546ea4c9e6cefe748c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=E8=8C=B6=E3=82=93?= <120134269+Hackjjang@users.noreply.github.com> Date: Sun, 9 Jun 2024 07:49:39 +0900 Subject: [PATCH 52/57] Update Korean Translation --- src/apps/mpcresources/text/mplayerc.kr.rc.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mpcresources/text/mplayerc.kr.rc.txt index 40f73d5b5b..3f09df1867 100644 --- a/src/apps/mpcresources/text/mplayerc.kr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.kr.rc.txt @@ -196,14 +196,14 @@ BEGIN DIALOGEX IDD_PPAGECAPTURE LINES 22 9 "비디오" 10 "오디오" 11 "국가" -15 "디지털 설정 (BDA)" +15 "디지털 설정(BDA)" 16 "네트워크 공급자" 17 "튜너" 18 "수신기" END BEGIN DIALOGEX IDD_PPAGECOLOR LINES 27 -5 "색 제어 (EVR, madVR 및 MPC VR용)" +5 "색 제어(EVR, madVR 및 MPC VR용)" 6 "명도" 7 "대비" 8 "색조" @@ -267,7 +267,7 @@ BEGIN DIALOGEX IDD_PPAGEFORMATS LINES 25 14 "모두(&L)" 15 "없음(&N)" 16 "아이콘 사용" -17 "자동 실행 (윈도XP 전용)" +17 "자동 실행(윈도XP 전용)" 18 "비디오" 19 "음악" 20 "DVD" @@ -357,7 +357,7 @@ BEGIN DIALOGEX IDD_PPAGEMISC LINES 36 10 "재생 목록에 파일 하나만 있다면 '앞/뒤 탐색' 시에 '폴더 내에서 찾기' 사용 안 함" 12 "전체 화면 시, 최소화 방지" 14 "창 모드에서 재생하는 동안 포인터 자동 숨기기" -16 "Show zero hours in status bar and OSD" +16 "상태 표시줄 및 OSD에 제로 시간 표시" 18 "다음 시간보다 짧은 000xx.mpls를 표시하지 않음" 21 "분" 22 "로지텍 LCD 지원 활성화(실험적)" @@ -1382,7 +1382,7 @@ STRING IDS_CENTER_LEVEL_OSD "센터 레벨 : %+.1f dB" STRING IDS_CLEAR "지우기" STRING IDS_CMD_ADD "/add\t\t재생 목록에 지정한 ""경로 이름""을 추가,\n\t\t/open 과 /play 스위치와 같이 사용 가능" STRING IDS_CMD_AUDIORENDERER "/audiorenderer N\t오디오 렌더러 N번(1부터 시작)을 사용해서 시작\n\t\t(""출력"" 설정을 참고하세요)" -STRING IDS_CMD_CD "/cd\t\t오디오 CD 또는 (S)VCD의 모든 트랙을 불러옴,\n\t\t""경로 이름"" 을 지정했을 때 드라이브를 의미함 (옵션)" +STRING IDS_CMD_CD "/cd\t\t오디오 CD 또는 (S)VCD의 모든 트랙을 불러옴,\n\t\t""경로 이름"" 을 지정했을 때 드라이브를 의미함(옵션)" STRING IDS_CMD_CLIPBOARD "/clipboard\t\tOpen 클립보드에서 경로/링크 열기" STRING IDS_CMD_CLOSE "/close\t\t재생이 끝나면 재생기 종료(/play 스위치를 같이 써야 함)" STRING IDS_CMD_D3DFS "/d3dfs\t\tD3D 전체 화면 모드에서 생성" @@ -1612,7 +1612,7 @@ STRING IDS_MAINFRM_DIR_CHECK "하위 폴더 포함" STRING IDS_MAINFRM_DIR_TITLE "디렉터리 선택" STRING IDS_MENU_VIDEO_ANGLE "비디오 앵글(&L)" STRING IDS_MENU_VIDEO_STREAM "비디오 스트림(&T)" -STRING IDS_MERGING_FILES "Merging files..." +STRING IDS_MERGING_FILES "파일 병합..." STRING IDS_MFMT_3G2 "3G2" STRING IDS_MFMT_3GP "3GP" STRING IDS_MFMT_AC3 "AC-3" From 3dee7658212da121a89321a68498eb6886ec7ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=E8=8C=B6=E3=82=93?= <120134269+Hackjjang@users.noreply.github.com> Date: Sun, 9 Jun 2024 07:56:05 +0900 Subject: [PATCH 53/57] Update Korean Translation --- src/apps/mpcresources/text/mplayerc.kr.rc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mpcresources/text/mplayerc.kr.rc.txt index 3f09df1867..6659001bb8 100644 --- a/src/apps/mpcresources/text/mplayerc.kr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.kr.rc.txt @@ -357,7 +357,7 @@ BEGIN DIALOGEX IDD_PPAGEMISC LINES 36 10 "재생 목록에 파일 하나만 있다면 '앞/뒤 탐색' 시에 '폴더 내에서 찾기' 사용 안 함" 12 "전체 화면 시, 최소화 방지" 14 "창 모드에서 재생하는 동안 포인터 자동 숨기기" -16 "상태 표시줄 및 OSD에 제로 시간 표시" +16 "상태 표시줄 및 OSD에 개시 시간 표시" 18 "다음 시간보다 짧은 000xx.mpls를 표시하지 않음" 21 "분" 22 "로지텍 LCD 지원 활성화(실험적)" From 2ecd62ceb38b04156221d2893166b0193990fd39 Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 9 Jun 2024 08:00:27 +0300 Subject: [PATCH 54/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=BE=D1=80=D0=B5=D0=B9=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D1=80=20Hackjjang).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.kr.rc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.kr.rc b/src/apps/mpcresources/mplayerc.kr.rc index 7c99debf0f..fbcfc77557 100644 --- a/src/apps/mpcresources/mplayerc.kr.rc +++ b/src/apps/mpcresources/mplayerc.kr.rc @@ -410,7 +410,7 @@ BEGIN PUSHBUTTON "모두(&L)",IDC_BUTTON1,108,198,40,14 PUSHBUTTON "없음(&N)",IDC_BUTTON6,150,198,40,14 CONTROL "아이콘 사용",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,200,201,70,9 - GROUPBOX "자동 실행 (윈도XP 전용)",IDC_STATIC1,5,217,108,37 + GROUPBOX "자동 실행(윈도XP 전용)",IDC_STATIC1,5,217,108,37 CONTROL "비디오",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,229,47,9 CONTROL "음악",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,241,47,9 CONTROL "DVD",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,61,229,47,9 @@ -1045,7 +1045,7 @@ IDD_PPAGECOLOR DIALOGEX 0, 0, 296, 264 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - GROUPBOX "색 제어 (EVR, madVR 및 MPC VR용)",IDC_STATIC,5,5,286,80 + GROUPBOX "색 제어(EVR, madVR 및 MPC VR용)",IDC_STATIC,5,5,286,80 LTEXT "명도",IDC_STATIC,10,19,55,8 LTEXT "대비",IDC_STATIC,10,35,55,8 LTEXT "색조",IDC_STATIC,10,51,55,8 @@ -1084,7 +1084,7 @@ BEGIN "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,61,282,9 CONTROL "창 모드에서 재생하는 동안 포인터 자동 숨기기",IDC_CHECK5, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,73,280,9 - CONTROL "Show zero hours in status bar and OSD",IDC_CHECK8, + CONTROL "상태 표시줄 및 OSD에 개시 시간 표시",IDC_CHECK8, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,85,280,9 LTEXT "다음 시간보다 짧은 000xx.mpls를 표시하지 않음",IDC_STATIC,7,99,150,8 EDITTEXT IDC_EDIT5,161,97,30,13,ES_CENTER | ES_AUTOHSCROLL | ES_NUMBER @@ -1146,7 +1146,7 @@ BEGIN COMBOBOX IDC_COMBO1,84,45,202,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO2,84,60,202,30,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO9,84,75,202,102,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP - GROUPBOX "디지털 설정 (BDA)",IDC_STATIC,5,92,286,59 + GROUPBOX "디지털 설정(BDA)",IDC_STATIC,5,92,286,59 LTEXT "네트워크 공급자",IDC_STATIC4,10,106,70,8 LTEXT "튜너",IDC_STATIC5,10,121,70,8 LTEXT "수신기",IDC_STATIC6,10,136,70,8 @@ -3207,7 +3207,7 @@ BEGIN IDS_CMD_DVD "/dvd\t\tdvd재생모드, ""경로 이름"" 을 지정했을 때, DVD 폴더를 의미함(옵션)" IDS_CMD_DVDPOS1 "/dvdpos T#C\t타이틀 T, 챕터 C에서 재생 시작" IDS_CMD_DVDPOS2 "/dvdpos T#hh:mm\t타이틀 T, 위치 hh:mm:ss에서 재생 시작" - IDS_CMD_CD "/cd\t\t오디오 CD 또는 (S)VCD의 모든 트랙을 불러옴,\n\t\t""경로 이름"" 을 지정했을 때 드라이브를 의미함 (옵션)" + IDS_CMD_CD "/cd\t\t오디오 CD 또는 (S)VCD의 모든 트랙을 불러옴,\n\t\t""경로 이름"" 을 지정했을 때 드라이브를 의미함(옵션)" IDS_CMD_OPEN "/open\t\t파일을 열지만, 재생을 시작하지는 않음" IDS_CMD_PLAY "/play\t\t파일을 열고 재생을 시작함" IDS_CMD_CLOSE "/close\t\t재생이 끝나면 재생기 종료(/play 스위치를 같이 써야 함)" @@ -3443,7 +3443,7 @@ BEGIN IDS_NO_MORE_MEDIA "현재 폴더에 더 이상의 미디어 파일이 존재하지 않습니다." IDS_FIRST_IN_FOLDER "폴더 내의 첫 번째 파일을 불러왔습니다." IDS_LAST_IN_FOLDER "폴더 내의 마지막 파일을 불러왔습니다." - IDS_MERGING_FILES "Merging files..." + IDS_MERGING_FILES "파일 병합..." END STRINGTABLE From 3a5ef8feed93b68355086024dbe55b3bd423710e Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 9 Jun 2024 13:25:54 +0300 Subject: [PATCH 55/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BE=D0=B4=D0=BC=D0=BE=D0=B4=D1=83=D0=BB?= =?UTF-8?q?=D1=8C=20BaseClasses=20(=D0=BF=D1=80=D0=B5=D0=BE=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20GUID=20?= =?UTF-8?q?=D0=BC=D0=B5=D0=B4=D0=B8=D0=B0=D1=82=D0=B8=D0=BF=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B2=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D1=83=20=D1=82=D0=B5?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D1=8C=20=D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=B2=20BaseClasses).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/stdafx_common_dshow.h | 3 +- src/DSUtil/GUIDString.cpp | 74 +++++++++------------------------- src/DSUtil/GUIDString.h | 3 +- src/ExtLib/BaseClasses | 2 +- src/apps/mplayerc/mplayerc.cpp | 2 + 5 files changed, 25 insertions(+), 59 deletions(-) diff --git a/include/stdafx_common_dshow.h b/include/stdafx_common_dshow.h index c47c0d29ed..3ef42e0112 100644 --- a/include/stdafx_common_dshow.h +++ b/include/stdafx_common_dshow.h @@ -1,6 +1,6 @@ /* * (C) 2003-2006 Gabest - * (C) 2006-2021 see Authors.txt + * (C) 2006-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -20,6 +20,7 @@ */ #include +#define USE_STD_STRING #include #include #include diff --git a/src/DSUtil/GUIDString.cpp b/src/DSUtil/GUIDString.cpp index 71c097290e..9721b8403c 100644 --- a/src/DSUtil/GUIDString.cpp +++ b/src/DSUtil/GUIDString.cpp @@ -24,20 +24,15 @@ #include // MEDIASUBTYPE_CPFilters_Processed, FORMATTYPE_CPFilters_Processed #include "GUIDString.h" -#define ENTRYNAME(subtype) #subtype -static const struct { - WORD wFormatTag; - const CHAR* szName; -} -MPC_g_WaveGuidNames[] = { +static const WaveStringEntry MPC_g_WaveGuidNames[] = { // mmreg.h - {WAVE_FORMAT_ADPCM, "MS_ADPCM"}, // + {WAVE_FORMAT_ADPCM, "MS_ADPCM"}, {WAVE_FORMAT_ALAW, "ALAW"}, {WAVE_FORMAT_MULAW, "MULAW"}, - {WAVE_FORMAT_IMA_ADPCM, "IMA_ADPCM"}, // + {WAVE_FORMAT_IMA_ADPCM, "IMA_ADPCM"}, {WAVE_FORMAT_WMAVOICE9, "WMSP1"}, {WAVE_FORMAT_DSPGROUP_TRUESPEECH, "TRUESPEECH"}, - {WAVE_FORMAT_GSM610, "GSM610"}, // + {WAVE_FORMAT_GSM610, "GSM610"}, {WAVE_FORMAT_SHARP_G726, "G726_ADPCM"}, {WAVE_FORMAT_MPEGLAYER3, "MP3"}, {WAVE_FORMAT_VOXWARE_RT29, "VOXWARE_RT29"}, @@ -49,10 +44,10 @@ MPC_g_WaveGuidNames[] = { {WAVE_FORMAT_INTEL_MUSIC_CODER, "INTEL_MUSIC"}, {WAVE_FORMAT_INDEO_AUDIO, "INDEO_AUDIO"}, {WAVE_FORMAT_DTS2, "DTS2"}, - {WAVE_FORMAT_MPEG_ADTS_AAC, "MPEG_ADTS_AAC"}, // - {WAVE_FORMAT_MPEG_RAW_AAC, "MPEG_RAW_AAC"}, // - {WAVE_FORMAT_MPEG_LOAS, "MPEG_LOAS"}, // - {WAVE_FORMAT_MPEG_HEAAC, "MPEG_HEAAC"}, // + {WAVE_FORMAT_MPEG_ADTS_AAC, "MPEG_ADTS_AAC"}, + {WAVE_FORMAT_MPEG_RAW_AAC, "MPEG_RAW_AAC"}, + {WAVE_FORMAT_MPEG_LOAS, "MPEG_LOAS"}, + {WAVE_FORMAT_MPEG_HEAAC, "MPEG_HEAAC"}, {WAVE_FORMAT_WAVPACK_AUDIO, "WAVPACK4"}, {WAVE_FORMAT_OPUS, "OPUS_WAVE"}, {WAVE_FORMAT_SPEEX_VOICE, "SPEEX"}, @@ -68,8 +63,8 @@ MPC_g_WaveGuidNames[] = { {WAVE_FORMAT_PS2_ADPCM, "PS2_ADPCM"}, //0xF522 }; -#define ADDENTRY(subtype) { #subtype, subtype }, -static const GUID_STRING_ENTRY MPC_g_GuidNames[] = { +#define ADDENTRY(subtype) { subtype, #subtype }, +static const GuidStringEntry MPC_g_GuidNames[] = { ADDENTRY(MEDIASUBTYPE_FLAC_FRAMED) ADDENTRY(MEDIASUBTYPE_TAK) ADDENTRY(MEDIASUBTYPE_WavpackHybrid) @@ -126,46 +121,13 @@ static const GUID_STRING_ENTRY MPC_g_GuidNames[] = { CStringA GetGUIDName(const GUID& guid) { - if (guid == GUID_NULL) { - // to prevent print TIME_FORMAT_NONE for GUID_NULL - return "GUID_NULL"; - } - - const char* guidStr = GuidNames[guid]; // GUID names from uuids.h - if (strcmp(guidStr, "Unknown GUID Name") != 0) { - return guidStr; - } - - if (memcmp(&guid.Data2, &MEDIASUBTYPE_YUY2.Data2, sizeof(GUID) - sizeof(GUID::Data1)) == 0) { - // GUID like {xxxxxxxx-0000-0010-8000-00AA00389B71} - CStringA str = "MEDIASUBTYPE_"; - - if ((guid.Data1 & 0x0000FFFF) == guid.Data1) { - const WORD wFormatTag = (WORD)guid.Data1; - for (const auto& waveGuidName : MPC_g_WaveGuidNames) { - if (waveGuidName.wFormatTag == wFormatTag) { - str.Append(waveGuidName.szName); - return str; - } - } - str.AppendFormat("0x%04x", wFormatTag); - return str; - } - - uint32_t fourcc = guid.Data1; - for (unsigned i = 0; i < 4; i++) { - const uint32_t c = fourcc & 0xff; - str.AppendFormat(c < 32 ? "[%u]" : "%c", c); - fourcc >>= 8; - } - return str; - } - - for (const auto& guidName : MPC_g_GuidNames) { - if (guidName.guid == guid) { - return guidName.szName; - } - } + return GuidNames.GetString(guid).c_str(); +} - return "Unknown GUID Name"; +void SetExtraGuidStrings() +{ + GuidNames.SetExtraGuidStrings( + &MPC_g_GuidNames[0], std::size(MPC_g_GuidNames), + &MPC_g_WaveGuidNames[0], std::size(MPC_g_WaveGuidNames) + ); } diff --git a/src/DSUtil/GUIDString.h b/src/DSUtil/GUIDString.h index 0d78110cd0..a420dd5152 100644 --- a/src/DSUtil/GUIDString.h +++ b/src/DSUtil/GUIDString.h @@ -1,5 +1,5 @@ /* - * (C) 2013-2023 see Authors.txt + * (C) 2013-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -21,3 +21,4 @@ #pragma once CStringA GetGUIDName(const GUID& guid); +void SetExtraGuidStrings(); diff --git a/src/ExtLib/BaseClasses b/src/ExtLib/BaseClasses index 2aa2182dfe..68d229cee6 160000 --- a/src/ExtLib/BaseClasses +++ b/src/ExtLib/BaseClasses @@ -1 +1 @@ -Subproject commit 2aa2182dfe1a1befc74e4277b9a7f32a0804ad58 +Subproject commit 68d229cee6345f9b312bd3e4ea63246a5e37ac4c diff --git a/src/apps/mplayerc/mplayerc.cpp b/src/apps/mplayerc/mplayerc.cpp index fca22d01b6..296a16fa8c 100644 --- a/src/apps/mplayerc/mplayerc.cpp +++ b/src/apps/mplayerc/mplayerc.cpp @@ -33,6 +33,7 @@ #include "DSUtil/SysVersion.h" #include "DSUtil/FileHandle.h" #include "DSUtil/FileVersion.h" +#include "DSUtil/GUIDString.h" #include #include #include @@ -750,6 +751,7 @@ BOOL CMPlayerCApp::InitInstance() DbgSetModuleLevel(LOG_TRACE, DWORD_MAX); DbgSetModuleLevel(LOG_ERROR, DWORD_MAX); #endif + SetExtraGuidStrings(); // Remove the working directory from the search path to work around the DLL preloading vulnerability SetDllDirectory(L""); From fb14fd39d05f8efa8afe0634df82d629f10c774d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hack=E8=8C=B6=E3=82=93?= <120134269+Hackjjang@users.noreply.github.com> Date: Sun, 9 Jun 2024 16:19:46 +0900 Subject: [PATCH 56/57] Update Korean Translation --- src/apps/mpcresources/text/mplayerc.kr.rc.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/mpcresources/text/mplayerc.kr.rc.txt b/src/apps/mpcresources/text/mplayerc.kr.rc.txt index 6659001bb8..173d6d3990 100644 --- a/src/apps/mpcresources/text/mplayerc.kr.rc.txt +++ b/src/apps/mpcresources/text/mplayerc.kr.rc.txt @@ -434,11 +434,11 @@ BEGIN DIALOGEX IDD_PPAGEPLAYER LINES 49 37 "탐색 시간 표기" 38 "'디스크 열기' 메뉴 사용 안 함" 39 "프로세스 우선순위 높이기" -40 "Network timeouts" -41 "Connection:" +40 "네트워크 시간 초과" +41 "연결 :" 44 "초" -45 "Receiving data:" -48 "sec." +45 "데이터 수신 :" +48 "초" END BEGIN DIALOGEX IDD_PPAGESOUNDPROCESSING LINES 37 From fb946c6bcd24d51c46a5f29bb757bb5b2b7239ae Mon Sep 17 00:00:00 2001 From: v0lt Date: Sun, 9 Jun 2024 13:33:38 +0300 Subject: [PATCH 57/57] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=BE=D1=80=D0=B5=D0=B9=D1=81=D0=BA=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=20(=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D1=80=20Hackjjang).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/mpcresources/mplayerc.kr.rc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/mpcresources/mplayerc.kr.rc b/src/apps/mpcresources/mplayerc.kr.rc index fbcfc77557..d5887102b1 100644 --- a/src/apps/mpcresources/mplayerc.kr.rc +++ b/src/apps/mpcresources/mplayerc.kr.rc @@ -293,15 +293,15 @@ BEGIN CONTROL "탐색 시간 표기",IDC_CHECK15,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,138,183,148,9 CONTROL "'디스크 열기' 메뉴 사용 안 함",IDC_CHECK10,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,196,156,9 CONTROL "프로세스 우선순위 높이기",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,129,208,156,9 - GROUPBOX "Network timeouts",IDC_STATIC,124,222,167,41,WS_GROUP - LTEXT "Connection:",IDC_STATIC,129,233,96,8 + GROUPBOX "네트워크 시간 초과",IDC_STATIC,124,222,167,41,WS_GROUP + LTEXT "연결 :",IDC_STATIC,129,233,96,8 EDITTEXT IDC_EDIT2,230,231,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,231,11,13 LTEXT "초",IDC_STATIC,263,233,26,8 - LTEXT "Receiving data:",IDC_STATIC,129,249,96,8 + LTEXT "데이터 수신 :",IDC_STATIC,129,249,96,8 EDITTEXT IDC_EDIT4,230,247,29,13,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,248,247,12,13 - LTEXT "sec.",IDC_STATIC,263,249,26,8 + LTEXT "초",IDC_STATIC,263,249,26,8 END IDD_PPAGEDVD DIALOGEX 0, 0, 296, 264