[vlc-commits] [Git][videolan/vlc][master] 2 commits: codec: aom: fix luma stride alignment

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Jan 18 15:16:15 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
72928546 by Tristan Matthews at 2023-01-18T14:41:14+00:00
codec: aom: fix luma stride alignment

Suggested by Steve Lhomme

Fixes #27718

- - - - -
0e8ab5a4 by Tristan Matthews at 2023-01-18T14:41:14+00:00
codec: aom: only check kf flag if needed

- - - - -


1 changed file:

- modules/codec/aom.c


Changes:

=====================================
modules/codec/aom.c
=====================================
@@ -606,7 +606,7 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
         AOM_IMG_FMT_I42016 : AOM_IMG_FMT_I420;
 
     /* Create and initialize the aom_image */
-    if (!aom_img_wrap(&img, img_fmt, i_w, i_h, 32, p_pict->p[0].p_pixels))
+    if (!aom_img_wrap(&img, img_fmt, i_w, i_h, p_pict->p[0].i_pitch, p_pict->p[0].p_pixels))
     {
         AOM_ERR(p_enc, ctx, "Failed to wrap image");
         return NULL;
@@ -632,7 +632,6 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
     {
         if (pkt->kind == AOM_CODEC_CX_FRAME_PKT)
         {
-            int keyframe = pkt->data.frame.flags & AOM_FRAME_IS_KEY;
             block_t *p_block = block_Alloc(pkt->data.frame.sz);
             if (unlikely(p_block == NULL)) {
                 block_ChainRelease(p_out);
@@ -643,8 +642,10 @@ static block_t *Encode(encoder_t *p_enc, picture_t *p_pict)
             /* FIXME: do this in-place */
             memcpy(p_block->p_buffer, pkt->data.frame.buf, pkt->data.frame.sz);
             p_block->i_dts = p_block->i_pts = VLC_TICK_FROM_US(pkt->data.frame.pts);
-            if (keyframe)
+
+            if (pkt->data.frame.flags & AOM_FRAME_IS_KEY)
                 p_block->i_flags |= BLOCK_FLAG_TYPE_I;
+
             block_ChainAppend(&p_out, p_block);
         }
     }



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9128a2b88443ae07642b4a2ae8c316a1eda79514...0e8ab5a4129dd012010188a0f75fe3480b549c09

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9128a2b88443ae07642b4a2ae8c316a1eda79514...0e8ab5a4129dd012010188a0f75fe3480b549c09
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list