summaryrefslogtreecommitdiff
path: root/libavutil/frame.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-05-08 13:08:02 -0300
committerJames Almer <jamrial@gmail.com>2017-05-08 13:08:02 -0300
commita47bd5d77e3f1dd8bb3d4ba0955bd7b1323c7d83 (patch)
treec59282acb59cac554c2cad5b5a42ceb8fd2a0007 /libavutil/frame.h
parent8ef2c791c99e7c103782e889e2bca2f6e13a07be (diff)
parent52627248e49e58eb4b78e4fcda90a64f4c476ea3 (diff)
Merge commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3'
* commit '52627248e49e58eb4b78e4fcda90a64f4c476ea3': frame: add a cropping rectangle to AVFrame Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/frame.h')
-rw-r--r--libavutil/frame.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 4d8c1bed4f..26261d7e40 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -25,6 +25,7 @@
#ifndef AVUTIL_FRAME_H
#define AVUTIL_FRAME_H
+#include <stddef.h>
#include <stdint.h>
#include "avutil.h"
@@ -240,9 +241,18 @@ typedef struct AVFrame {
uint8_t **extended_data;
/**
- * width and height of the video frame
+ * @name Video dimensions
+ * Video frames only. The coded dimensions (in pixels) of the video frame,
+ * i.e. the size of the rectangle that contains some well-defined values.
+ *
+ * @note The part of the frame intended for display/presentation is further
+ * restricted by the @ref cropping "Cropping rectangle".
+ * @{
*/
int width, height;
+ /**
+ * @}
+ */
/**
* number of audio samples (per channel) described by this frame
@@ -530,6 +540,22 @@ typedef struct AVFrame {
* purpose.
*/
AVBufferRef *opaque_ref;
+
+ /**
+ * @anchor cropping
+ * @name Cropping
+ * Video frames only. The number of pixels to discard from the the
+ * top/bottom/left/right border of the frame to obtain the sub-rectangle of
+ * the frame intended for presentation.
+ * @{
+ */
+ size_t crop_top;
+ size_t crop_bottom;
+ size_t crop_left;
+ size_t crop_right;
+ /**
+ * @}
+ */
} AVFrame;
/**