Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <ffmpegagent-at-gmail.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 46/48] avcodec/mpegvideo: Move loop_filter to {H263Dec, MPVEnc, VC1}Context
Date: Mon, 23 Jun 2025 13:36:46 +0000
Message-ID: <69b79342672c9c8f92a97d088e513101102d100e.1750685810.git.ffmpegagent@gmail.com> (raw)
In-Reply-To: <pull.102.ffstaging.FFmpeg.1750685808.ffmpegagent@gmail.com>

From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/dxva2_vc1.c     |  4 ++--
 libavcodec/h261enc.c       |  4 ++--
 libavcodec/h263dec.c       |  4 ++--
 libavcodec/h263dec.h       |  1 +
 libavcodec/intelh263dec.c  |  2 +-
 libavcodec/ituh263dec.c    |  8 ++++----
 libavcodec/ituh263enc.c    |  2 +-
 libavcodec/mpegvideo.h     |  1 -
 libavcodec/mpegvideo_enc.c | 10 +++++-----
 libavcodec/mpegvideoenc.h  |  1 +
 libavcodec/mss2.c          |  2 +-
 libavcodec/nvdec_vc1.c     |  2 +-
 libavcodec/rv10.c          |  6 +++---
 libavcodec/rv20enc.c       |  2 +-
 libavcodec/vaapi_vc1.c     |  2 +-
 libavcodec/vc1.c           | 16 ++++++++--------
 libavcodec/vc1.h           |  1 +
 libavcodec/vc1_block.c     | 14 +++++++-------
 libavcodec/vdpau_vc1.c     |  2 +-
 libavcodec/wmv2dec.c       |  6 +++---
 libavcodec/wmv2enc.c       |  2 +-
 21 files changed, 47 insertions(+), 45 deletions(-)

diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 3400480f1f..f1dcea1e84 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -108,7 +108,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx,
     pp->bRcontrol               = v->rnd;
     pp->bPicSpatialResid8       = (v->panscanflag  << 7) |
                                   (v->refdist_flag << 6) |
-                                  (s->loop_filter  << 5) |
+                                  (v->loop_filter  << 5) |
                                   (v->fastuvmc     << 4) |
                                   (v->extended_mv  << 3) |
                                   (v->dquant       << 1) |
@@ -121,7 +121,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx,
     pp->bPicExtrapolation       = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2;
     pp->bPicDeblocked           = ((!pp->bPicBackwardPrediction && v->overlap)        << 6) |
                                   ((v->profile != PROFILE_ADVANCED && v->rangeredfrm) << 5) |
