ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sun Jun 15 23:56:50 2025 +0200| [25e4baeed4886946cfa9e17fb579538a347cca57] | committer: Andreas Rheinhardt
avcodec/rv34: Don't use MpegEncContext.block These decoders only need a single 4x4 block; put it in RV34DecContext. This is in preparation for removing MpegEncContext.block. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25e4baeed4886946cfa9e17fb579538a347cca57 --- libavcodec/rv34.c | 7 +++---- libavcodec/rv34.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 73fd16b3e2..9f8a0f12b8 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1029,8 +1029,7 @@ static inline void rv34_process_block(RV34DecContext *r, uint8_t *pdst, int stride, int fc, int sc, int q_dc, int q_ac) { - MpegEncContext *s = &r->s; - int16_t *ptr = s->block[0]; + int16_t *const ptr = r->block; int has_ac = rv34_decode_block(ptr, &r->gb, r->cur_vlcs, fc, sc, q_dc, q_ac, q_ac); if(has_ac){ @@ -1049,7 +1048,7 @@ static void rv34_output_i16x16(RV34DecContext *r, int8_t *intra_types, int cbp) int q_dc = rv34_qscale_tab[ r->luma_dc_quant_i[s->qscale] ], q_ac = rv34_qscale_tab[s->qscale]; uint8_t *dst = s->dest[0]; - int16_t *ptr = s->block[0]; + int16_t *const ptr = r->block; int i, j, itype, has_ac; memset(block16, 0, 16 * sizeof(*block16)); @@ -1215,7 +1214,7 @@ static int rv34_decode_inter_macroblock(RV34DecContext *r, int8_t *intra_types) MpegEncContext *s = &r->s; GetBitContext *const gb = &r->gb; uint8_t *dst = s->dest[0]; - int16_t *ptr = s->block[0]; + int16_t *const ptr = r->block; int mb_pos = s->mb_x + s->mb_y * s->mb_stride; int cbp, cbp2; int q_dc, q_ac, has_ac; diff --git a/libavcodec/rv34.h b/libavcodec/rv34.h index 485a034f9e..5bed46ea4f 100644 --- a/libavcodec/rv34.h +++ b/libavcodec/rv34.h @@ -119,6 +119,7 @@ typedef struct RV34DecContext{ uint8_t *cbp_chroma; ///< CBP values for chroma subblocks uint16_t *deblock_coefs; ///< deblock coefficients for each macroblock + DECLARE_ALIGNED_16(int16_t, block)[16]; /** 8x8 block available flags (for MV prediction) */ DECLARE_ALIGNED(8, uint32_t, avail_cache)[3*4]; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".