World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
frame.h
См. документацию.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
25 #ifndef AVUTIL_FRAME_H
26 #define AVUTIL_FRAME_H
27 
28 #include <stddef.h>
29 #include <stdint.h>
30 
31 #include "avutil.h"
32 #include "buffer.h"
33 #include "dict.h"
34 #include "rational.h"
35 #include "samplefmt.h"
36 #include "pixfmt.h"
37 #include "version.h"
38 
39 
125 
131 
137 
144 
145 #if FF_API_FRAME_QP
146 
153 
160 #endif
161 
169 
176 
182 };
183 
192 };
193 
194 
201 typedef struct AVFrameSideData {
204  int size;
208 
220 typedef struct AVRegionOfInterest {
235  int top;
236  int bottom;
237  int left;
238  int right;
264 
295 typedef struct AVFrame {
296 #define AV_NUM_DATA_POINTERS 8
297 
309  uint8_t *data[AV_NUM_DATA_POINTERS];
310 
326  int linesize[AV_NUM_DATA_POINTERS];
327 
343 
353  int width, height;
362 
368  int format;
369 
374 
379 
384 
389 
390 #if FF_API_PKT_PTS
391 
395  attribute_deprecated
397 #endif
398 
405 
414 
418  int quality;
419 
423  void *opaque;
424 
425 #if FF_API_ERROR_FRAME
426 
429  attribute_deprecated
430  uint64_t error[AV_NUM_DATA_POINTERS];
431 #endif
432 
438 
443 
448 
453 
463 
468 
473 
486  AVBufferRef *buf[AV_NUM_DATA_POINTERS];
487 
505 
508 
520 #define AV_FRAME_FLAG_CORRUPT (1 << 0)
521 
524 #define AV_FRAME_FLAG_DISCARD (1 << 2)
525 
532  int flags;
533 
540 
542 
544 
551 
553 
560 
567 
575 
582 
591 #define FF_DECODE_ERROR_INVALID_BITSTREAM 1
592 #define FF_DECODE_ERROR_MISSING_REFERENCE 2
593 #define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
594 #define FF_DECODE_ERROR_DECODE_SLICES 8
595 
601  int channels;
602 
610  int pkt_size;
611 
612 #if FF_API_FRAME_QP
613 
616  attribute_deprecated
621  attribute_deprecated
622  int qstride;
623 
624  attribute_deprecated
626 
627  attribute_deprecated
629 #endif
630 
635 
646 
655  size_t crop_top;
656  size_t crop_bottom;
657  size_t crop_left;
658  size_t crop_right;
675 } AVFrame;
676 
677 #if FF_API_FRAME_GET_SET
678 
682 attribute_deprecated
684 attribute_deprecated
686 attribute_deprecated
688 attribute_deprecated
690 attribute_deprecated
691 int64_t av_frame_get_pkt_pos (const AVFrame *frame);
692 attribute_deprecated
693 void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
694 attribute_deprecated
696 attribute_deprecated
698 attribute_deprecated
699 int av_frame_get_channels (const AVFrame *frame);
700 attribute_deprecated
701 void av_frame_set_channels (AVFrame *frame, int val);
702 attribute_deprecated
703 int av_frame_get_sample_rate (const AVFrame *frame);
704 attribute_deprecated
705 void av_frame_set_sample_rate (AVFrame *frame, int val);
706 attribute_deprecated
708 attribute_deprecated
710 attribute_deprecated
711 int av_frame_get_decode_error_flags (const AVFrame *frame);
712 attribute_deprecated
713 void av_frame_set_decode_error_flags (AVFrame *frame, int val);
714 attribute_deprecated
715 int av_frame_get_pkt_size(const AVFrame *frame);
716 attribute_deprecated
717 void av_frame_set_pkt_size(AVFrame *frame, int val);
718 #if FF_API_FRAME_QP
719 attribute_deprecated
721 attribute_deprecated
723 #endif
724 attribute_deprecated
725 enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);
726 attribute_deprecated
728 attribute_deprecated
730 attribute_deprecated
732 #endif
733 
738 const char *av_get_colorspace_name(enum AVColorSpace val);
739 
750 AVFrame *av_frame_alloc(void);
751 
759 void av_frame_free(AVFrame **frame);
760 
776 int av_frame_ref(AVFrame *dst, const AVFrame *src);
777 
786 
790 void av_frame_unref(AVFrame *frame);
791 
800 
824 int av_frame_get_buffer(AVFrame *frame, int align);
825 
838 int av_frame_is_writable(AVFrame *frame);
839 
851 int av_frame_make_writable(AVFrame *frame);
852 
864 int av_frame_copy(AVFrame *dst, const AVFrame *src);
865 
875 
884 AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
885 
897  int size);
898 
913  AVBufferRef *buf);
914 
921 
927 
928 
932 enum {
942 };
943 
960 int av_frame_apply_cropping(AVFrame *frame, int flags);
961 
966 
971 #endif /* AVUTIL_FRAME_H */
AVFrame::pict_type
enum AVPictureType pict_type
Definition: frame.h:378
av_frame_set_color_range
attribute_deprecated void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val)
av_frame_set_sample_rate
attribute_deprecated void av_frame_set_sample_rate(AVFrame *frame, int val)
AV_AFD_14_9
@ AV_AFD_14_9
Definition: frame.h:188
AVFrame::color_trc
enum AVColorTransferCharacteristic color_trc
Definition: frame.h:543
av_frame_get_sample_rate
attribute_deprecated int av_frame_get_sample_rate(const AVFrame *frame)
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Definition: pixfmt.h:467
AVFrame::sample_aspect_ratio
AVRational sample_aspect_ratio
Definition: frame.h:383
AV_FRAME_DATA_QP_TABLE_PROPERTIES
@ AV_FRAME_DATA_QP_TABLE_PROPERTIES
Definition: frame.h:152
av_frame_get_buffer
int av_frame_get_buffer(AVFrame *frame, int align)
AVFrame::channels
int channels
Definition: frame.h:601
av_frame_get_pkt_size
attribute_deprecated int av_frame_get_pkt_size(const AVFrame *frame)
av_frame_get_side_data
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
AV_FRAME_DATA_A53_CC
@ AV_FRAME_DATA_A53_CC
Definition: frame.h:58
AVFrame::crop_left
size_t crop_left
Definition: frame.h:657
AVFrame::color_primaries
enum AVColorPrimaries color_primaries
Definition: frame.h:541
AVFrame::reordered_opaque
int64_t reordered_opaque
Definition: frame.h:462
AVPictureType
AVPictureType
Definition: avutil.h:272
av_frame_new_side_data
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, int size)
rational.h
AV_FRAME_DATA_S12M_TIMECODE
@ AV_FRAME_DATA_S12M_TIMECODE
Definition: frame.h:168
av_frame_free
void av_frame_free(AVFrame **frame)
AVRegionOfInterest::right
int right
Definition: frame.h:238
av_frame_make_writable
int av_frame_make_writable(AVFrame *frame)
AVFrame::pkt_pts
attribute_deprecated int64_t pkt_pts
Definition: frame.h:396
AVRegionOfInterest::left
int left
Definition: frame.h:237
AVFrame::color_range
enum AVColorRange color_range
Definition: frame.h:539
AV_FRAME_DATA_DISPLAYMATRIX
@ AV_FRAME_DATA_DISPLAYMATRIX
Definition: frame.h:84
AV_AFD_16_9
@ AV_AFD_16_9
Definition: frame.h:187
av_frame_get_channels
attribute_deprecated int av_frame_get_channels(const AVFrame *frame)
AVColorPrimaries
AVColorPrimaries
Definition: pixfmt.h:443
AVFrame::pkt_dts
int64_t pkt_dts
Definition: frame.h:404
av_frame_get_pkt_pos
attribute_deprecated int64_t av_frame_get_pkt_pos(const AVFrame *frame)
AVFrame::coded_picture_number
int coded_picture_number
Definition: frame.h:409
av_frame_apply_cropping
int av_frame_apply_cropping(AVFrame *frame, int flags)
AVRegionOfInterest
Definition: frame.h:220
av_frame_get_qp_table
attribute_deprecated int8_t * av_frame_get_qp_table(AVFrame *f, int *stride, int *type)
AVFrame::key_frame
int key_frame
Definition: frame.h:373
AVFrame::extended_buf
AVBufferRef ** extended_buf
Definition: frame.h:500
av_get_colorspace_name
const char * av_get_colorspace_name(enum AVColorSpace val)
AVFrame::hw_frames_ctx
AVBufferRef * hw_frames_ctx
Definition: frame.h:634
int64_t
__int64 int64_t
Definition: alext.h:31
AV_AFD_SAME
@ AV_AFD_SAME
Definition: frame.h:185
AV_FRAME_DATA_MATRIXENCODING
@ AV_FRAME_DATA_MATRIXENCODING
Definition: frame.h:67
samplefmt.h
av_frame_get_pkt_duration
attribute_deprecated int64_t av_frame_get_pkt_duration(const AVFrame *frame)
AVRegionOfInterest
struct AVRegionOfInterest AVRegionOfInterest
AVFrameSideData::size
int size
Definition: frame.h:204
AVFrame::display_picture_number
int display_picture_number
Definition: frame.h:413
AVRegionOfInterest::top
int top
Definition: frame.h:235
uint64_t
unsigned __int64 uint64_t
Definition: alext.h:32
AVFrame::repeat_pict
int repeat_pict
Definition: frame.h:437
AVFrameSideDataType
AVFrameSideDataType
Definition: frame.h:48
AVFrame::interlaced_frame
int interlaced_frame
Definition: frame.h:442
av_frame_alloc
AVFrame * av_frame_alloc(void)
AVFrame::pkt_size
int pkt_size
Definition: frame.h:610
AVFrame::qstride
attribute_deprecated int qstride
Definition: frame.h:622
AVFrame::crop_right
size_t crop_right
Definition: frame.h:658
AVFrame::flags
int flags
Definition: frame.h:532
AVRegionOfInterest::self_size
uint32_t self_size
Definition: frame.h:225
AV_FRAME_DATA_AUDIO_SERVICE_TYPE
@ AV_FRAME_DATA_AUDIO_SERVICE_TYPE
Definition: frame.h:113
av_frame_get_metadata
attribute_deprecated AVDictionary * av_frame_get_metadata(const AVFrame *frame)
AV_AFD_SP_4_3
@ AV_AFD_SP_4_3
Definition: frame.h:191
av_frame_clone
AVFrame * av_frame_clone(const AVFrame *src)
av_frame_set_pkt_pos
attribute_deprecated void av_frame_set_pkt_pos(AVFrame *frame, int64_t val)
AVFrame::error
attribute_deprecated uint64_t error[AV_NUM_DATA_POINTERS]
Definition: frame.h:430
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: SDL_opengl_glext.h:2483
av_frame_set_metadata
attribute_deprecated void av_frame_set_metadata(AVFrame *frame, AVDictionary *val)
AVFrame::colorspace
enum AVColorSpace colorspace
Definition: frame.h:550
AV_FRAME_DATA_SPHERICAL
@ AV_FRAME_DATA_SPHERICAL
Definition: frame.h:130
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
src
GLenum src
Definition: SDL_opengl_glext.h:1740
AVFrameSideData::type
enum AVFrameSideDataType type
Definition: frame.h:202
AV_FRAME_CROP_UNALIGNED
@ AV_FRAME_CROP_UNALIGNED
Definition: frame.h:941
AVFrame::top_field_first
int top_field_first
Definition: frame.h:447
av_frame_get_color_range
attribute_deprecated enum AVColorRange av_frame_get_color_range(const AVFrame *frame)
AVFrame::pkt_pos
int64_t pkt_pos
Definition: frame.h:566
AVActiveFormatDescription
AVActiveFormatDescription
Definition: frame.h:184
AV_FRAME_DATA_ICC_PROFILE
@ AV_FRAME_DATA_ICC_PROFILE
Definition: frame.h:143
AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Definition: frame.h:119
AVFrame::qp_table_buf
attribute_deprecated AVBufferRef * qp_table_buf
Definition: frame.h:628
AVFrame::nb_side_data
int nb_side_data
Definition: frame.h:507
av_frame_new_side_data_from_buf
AVFrameSideData * av_frame_new_side_data_from_buf(AVFrame *frame, enum AVFrameSideDataType type, AVBufferRef *buf)
stride
EGLImageKHR EGLint EGLint EGLint * stride
Definition: SDL_egl.h:1497
AV_FRAME_DATA_AFD
@ AV_FRAME_DATA_AFD
Definition: frame.h:89
av_frame_get_decode_error_flags
attribute_deprecated int av_frame_get_decode_error_flags(const AVFrame *frame)
AV_AFD_4_3_SP_14_9
@ AV_AFD_4_3_SP_14_9
Definition: frame.h:189
AVFrame::best_effort_timestamp
int64_t best_effort_timestamp
Definition: frame.h:559
av_frame_set_channel_layout
attribute_deprecated void av_frame_set_channel_layout(AVFrame *frame, int64_t val)
AVFrame::height
int height
Definition: frame.h:353
AVFrame::decode_error_flags
int decode_error_flags
Definition: frame.h:590
AVFrame::qscale_table
attribute_deprecated int8_t * qscale_table
Definition: frame.h:617
AVFrame::pkt_duration
int64_t pkt_duration
Definition: frame.h:574
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
AVFrame::opaque
void * opaque
Definition: frame.h:423
AVFrameSideData::buf
AVBufferRef * buf
Definition: frame.h:206
type
EGLenum type
Definition: SDL_egl.h:850
AV_FRAME_DATA_REPLAYGAIN
@ AV_FRAME_DATA_REPLAYGAIN
Definition: frame.h:76
AV_FRAME_DATA_PANSCAN
@ AV_FRAME_DATA_PANSCAN
Definition: frame.h:52
av_frame_ref
int av_frame_ref(AVFrame *dst, const AVFrame *src)
AVFrameSideData
Definition: frame.h:201
av_frame_copy
int av_frame_copy(AVFrame *dst, const AVFrame *src)
AVFrame::palette_has_changed
int palette_has_changed
Definition: frame.h:452
av_frame_is_writable
int av_frame_is_writable(AVFrame *frame)
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1740
AVBufferRef
Definition: buffer.h:81
buffer.h
av_frame_remove_side_data
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
AVFrameSideData::data
uint8_t * data
Definition: frame.h:203
AVFrame::linesize
int linesize[AV_NUM_DATA_POINTERS]
Definition: frame.h:326
AVFrame::width
int width
Definition: frame.h:353
AVFrame::metadata
AVDictionary * metadata
Definition: frame.h:581
AVFrame::channel_layout
uint64_t channel_layout
Definition: frame.h:472
av_frame_get_colorspace
attribute_deprecated enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame)
AV_FRAME_DATA_SKIP_SAMPLES
@ AV_FRAME_DATA_SKIP_SAMPLES
Definition: frame.h:108
AVChromaLocation
AVChromaLocation
Definition: pixfmt.h:541
AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Definition: frame.h:136
AVFrame::private_ref
AVBufferRef * private_ref
Definition: frame.h:674
AVFrame::qscale_type
attribute_deprecated int qscale_type
Definition: frame.h:625
AVRegionOfInterest::qoffset
AVRational qoffset
Definition: frame.h:262
AVFrame::nb_samples
int nb_samples
Definition: frame.h:361
uint8_t
unsigned __int8 uint8_t
Definition: SDL_config.h:35
AVColorSpace
AVColorSpace
Definition: pixfmt.h:496
av_frame_set_pkt_size
attribute_deprecated void av_frame_set_pkt_size(AVFrame *frame, int val)
av_frame_set_decode_error_flags
attribute_deprecated void av_frame_set_decode_error_flags(AVFrame *frame, int val)
AV_FRAME_DATA_STEREO3D
@ AV_FRAME_DATA_STEREO3D
Definition: frame.h:63
av_frame_move_ref
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
av_frame_unref
void av_frame_unref(AVFrame *frame)
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
val
GLuint GLfloat * val
Definition: SDL_opengl_glext.h:1495
AVFrame::crop_bottom
size_t crop_bottom
Definition: frame.h:656
AV_FRAME_DATA_GOP_TIMECODE
@ AV_FRAME_DATA_GOP_TIMECODE
Definition: frame.h:124
pixfmt.h
dict.h
AV_FRAME_DATA_DYNAMIC_HDR_PLUS
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
Definition: frame.h:175
av_frame_set_channels
attribute_deprecated void av_frame_set_channels(AVFrame *frame, int val)
flags
EGLSyncKHR EGLint flags
Definition: SDL_egl.h:898
AVFrame::nb_extended_buf
int nb_extended_buf
Definition: frame.h:504
AVFrame::format
int format
Definition: frame.h:368
av_frame_get_best_effort_timestamp
attribute_deprecated int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame)
AVDictionary
struct AVDictionary AVDictionary
Definition: dict.h:86
AVFrame
struct AVFrame AVFrame
av_frame_set_best_effort_timestamp
attribute_deprecated void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val)
AVFrame::sample_rate
int sample_rate
Definition: frame.h:467
AVFrame::crop_top
size_t crop_top
Definition: frame.h:655
AVFrame::extended_data
uint8_t ** extended_data
Definition: frame.h:342
av_frame_set_colorspace
attribute_deprecated void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val)
avutil.h
AVRational
Definition: rational.h:58
AVFrame::pts
int64_t pts
Definition: frame.h:388
size
GLsizeiptr size
Definition: SDL_opengl_glext.h:540
AV_FRAME_DATA_QP_TABLE_DATA
@ AV_FRAME_DATA_QP_TABLE_DATA
Definition: frame.h:159
AVFrame::chroma_location
enum AVChromaLocation chroma_location
Definition: frame.h:552
AVRegionOfInterest::bottom
int bottom
Definition: frame.h:236
AVFrame::opaque_ref
AVBufferRef * opaque_ref
Definition: frame.h:645
av_frame_side_data_name
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
AV_FRAME_DATA_REGIONS_OF_INTEREST
@ AV_FRAME_DATA_REGIONS_OF_INTEREST
Definition: frame.h:181
AVFrame::quality
int quality
Definition: frame.h:418
AV_FRAME_DATA_MOTION_VECTORS
@ AV_FRAME_DATA_MOTION_VECTORS
Definition: frame.h:96
av_frame_get_plane_buffer
AVBufferRef * av_frame_get_plane_buffer(AVFrame *frame, int plane)
uint32_t
unsigned __int32 uint32_t
Definition: SDL_config.h:39
AV_AFD_4_3
@ AV_AFD_4_3
Definition: frame.h:186
AVFrame::side_data
AVFrameSideData ** side_data
Definition: frame.h:506
AVFrame
Definition: frame.h:295
int8_t
signed __int8 int8_t
Definition: SDL_config.h:34
AVColorRange
AVColorRange
Definition: pixfmt.h:519
AV_FRAME_DATA_DOWNMIX_INFO
@ AV_FRAME_DATA_DOWNMIX_INFO
Definition: frame.h:72
av_frame_get_channel_layout
attribute_deprecated int64_t av_frame_get_channel_layout(const AVFrame *frame)
av_frame_set_qp_table
attribute_deprecated int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type)
AVFrameSideData::metadata
AVDictionary * metadata
Definition: frame.h:205
AVFrameSideData
struct AVFrameSideData AVFrameSideData
AV_AFD_16_9_SP_14_9
@ AV_AFD_16_9_SP_14_9
Definition: frame.h:190
av_frame_set_pkt_duration
attribute_deprecated void av_frame_set_pkt_duration(AVFrame *frame, int64_t val)