-                                  (s->loop_filter                                     << 1);
+                                  (v->loop_filter                                     << 1);
     pp->bPicDeblockConfined     = (v->postprocflag             << 7) |
                                   (v->broadcast                << 6) |
                                   (v->interlace                << 5) |
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 89a6a69755..c75e029d68 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -266,9 +266,9 @@ static void h261_encode_mb(MPVEncContext *const s, int16_t block[6][64],
     if (!s->c.mb_intra) {
         com->mtype++;
 
-        if (mvd || s->c.loop_filter)
+        if (mvd || s->loop_filter)
             com->mtype += 3;
-        if (s->c.loop_filter)
+        if (s->loop_filter)
             com->mtype += 3;
         if (cbp)
             com->mtype++;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 7cd8be850b..204476dfd6 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -280,7 +280,7 @@ static int decode_slice(H263DecContext *const h)
                 const int xy = h->c.mb_x + h->c.mb_y * h->c.mb_stride;
                 if (ret == SLICE_END) {
                     ff_mpv_reconstruct_mb(&h->c, h->block);
-                    if (h->c.loop_filter)
+                    if (h->loop_filter)
                         ff_h263_loop_filter(&h->c);
 
                     ff_er_add_slice(&h->c.er, h->c.resync_mb_x, h->c.resync_mb_y,
@@ -313,7 +313,7 @@ static int decode_slice(H263DecContext *const h)
             }
 
             ff_mpv_reconstruct_mb(&h->c, h->block);
-            if (h->c.loop_filter)
+            if (h->loop_filter)
                 ff_h263_loop_filter(&h->c);
         }
 
diff --git a/libavcodec/h263dec.h b/libavcodec/h263dec.h
index c2cca57dea..ace210b036 100644
--- a/libavcodec/h263dec.h
+++ b/libavcodec/h263dec.h
@@ -66,6 +66,7 @@ typedef struct H263DecContext {
     int umvplus;                ///< == H.263+ && unrestricted_mv
     int h263_slice_structured;
     int alt_inter_vlc;          ///< alternative inter vlc
+    int loop_filter;
     int modified_quant;
 
     /* MPEG-4 specific */
diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c
index 73d56f4195..27a3cadbad 100644
--- a/libavcodec/intelh263dec.c
+++ b/libavcodec/intelh263dec.c
@@ -82,7 +82,7 @@ int ff_intel_h263_decode_picture_header(H263DecContext *const h)
         }
         if (get_bits(&h->gb, 2))
             av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
-        h->c.loop_filter = get_bits1(&h->gb) * !h->c.avctx->lowres;
+        h->loop_filter = get_bits1(&h->gb) * !h->c.avctx->lowres;
         if (get_bits1(&h->gb))
             av_log(h->c.avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
         if (get_bits1(&h->gb))
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index b99100590c..7a78b95c50 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -90,7 +90,7 @@ void ff_h263_show_pict_info(H263DecContext *const h, int h263_plus)
                h->c.h263_aic ? " AIC" : "",
                h->alt_inter_vlc ? " AIV" : "",
                h->modified_quant ? " MQ" : "",
-               h->c.loop_filter ? " LOOP" : "",
+               h->loop_filter ? " LOOP" : "",
                h->h263_slice_structured ? " SS" : "",
                h->c.avctx->framerate.num, h->c.avctx->framerate.den);
     }
@@ -798,7 +798,7 @@ int ff_h263_decode_mb(H263DecContext *const h)
                 h->c.cur_pic.mb_type[xy] = MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
                 h->c.mv[0][0][0] = 0;
                 h->c.mv[0][0][1] = 0;
-                h->c.mb_skipped = !(h->c.obmc | h->c.loop_filter);
+                h->c.mb_skipped = !(h->c.obmc | h->loop_filter);
                 goto end;
             }
             cbpc = get_vlc2(&h->gb, ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 2);
@@ -1181,9 +1181,9 @@ int ff_h263_decode_picture_header(H263DecContext *const h)
             }
             h->c.obmc        = get_bits1(&h->gb); /* Advanced prediction mode */
             h->c.h263_aic    = get_bits1(&h->gb); /* Advanced Intra Coding (AIC) */
-            h->c.loop_filter = get_bits1(&h->gb);
+            h->loop_filter = get_bits1(&h->gb);
             if (h->c.avctx->lowres)
