Commit Graph

5 Commits

Author SHA1 Message Date
Mark Thompson d984b29b21 vf_hwmap: Add missing error code
Fixes CID 1412854.

(cherry picked from commit 5635c80bf5)
2017-06-18 17:05:13 +01:00
Mark Thompson d81be0a60a vf_hwmap: Add reverse mapping for hardware frames
This is something of a hack.  It allocates a new hwframe context for
the target format, then maps it back to the source link and overwrites
the input link hw_frames_ctx so that the previous filter will receive
the frames we want from ff_get_video_buffer().  It may fail if
the previous filter imposes any additional constraints on the frames
it wants to use as output.

(cherry picked from commit 81a4cb8e58)
2017-06-14 22:27:34 +01:00
Mark Thompson b2ef1f42ba vf_hwmap: Add device derivation
Also refactor a little and improve error messages to make failure
cases easier to understand.

(cherry picked from commit 38cb05f1c8)
2017-06-14 22:27:34 +01:00
Clément Bœsch 6234fd2fa0 Merge commit '124e26971e69bb25f38c6c7cb3fa20c77cf10966'
* commit '124e26971e69bb25f38c6c7cb3fa20c77cf10966':
  lavfi: Hardware map filter

Merged-by: Clément Bœsch <cboesch@gopro.com>
2017-03-30 10:51:32 +02:00
Mark Thompson 124e26971e lavfi: Hardware map filter
Takes a frame associated with a hardware context as input and maps it
to something else (another hardware frame or normal memory) for other
processing.  If the frame to map was originally in the target format
(but mapped to something else), the original frame is output.

Also supports mapping backwards, where only the output has a hardware
context.  The link immediately before will be supplied with mapped
hardware frames which it can write directly into, and this filter
then unmaps them back to the actual hardware frames.
2016-11-03 23:49:05 +00:00