This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 90191e8ab96b4b01575e0521025699d529f7382b
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Jun 25 09:10:26 2025 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Fri Jan 2 18:39:48 2026 +0100

    avcodec/wmv2: Remove WMV2Context
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/wmv2.h    |  5 -----
 libavcodec/wmv2dec.c | 12 +++++-------
 libavcodec/wmv2enc.c |  3 +--
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/libavcodec/wmv2.h b/libavcodec/wmv2.h
index e97ee658ba..aef3126867 100644
--- a/libavcodec/wmv2.h
+++ b/libavcodec/wmv2.h
@@ -30,11 +30,6 @@
 #define SKIP_TYPE_ROW  2
 #define SKIP_TYPE_COL  3
 
-
-typedef struct WMV2Context {
-    int hshift;
-} WMV2Context;
-
 static av_always_inline int wmv2_get_cbp_table_index(int qscale, int cbp_index)
 {
     static const uint8_t map[3][3] = {
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 756ab9a44d..22102ef6df 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -40,7 +40,6 @@
 
 typedef struct WMV2DecContext {
     MSMP4DecContext ms;
-    WMV2Context common;
     IntraX8Context x8;
 
     qpel_mc_func put_mspel_pixels_tab[8];
@@ -56,6 +55,7 @@ typedef struct WMV2DecContext {
     int cbp_table_index;
     int top_left_mv_flag;
     int per_mb_rl_bit;
+    int hshift;
 
     DECLARE_ALIGNED(32, int16_t, abt_block2)[6][64];
 } WMV2DecContext;
@@ -192,7 +192,7 @@ void ff_mspel_motion(MPVContext *const s, uint8_t *dest_y,
     int emu = 0;
 
     dxy   = ((motion_y & 1) << 1) | (motion_x & 1);
-    dxy   = 2 * dxy + w->common.hshift;
+    dxy   = 2 * dxy + w->hshift;
     src_x = s->mb_x * 16 + (motion_x >> 1);
     src_y = s->mb_y * 16 + (motion_y >> 1);
 
@@ -564,9 +564,9 @@ static inline void wmv2_decode_motion(WMV2DecContext *w, 
int *mx_ptr, int *my_pt
     ff_msmpeg4_decode_motion(&w->ms, mx_ptr, my_ptr);
 
     if ((((*mx_ptr) | (*my_ptr)) & 1) && h->c.mspel)
-        w->common.hshift = get_bits1(&h->gb);
+        w->hshift = get_bits1(&h->gb);
     else
-        w->common.hshift = 0;
+        w->hshift = 0;
 }
 
 static int16_t *wmv2_pred_motion(WMV2DecContext *w, int *px, int *py)
@@ -678,7 +678,7 @@ static int wmv2_decode_mb(H263DecContext *const h)
             h->c.mv[0][0][0] = 0;
             h->c.mv[0][0][1] = 0;
             h->c.mb_skipped  = 1;
-            w->common.hshift      = 0;
+            w->hshift        = 0;
             return 0;
         }
         if (get_bits_left(&h->gb) <= 0)
@@ -784,8 +784,6 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
 
     wmv2_mspel_init(w);
 
-    s->private_ctx = &w->common;
-
     if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
         return ret;
 
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 5b3e2ae116..4082b58179 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -35,7 +35,6 @@
 
 typedef struct WMV2EncContext {
     MSMPEG4EncContext msmpeg4;
-    WMV2Context common;
     int j_type_bit;
     int j_type;
     int abt_flag;
@@ -228,7 +227,7 @@ static av_cold int wmv2_encode_init(AVCodecContext *avctx)
 
     w->msmpeg4.m.encode_picture_header = wmv2_encode_picture_header;
     s->encode_mb                       = wmv2_encode_mb;
-    s->c.private_ctx = &w->common;
+
     ret = ff_mpv_encode_init(avctx);
     if (ret < 0)
         return ret;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to