aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/frame.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-12-18 12:30:27 +0100
committerAnton Khirnov <anton@khirnov.net>2017-01-12 16:22:44 +0100
commit52627248e49e58eb4b78e4fcda90a64f4c476ea3 (patch)
treebc33212ab870c1c8419609fe909833bbead7a817 /libavutil/frame.h
parentb68e353136db6f963212c457281d9716516cdc59 (diff)
downloadffmpeg-52627248e49e58eb4b78e4fcda90a64f4c476ea3.tar.gz
frame: add a cropping rectangle to AVFrame
Extend the width/height doxy to clarify that it should store coded values.
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 4052199fd3..c718f7bd62 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"
@@ -180,9 +181,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
@@ -369,6 +379,22 @@ typedef struct AVFrame {
* AVHWFramesContext describing the frame.
*/
AVBufferRef *hw_frames_ctx;
+
+ /**
+ * @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;
/**