[vlc-devel] [PATCH v2 00/24] picture::p_next usage cleaning

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 18 16:45:06 CEST 2020


In v1 I missed some differences in the code when p_next was set to NULL and
some where it wasn't. That makes a different as in some cases you push/pop a
whole picture chain, and others just a picture.

Changes sinces v1:
- added picture_chain_pop_chain() which removes a whole chain from the picture
  chain. Now both the original and popped picture chain have pictures linked.
  /!\ DANGER /!\
- rename picture_pop_chain() to picture_get_and_reset_chain() to better signify
  what it does.
- picture_chain_append_chain() no longer returns a value as it's never used and
  the tail returned wasn't actually the proper tail.
- picture_chain_append_empty() is renamed picture_chain_append() as it's the
  main usage of the picture appending.
- replace picture_chain_empty() with picture_has_chained_pics() as it's only
  used to test if pictures have a chain or not.
- added some more comments in the code.
- cleaned more MMAL deinterlace and fps code.

Steve Lhomme (24):
  picture: add helpers for picture chaining
  codec: use picture_has_chained_pics instead of access p_next
  mosaic: simplify the picture chain tail handling
  mosaic: use the picture_chain API
  filter_chain: reorder code to make it more obvious we're popping a
    picture
  filter_chain: use the picture_chain API
  picture_fifo: rework the flush loop on picture
  picture_fifo: simplify the picture fifo tail handling
  picture_fifo: use the picture_chain API
  deinterlace: only set the next on the previous picture if there's a
    next
  deinterlace: use the picture_chain API
  transcode: simplify the picture queue tail handling
  transcode: use the picture_chain API
  picture_pool: use the picture_chain API
  video_output: use the picture_chain API
  snapshot: use the picture_chain API
  fps: use a fonction to empty the chain of pictures
  fps: use the picture_chain API
  vdpau: use the picture_chain API
  vaapi: use the picture_chain API
  mmal: use the picture_chain API for the FIFO
  mmal: deinterlace: remove unneeded indentation
  mmal: deinterlace: use the picture_chain API
  picture_chain: modify the append to take care of the chain init

 include/vlc_codec.h                       |   2 +-
 include/vlc_picture.h                     | 103 ++++++++++++++++++++++
 modules/hw/mmal/converter.c               |  16 +---
 modules/hw/mmal/deinterlace.c             |  57 ++++++------
 modules/hw/vaapi/filters.c                |   2 +-
 modules/hw/vdpau/deinterlace.c            |   4 +-
 modules/spu/mosaic.c                      |  11 ++-
 modules/spu/mosaic.h                      |   2 +-
 modules/stream_out/mosaic_bridge.c        |  13 ++-
 modules/stream_out/transcode/transcode.h  |   2 +-
 modules/stream_out/transcode/video.c      |  17 ++--
 modules/video_filter/deinterlace/common.c |   2 +-
 modules/video_filter/fps.c                |  22 ++---
 src/misc/filter_chain.c                   |  18 ++--
 src/misc/picture_fifo.c                   |  27 ++----
 src/misc/picture_pool.c                   |   2 +-
 src/video_output/snapshot.c               |  17 ++--
 src/video_output/video_output.c           |   2 +-
 18 files changed, 189 insertions(+), 130 deletions(-)

-- 
2.26.2



More information about the vlc-devel mailing list