-                h->c.loop_filter = 0;
+                h->loop_filter = 0;
 
             h->h263_slice_structured = get_bits1(&h->gb);
             if (get_bits1(&h->gb) != 0) {
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 250ce0b043..85008443da 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -285,7 +285,7 @@ static int h263_encode_picture_header(MPVMainEncContext *const m)
         put_bits(&s->pb,1,0); /* SAC: off */
         put_bits(&s->pb,1,s->c.obmc); /* Advanced Prediction Mode */
         put_bits(&s->pb,1,s->c.h263_aic); /* Advanced Intra Coding */
-        put_bits(&s->pb,1,s->c.loop_filter); /* Deblocking Filter */
+        put_bits(&s->pb,1,s->loop_filter); /* Deblocking Filter */
         put_bits(&s->pb,1,s->h263_slice_structured); /* Slice Structured */
         put_bits(&s->pb,1,0); /* Reference Picture Selection: off */
         put_bits(&s->pb,1,0); /* Independent Segment Decoding: off */
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index eb8739014b..4a30986eac 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -215,7 +215,6 @@ typedef struct MpegEncContext {
 
     /* H.263+ specific */
     int h263_aic_dir;               ///< AIC direction: 0 = left, 1 = top
-    int loop_filter;
 
     /* MPEG-4 specific */
     int studio_profile;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index e7f40f5d60..3ab097d6f6 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -654,7 +654,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
                          (s->mpv_flags & FF_MPV_FLAG_QP_RD)) &&
                         !m->fixed_qscale;
 
-    s->c.loop_filter = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);
+    s->loop_filter = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);
 
     if (avctx->rc_max_rate && !avctx->rc_buffer_size) {
         switch(avctx->codec_id) {
@@ -925,8 +925,8 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
         /* Fx */
         s->c.h263_aic        = (avctx->flags & AV_CODEC_FLAG_AC_PRED) ? 1 : 0;
         s->modified_quant  = s->c.h263_aic;
-        s->c.loop_filter     = (avctx->flags & AV_CODEC_FLAG_LOOP_FILTER) ? 1 : 0;
-        s->me.unrestricted_mv = s->c.obmc || s->c.loop_filter || s->umvplus;
+        s->loop_filter        = !!(avctx->flags & AV_CODEC_FLAG_LOOP_FILTER);
+        s->me.unrestricted_mv = s->c.obmc || s->loop_filter || s->umvplus;
         s->flipflop_rounding = 1;
 
         /* /Fx */
@@ -959,7 +959,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
         // Set here to force allocation of dc_val;
         // will be set later on a per-frame basis.
         s->c.h263_aic        = 1;
-        s->c.loop_filter     = 1;
+        s->loop_filter     = 1;
         s->me.unrestricted_mv = 0;
         break;
 #endif
@@ -3603,7 +3603,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
                     s, s->new_pic->data[2] + s->c.mb_x*8  + s->c.mb_y*s->c.uvlinesize*chr_h,
                     s->c.dest[2], w>>1, h>>s->c.chroma_y_shift, s->c.uvlinesize);
             }
