diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2016-06-25 02:25:44 +0200 |
commit | ad56f2c46ac6deec86870ec10f2a11a644df07d4 (patch) | |
tree | 89f2d90c5586560911e67c872b530c77f151168d /video/mp_image.h | |
parent | 0536841647ef7931bffb4386d8ffbb5b2b568e8a (diff) | |
parent | 393bb2a565dc1e27812e1dd20747814892f80da2 (diff) | |
download | mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.bz2 mpv-ad56f2c46ac6deec86870ec10f2a11a644df07d4.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'video/mp_image.h')
-rw-r--r-- | video/mp_image.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/video/mp_image.h b/video/mp_image.h index c00c78a459..18d25968c0 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -42,11 +42,12 @@ struct mp_image_params { uint64_t hw_subfmt; // underlying format for some hwaccel pixfmts // (will use the HW API's format identifiers) int w, h; // image dimensions - int p_w, p_h; // define pixel aspect ratio (never 0/0) + int p_w, p_h; // define pixel aspect ratio (undefined: 0/0) enum mp_csp colorspace; enum mp_csp_levels colorlevels; enum mp_csp_prim primaries; enum mp_csp_trc gamma; + float peak; // 0 = auto/unknown enum mp_chroma_location chroma_location; // The image should be rotated clockwise (0-359 degrees). int rotate; @@ -100,6 +101,8 @@ typedef struct mp_image { // All mp_* functions manage this automatically; do not mess with it. // (See also AVFrame.buf.) struct AVBufferRef *bufs[MP_MAX_PLANES]; + // Points to AVHWFramesContext* (same as AVFrame.hw_frames_ctx) + struct AVBufferRef *hwctx; } mp_image_t; int mp_chroma_div_up(int size, int shift); @@ -152,11 +155,8 @@ void mp_image_set_attributes(struct mp_image *image, const struct mp_image_params *params); struct AVFrame; -void mp_image_copy_fields_from_av_frame(struct mp_image *dst, - struct AVFrame *src); -void mp_image_copy_fields_to_av_frame(struct AVFrame *dst, - struct mp_image *src); struct mp_image *mp_image_from_av_frame(struct AVFrame *av_frame); +struct AVFrame *mp_image_to_av_frame(struct mp_image *img); struct AVFrame *mp_image_to_av_frame_and_unref(struct mp_image *img); void memcpy_pic(void *dst, const void *src, int bytesPerLine, int height, |