logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0003-libavcodec-Use-if-to-prevent-some-unintended-depende.patch (1903B)


  1. From 423031475f19346601a913dd24ae5ace3d0d9739 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Tue, 7 Sep 2021 01:44:53 -0700
  4. Subject: [PATCH] libavcodec: Use #if to prevent some unintended dependencies
  5. ---
  6. libavcodec/mpegvideo_motion.c | 10 ++++++----
  7. 1 file changed, 6 insertions(+), 4 deletions(-)
  8. diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c
  9. index 8922f5b1a5..40c364a5cc 100644
  10. --- a/libavcodec/mpegvideo_motion.c
  11. +++ b/libavcodec/mpegvideo_motion.c
  12. @@ -207,10 +207,11 @@ void mpeg_motion_internal(MpegEncContext *s,
  13. pix_op[s->chroma_x_shift][uvdxy]
  14. (dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift);
  15. }
  16. - if (!is_mpeg12 && (CONFIG_H261_ENCODER || CONFIG_H261_DECODER) &&
  17. - s->out_format == FMT_H261) {
  18. +#if CONFIG_H261_ENCODER || CONFIG_H261_DECODER
  19. + if (!is_mpeg12 && s->out_format == FMT_H261) {
  20. ff_h261_loop_filter(s);
  21. }
  22. +#endif
  23. }
  24. /* apply one mpeg motion vector to the three components */
  25. static void mpeg_motion(MpegEncContext *s,
  26. @@ -702,11 +703,12 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s,
  27. 0, 0, 0,
  28. ref_picture, pix_op, qpix_op,
  29. s->mv[dir][0][0], s->mv[dir][0][1], 16);
  30. - } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&
  31. - s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
  32. +#if CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER
  33. + } else if (!is_mpeg12 && s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
  34. ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
  35. ref_picture, pix_op,
  36. s->mv[dir][0][0], s->mv[dir][0][1], 16);
  37. +#endif
  38. } else {
  39. mpeg_motion(s, dest_y, dest_cb, dest_cr, 0,
  40. ref_picture, pix_op,
  41. --
  42. 2.37.3