-            if (s->c.loop_filter) {
+            if (s->loop_filter) {
                 if (CONFIG_H263_ENCODER && s->c.out_format == FMT_H263)
                     ff_h263_loop_filter(&s->c);
             }
diff --git a/libavcodec/mpegvideoenc.h b/libavcodec/mpegvideoenc.h
index 0ad1561851..ee115c3611 100644
--- a/libavcodec/mpegvideoenc.h
+++ b/libavcodec/mpegvideoenc.h
@@ -152,6 +152,7 @@ typedef struct MPVEncContext {
     int h263_slice_structured;
     int alt_inter_vlc;             ///< alternative inter vlc
     int modified_quant;
+    int loop_filter;
 
     /* MJPEG specific */
     struct MJpegContext *mjpeg_ctx;
diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c
index 3758313fa8..aaeceb055d 100644
--- a/libavcodec/mss2.c
+++ b/libavcodec/mss2.c
@@ -390,7 +390,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size,
     if ((ret = init_get_bits8(&v->gb, buf, buf_size)) < 0)
         return ret;
 
-    s->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;
+    v->loop_filter = avctx->skip_loop_filter < AVDISCARD_ALL;
 
     if (ff_vc1_parse_frame_header(v, &v->gb) < 0) {
         av_log(v->s.avctx, AV_LOG_ERROR, "header error\n");
diff --git a/libavcodec/nvdec_vc1.c b/libavcodec/nvdec_vc1.c
index 7cdfdec42d..d00cf5237a 100644
--- a/libavcodec/nvdec_vc1.c
+++ b/libavcodec/nvdec_vc1.c
@@ -94,7 +94,7 @@ static int nvdec_vc1_start_frame(AVCodecContext *avctx,
             .extended_mv       = v->extended_mv,
             .dquant            = v->dquant,
             .vstransform       = v->vstransform,
-            .loopfilter        = v->s.loop_filter,
+            .loopfilter        = v->loop_filter,
             .fastuvmc          = v->fastuvmc,
             .overlap           = v->overlap,
             .quantizer         = v->quantizer_mode,
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 677db1cd42..b4545f7624 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -186,7 +186,7 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size)
     }
 
     if (RV_GET_MINOR_VER(rv->sub_id) >= 2)
-        h->c.loop_filter = get_bits1(&h->gb) && !h->c.avctx->lowres;
+        h->loop_filter = get_bits1(&h->gb) && !h->c.avctx->lowres;
 
     if (RV_GET_MINOR_VER(rv->sub_id) <= 1)
         seq = get_bits(&h->gb, 8) << 7;
@@ -292,7 +292,7 @@ static int rv20_decode_picture_header(RVDecContext *rv, int whole_size)
         h->c.c_dc_scale_table = ff_mpeg1_dc_scale_table;
     }
     if (!h->c.avctx->lowres)
-        h->c.loop_filter = 1;
+        h->loop_filter = 1;
 
     if (h->c.avctx->debug & FF_DEBUG_PICT_INFO) {
         av_log(h->c.avctx, AV_LOG_INFO,
@@ -517,7 +517,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf,
         if (h->c.pict_type != AV_PICTURE_TYPE_B)
             ff_h263_update_motion_val(&h->c);
         ff_mpv_reconstruct_mb(&h->c, h->block);
-        if (h->c.loop_filter)
+        if (h->loop_filter)
             ff_h263_loop_filter(&h->c);
 
         if (++h->c.mb_x == h->c.mb_width) {
diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c
index 31fc33ddc7..8bf93e7c09 100644
--- a/libavcodec/rv20enc.c
+++ b/libavcodec/rv20enc.c
@@ -55,7 +55,7 @@ int ff_rv20_encode_picture_header(MPVMainEncContext *const m)
     av_assert1(!s->alt_inter_vlc);
     av_assert1(!s->umvplus);
     av_assert1(s->modified_quant == 1);
-    av_assert1(s->c.loop_filter == 1);
+    av_assert1(s->loop_filter == 1);
 
     s->c.h263_aic = s->c.pict_type == AV_PICTURE_TYPE_I;
     if (s->c.h263_aic) {
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 7a955ac7f3..a3dd3140e2 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -285,7 +285,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx,
             .broken_link                   = v->broken_link,
             .closed_entry                  = v->closed_entry,
             .panscan_flag                  = v->panscanflag,
-            .loopfilter                    = s->loop_filter,
+            .loopfilter                    = v->loop_filter,
         },
         .conditional_overlap_flag          = v->condover,
         .fast_uvmc_flag                    = v->fastuvmc,
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index c136f14c82..e365aaec84 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -300,13 +300,13 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
     v->frmrtq_postproc = get_bits(gb, 3); //common
     // (bitrate-32kbps)/64kbps
     v->bitrtq_postproc = get_bits(gb, 5); //common
-    v->s.loop_filter   = get_bits1(gb); //common
-    if (v->s.loop_filter == 1 && v->profile == PROFILE_SIMPLE) {
+    v->loop_filter     = get_bits1(gb); //common
+    if (v->loop_filter == 1 && v->profile == PROFILE_SIMPLE) {
         av_log(avctx, AV_LOG_ERROR,
                "LOOPFILTER shall not be enabled in Simple Profile\n");
     }
     if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)
-        v->s.loop_filter = 0;
+        v->loop_filter = 0;
 
     v->res_x8          = get_bits1(gb); //reserved
     v->multires        = get_bits1(gb);
@@ -376,7 +376,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
            "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"
            "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",
            v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
-           v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,
+           v->loop_filter, v->multires, v->fastuvmc, v->extended_mv,
            v->rangered, v->vstransform, v->overlap, v->resync_marker,
            v->dquant, v->quantizer_mode, avctx->max_b_frames);
     return 0;
@@ -415,7 +415,7 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb)
            "LoopFilter=%i, ChromaFormat=%i, Pulldown=%i, Interlace: %i\n"
            "TFCTRflag=%i, FINTERPflag=%i\n",
            v->level, v->frmrtq_postproc, v->bitrtq_postproc,
-           v->s.loop_filter, v->chromaformat, v->broadcast, v->interlace,
+           v->loop_filter, v->chromaformat, v->broadcast, v->interlace,
            v->tfcntrflag, v->finterpflag);
 
     v->psf = get_bits1(gb);
@@ -501,9 +501,9 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
     v->closed_entry   = get_bits1(gb);
     v->panscanflag    = get_bits1(gb);
     v->refdist_flag   = get_bits1(gb);
-    v->s.loop_filter  = get_bits1(gb);
+    v->loop_filter    = get_bits1(gb);
     if (v->s.avctx->skip_loop_filter >= AVDISCARD_ALL)
-        v->s.loop_filter = 0;
+        v->loop_filter = 0;
     v->fastuvmc       = get_bits1(gb);
     v->extended_mv    = get_bits1(gb);
     v->dquant         = get_bits(gb, 2);
@@ -544,7 +544,7 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
            "BrokenLink=%i, ClosedEntry=%i, PanscanFlag=%i\n"
            "RefDist=%i, Postproc=%i, FastUVMC=%i, ExtMV=%i\n"
            "DQuant=%i, VSTransform=%i, Overlap=%i, Qmode=%i\n",
-           v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->s.loop_filter,
+           v->broken_link, v->closed_entry, v->panscanflag, v->refdist_flag, v->loop_filter,
            v->fastuvmc, v->extended_mv, v->dquant, v->vstransform, v->overlap, v->quantizer_mode);
 
     return 0;
