diff mbox series

[FFmpeg-devel] avcodec/vvcdec: Fix compiling with MSVC 2022 17.8 and older

Message ID 20240626082040.40005-1-martin@martin.st
State New
Headers show
Series [FFmpeg-devel] avcodec/vvcdec: Fix compiling with MSVC 2022 17.8 and older | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Martin Storsjö June 26, 2024, 8:20 a.m. UTC
Versions of MSVC older than 17.9 error out here with the following
error:

    src/libavcodec/vvc/filter.c(815): error C2059: syntax error: '}'
    src/libavcodec/vvc/filter.c(832): error C2065: 'all_zero_bs': undeclared identifier
    src/libavcodec/vvc/filter.c(836): error C2065: 'all_zero_bs': undeclared identifier
---
 libavcodec/vvc/filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Frank Plowman June 27, 2024, 7:47 a.m. UTC | #1
On 26/06/2024 09:20, Martin Storsjö wrote:
> Versions of MSVC older than 17.9 error out here with the following
> error:
> 
>     src/libavcodec/vvc/filter.c(815): error C2059: syntax error: '}'
>     src/libavcodec/vvc/filter.c(832): error C2065: 'all_zero_bs': undeclared identifier
>     src/libavcodec/vvc/filter.c(836): error C2065: 'all_zero_bs': undeclared identifier
> ---
>  libavcodec/vvc/filter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c
> index 2cadaaaf22..7ffcb29f47 100644
> --- a/libavcodec/vvc/filter.c
> +++ b/libavcodec/vvc/filter.c
> @@ -812,7 +812,7 @@ static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs,
>          for (int y = y0; y < y_end; y += (DEBLOCK_STEP << vs)) {
>              for (int x = x0 ? x0 : grid; x < x_end; x += grid) {
>                  const uint8_t horizontal_ctu_edge = !vertical && !(x % ctb_size);
> -                int32_t bs[4], beta[4], tc[4] = { }, all_zero_bs = 1;
> +                int32_t bs[4], beta[4], tc[4] = { 0 }, all_zero_bs = 1;
>                  uint8_t max_len_p[4], max_len_q[4];
>  
>                  for (int i = 0; i < DEBLOCK_STEP >> (2 - vs); i++) {

LGTM.
diff mbox series

Patch

diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c
index 2cadaaaf22..7ffcb29f47 100644
--- a/libavcodec/vvc/filter.c
+++ b/libavcodec/vvc/filter.c
@@ -812,7 +812,7 @@  static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs,
         for (int y = y0; y < y_end; y += (DEBLOCK_STEP << vs)) {
             for (int x = x0 ? x0 : grid; x < x_end; x += grid) {
                 const uint8_t horizontal_ctu_edge = !vertical && !(x % ctb_size);
-                int32_t bs[4], beta[4], tc[4] = { }, all_zero_bs = 1;
+                int32_t bs[4], beta[4], tc[4] = { 0 }, all_zero_bs = 1;
                 uint8_t max_len_p[4], max_len_q[4];
 
                 for (int i = 0; i < DEBLOCK_STEP >> (2 - vs); i++) {