mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-05 07:30:37 +00:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: pixdesc: mark pseudopaletted formats with a special flag. avconv: switch to avcodec_encode_video2(). libx264: implement encode2(). libx264: split extradata writing out of encode_nals(). lavc: add avcodec_encode_video2() that encodes from an AVFrame -> AVPacket cmdutils: update copyright year to 2012. swscale: sign-extend integer function argument to qword on x86-64. x86inc: support yasm -f win64 flag also. h264: manually save/restore XMM registers for functions using INIT_MMX. x86inc: allow manual use of WIN64_SPILL_XMM. aacdec: Use correct speaker order for 7.1. aacdec: Remove incorrect comment. aacdec: Simplify output configuration. Remove Sun medialib glue code. dsputil: set STRIDE_ALIGN to 16 for x86 also. pngdsp: swap argument inversion. Conflicts: cmdutils.c configure doc/APIchanges ffmpeg.c libavcodec/aacdec.c libavcodec/dsputil.h libavcodec/libx264.c libavcodec/mlib/dsputil_mlib.c libavcodec/utils.c libavfilter/vf_scale.c libavutil/avutil.h libswscale/mlib/yuv2rgb_mlib.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1735,7 +1735,6 @@ typedef struct AVCodecContext {
|
||||
#define FF_DCT_FASTINT 1
|
||||
#define FF_DCT_INT 2
|
||||
#define FF_DCT_MMX 3
|
||||
#define FF_DCT_MLIB 4
|
||||
#define FF_DCT_ALTIVEC 5
|
||||
#define FF_DCT_FAAN 6
|
||||
|
||||
@@ -1786,7 +1785,6 @@ typedef struct AVCodecContext {
|
||||
#define FF_IDCT_SIMPLEMMX 3
|
||||
#define FF_IDCT_LIBMPEG2MMX 4
|
||||
#define FF_IDCT_PS2 5
|
||||
#define FF_IDCT_MLIB 6
|
||||
#define FF_IDCT_ARM 7
|
||||
#define FF_IDCT_ALTIVEC 8
|
||||
#define FF_IDCT_SH4 9
|
||||
@@ -3960,7 +3958,10 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
||||
enum AVSampleFormat sample_fmt, const uint8_t *buf,
|
||||
int buf_size, int align);
|
||||
|
||||
#if FF_API_OLD_ENCODE_VIDEO
|
||||
/**
|
||||
* @deprecated use avcodec_encode_video2() instead.
|
||||
*
|
||||
* Encode a video frame from pict into buf.
|
||||
* The input picture should be
|
||||
* stored using a specific format, namely avctx.pix_fmt.
|
||||
@@ -3972,8 +3973,44 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
|
||||
* @return On error a negative value is returned, on success zero or the number
|
||||
* of bytes used from the output buffer.
|
||||
*/
|
||||
attribute_deprecated
|
||||
int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
||||
const AVFrame *pict);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Encode a frame of video.
|
||||
*
|
||||
* Takes input raw video data from frame and writes the next output packet, if
|
||||
* available, to avpkt. The output packet does not necessarily contain data for
|
||||
* the most recent frame, as encoders can delay and reorder input frames
|
||||
* internally as needed.
|
||||
*
|
||||
* @param avctx codec context
|
||||
* @param avpkt output AVPacket.
|
||||
* The user can supply an output buffer by setting
|
||||
* avpkt->data and avpkt->size prior to calling the
|
||||
* function, but if the size of the user-provided data is not
|
||||
* large enough, encoding will fail. All other AVPacket fields
|
||||
* will be reset by the encoder using av_init_packet(). If
|
||||
* avpkt->data is NULL, the encoder will allocate it.
|
||||
* The encoder will set avpkt->size to the size of the
|
||||
* output packet. The returned data (if any) belongs to the
|
||||
* caller, he is responsible for freeing it.
|
||||
* @param[in] frame AVFrame containing the raw video data to be encoded.
|
||||
* May be NULL when flushing an encoder that has the
|
||||
* CODEC_CAP_DELAY capability set.
|
||||
* @param[out] got_packet_ptr This field is set to 1 by libavcodec if the
|
||||
* output packet is non-empty, and to 0 if it is
|
||||
* empty. If the function returns an error, the
|
||||
* packet can be assumed to be invalid, and the
|
||||
* value of got_packet_ptr is undefined and should
|
||||
* not be used.
|
||||
* @return 0 on success, negative error code on failure
|
||||
*/
|
||||
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
const AVFrame *frame, int *got_packet_ptr);
|
||||
|
||||
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
|
||||
const AVSubtitle *sub);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user