diff --git a/libavcodec/vc1.h b/libavcodec/vc1.h
index 5eee646e31..f2a52c19c1 100644
--- a/libavcodec/vc1.h
+++ b/libavcodec/vc1.h
@@ -220,6 +220,7 @@ typedef struct VC1Context{
     int profile;          ///< 2 bits, Profile
     int frmrtq_postproc;  ///< 3 bits,
     int bitrtq_postproc;  ///< 5 bits, quantized framerate-based postprocessing strength
+    int loop_filter;
     int max_coded_width, max_coded_height;
     int fastuvmc;         ///< Rounding of qpel vector to hpel ? (not in Simple)
     int extended_mv;      ///< Ext MV in P/B (not in Simple)
diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c
index 165d875458..4fa03f287a 100644
--- a/libavcodec/vc1_block.c
+++ b/libavcodec/vc1_block.c
@@ -2595,7 +2595,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
                 vc1_put_blocks_clamped(v, 0);
             }
 
-            if (v->s.loop_filter)
+            if (v->loop_filter)
                 ff_vc1_i_loop_filter(v);
 
             if (get_bits_left(&v->gb) < 0) {
@@ -2733,7 +2733,7 @@ static int vc1_decode_i_blocks_adv(VC1Context *v)
             if (v->overlap && (v->pq >= 9 || v->condover != CONDOVER_NONE))
                 ff_vc1_i_overlap_filter(v);
             vc1_put_blocks_clamped(v, 1);
-            if (v->s.loop_filter)
+            if (v->loop_filter)
                 ff_vc1_i_loop_filter(v);
 
             if (get_bits_left(gb) < 0) {
@@ -2787,7 +2787,7 @@ static void vc1_decode_p_blocks(VC1Context *v)
         break;
     }
 
-    apply_loop_filter   = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);
+    apply_loop_filter   = v->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);
     s->first_slice_line = 1;
     memset(v->cbp_base, 0, sizeof(v->cbp_base[0]) * 3 * s->mb_stride);
     for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {
@@ -2889,15 +2889,15 @@ static void vc1_decode_b_blocks(VC1Context *v)
 
             if (v->fcm == ILACE_FIELD) {
                 vc1_decode_b_mb_intfi(v);
-                if (v->s.loop_filter)
+                if (v->loop_filter)
                     ff_vc1_b_intfi_loop_filter(v);
             } else if (v->fcm == ILACE_FRAME) {
                 vc1_decode_b_mb_intfr(v);
-                if (v->s.loop_filter)
+                if (v->loop_filter)
                     ff_vc1_p_intfr_loop_filter(v);
             } else {
                 vc1_decode_b_mb(v);
-                if (v->s.loop_filter)
+                if (v->loop_filter)
                     ff_vc1_i_loop_filter(v);
             }
             if (get_bits_left(&v->gb) < 0 || get_bits_count(&v->gb) < 0) {
@@ -2951,7 +2951,7 @@ void ff_vc1_decode_blocks(VC1Context *v)
         ff_intrax8_decode_picture(&v->x8, v->s.cur_pic.ptr,
                                   &v->gb, &v->s.mb_x, &v->s.mb_y,
                                   2 * v->pq + v->halfpq, v->pq * !v->pquantizer,
-                                  v->s.loop_filter, v->s.low_delay);
+                                  v->loop_filter, v->s.low_delay);
 
         ff_er_add_slice(&v->s.er, 0, 0,
                         (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1,
diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c
index af6973ea6a..a5fd8156f4 100644
--- a/libavcodec/vdpau_vc1.c
+++ b/libavcodec/vdpau_vc1.c
@@ -83,7 +83,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx,
     info->extended_dmv      = v->extended_dmv;
     info->overlap           = v->overlap;
     info->vstransform       = v->vstransform;
-    info->loopfilter        = v->s.loop_filter;
+    info->loopfilter        = v->loop_filter;
     info->fastuvmc          = v->fastuvmc;
     info->range_mapy_flag   = v->range_mapy_flag;
     info->range_mapy        = v->range_mapy;
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index a5c47b722e..082ebf7a84 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -178,7 +178,7 @@ static int decode_ext_header(WMV2DecContext *w)
     fps                 = get_bits(&gb, 5);
     w->ms.bit_rate      = get_bits(&gb, 11) * 1024;
     w->mspel_bit        = get_bits1(&gb);
-    h->c.loop_filter    = get_bits1(&gb);
+    h->loop_filter      = get_bits1(&gb);
     w->abt_flag         = get_bits1(&gb);
     w->j_type_bit       = get_bits1(&gb);
     w->top_left_mv_flag = get_bits1(&gb);
@@ -196,7 +196,7 @@ static int decode_ext_header(WMV2DecContext *w)
                "tl_mv_flag:%d, mbrl_bit:%d, code:%d, loop_filter:%d, "
                "slices:%d\n",
                fps, w->ms.bit_rate, w->mspel_bit, w->abt_flag, w->j_type_bit,
-               w->top_left_mv_flag, w->per_mb_rl_bit, code, h->c.loop_filter,
+               w->top_left_mv_flag, w->per_mb_rl_bit, code, h->loop_filter,
                code);
     return 0;
 }
@@ -333,7 +333,7 @@ int ff_wmv2_decode_secondary_picture_header(H263DecContext *const h)
         ff_intrax8_decode_picture(&w->x8, h->c.cur_pic.ptr,
                                   &h->gb, &h->c.mb_x, &h->c.mb_y,
                                   2 * h->c.qscale, (h->c.qscale - 1) | 1,
-                                  h->c.loop_filter, h->c.low_delay);
+                                  h->loop_filter, h->c.low_delay);
 
         ff_er_add_slice(&h->c.er, 0, 0,
                         (h->c.mb_x >> 1) - 1, (h->c.mb_y >> 1) - 1,
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 5c78712e4e..b6811fde0e 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -59,7 +59,7 @@ static int encode_ext_header(WMV2EncContext *w)
     put_bits(&pb, 11, FFMIN(w->msmpeg4.m.bit_rate / 1024, 2047));
 
     put_bits(&pb, 1, w->mspel_bit        = 1);
-    put_bits(&pb, 1, s->c.loop_filter);
+    put_bits(&pb, 1, s->loop_filter);
     put_bits(&pb, 1, w->abt_flag         = 1);
     put_bits(&pb, 1, w->j_type_bit       = 1);
     put_bits(&pb, 1, w->top_left_mv_flag = 0);
-- 
ffmpeg-codebot

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2025-06-23 13:46 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 13:36 [FFmpeg-devel] [PATCH 00/48] H263DecContext ffmpegagent
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 01/48] avcodec/ituh263dec: Use correct logcontext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 02/48] avcodec/rl: Avoid branch in index lookup Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 03/48] avcodec/ituh263enc: Simplify creating LUT Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 04/48] avcodec/ituh263dec: Only initialize ff_h263_rl_inter when needed Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 05/48] avcodec/mpegvideoenc: Allocate blocks as part of MPVEncContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 06/48] avcodec/mpegvideo: Add MPVContext typedef Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 07/48] avcodec/mpegvideo_dec: Factor debugging dct coefficients out Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 08/48] avcodec/mpegvideo_dec: Reindent after the previous commit Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 09/48] avcodec/mpeg_er: Don't use MpegEncContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 10/48] avcodec/mpegvideodec: Remove size expectation from ff_mpv_reconstruct_mb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 11/48] avcodec/h261dec: Stop using MpegEncContext.gb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 12/48] avcodec/h261dec: Don't use MpegEncContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 13/48] avcodec/mpeg12dec: Put GetBitContext on the stack where advantageous Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 14/48] avcodec/mpeg12dec: Remove unused function parameter Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 15/48] avcodec/rv34: Don't use MpegEncContext.gb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 16/48] avcodec/rv34: Don't use MpegEncContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 17/48] avcodec/intrax8: Don't pretend to need more than one int16_t[64] Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 18/48] avcodec/vc1: Stop using MpegEncContext.gb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 19/48] avcodec/vc1: Don't use MpegEncContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 20/48] avcodec/mpeg12dec: Deduplicate variables Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 21/48] avcodec/mpegvideo: Move flipflop_rounding to {MSMPEG4Dec, MPVEnc}Context Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 22/48] avcodec/mpegvideo: Move unrestricted_mv to MotionEstContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 23/48] avcodec/mpeg4videodec: Avoid unnecessary indirections Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 24/48] avcodec/{h263, mpeg4video}dec: Pass MPVContext*, not Mpeg4DecContext* Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 25/48] avcodec/mpegvideo: Move dct_precision to Mpeg4DecContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 26/48] avcodec/h263dec: Add H263DecContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 27/48] avcodec/h263dec: Remove redundant block parameter from decode_mb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 28/48] avcodec/h263dec: Don't use MpegEncContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 29/48] avcodec/h263dec: Stop using MpegEncContext.gb Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 30/48] avcodec/mpeg12dec: Add Mpeg12SliceContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 31/48] avcodec/mpegvideo: Add missing headers Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 32/48] avcodec/mpeg12dec: Move MpegEncContext.gb to Mpeg12SliceContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 33/48] avcodec/mpeg12dec: Don't use MPVContext.block Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 34/48] avcodec/mpegvideo: Move fields only used by H.263 decoders to H263DecCtx Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 35/48] avcodec/mpegvideo: Move mb_num_left to {H263, RV34}DecContext Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 36/48] avcodec/mpeg12dec: Put mb_skip_run on the stack Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 37/48] avcodec/mpegvideo: Move mb_skip_run to {RV34Dec, MPVEnc}Context Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 38/48] avcodec/mpegvideo: Move SLICE_* defs to h263dec.h, h261dec.c Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 39/48] avcodec/msmpeg4dec: Move ff_msmpeg4_decode_init() down Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 40/48] avcodec/h263dec: Use function ptr for decode_picture_header Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 41/48] avcodec/ituh263enc: Inline value of h263_flv Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 42/48] avcodec/flvdec: Binarize h263_flv Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 43/48] avcodec/mpegvideo: Move fields to {H263Dec, MPVEnc}Context when possible Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 44/48] avcodec/mpeg_er: Allow to skip setting partitioned_frame, p[pb]_time Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 45/48] avcodec/mpegvideo: Move partitioned_frame to {H263Dec, MPVEnc}Context Andreas Rheinhardt
2025-06-23 13:36 ` Andreas Rheinhardt [this message]
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 47/48] avcodec/rv34: Don't report progress unnecessarily Andreas Rheinhardt
2025-06-23 13:36 ` [FFmpeg-devel] [PATCH 48/48] avcodec/rv34: Fix spelling mistake Andreas Rheinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69b79342672c9c8f92a97d088e513101102d100e.1750685810.git.ffmpegagent@gmail.com \
    --to=ffmpegagent-at-gmail.com@ffmpeg.org \
    --cc=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git