Revision f38fa75d libavcodec/avcodec.h

View differences:

libavcodec/avcodec.h
3308 3308
void av_resample_close(struct AVResampleContext *c);
3309 3309

  
3310 3310
/**
3311
 * Allocate memory for a picture.  Call avpicture_free to free it.
3311
 * Allocate memory for a picture.  Call avpicture_free() to free it.
3312
 *
3313
 * \see avpicture_fill()
3312 3314
 *
3313 3315
 * @param picture the picture to be filled in
3314 3316
 * @param pix_fmt the format of the picture
......
3320 3322

  
3321 3323
/**
3322 3324
 * Free a picture previously allocated by avpicture_alloc().
3325
 * The data buffer used by the AVPicture is freed, but the AVPicture structure
3326
 * itself is not.
3323 3327
 *
3324 3328
 * @param picture the AVPicture to be freed
3325 3329
 */
......
3335 3339
 * will be stored in the lines_sizes array.
3336 3340
 * Call with ptr == NULL to get the required size for the ptr buffer.
3337 3341
 *
3342
 * To allocate the buffer and fill in the AVPicture fields in one call,
3343
 * use avpicture_alloc().
3344
 *
3338 3345
 * @param picture AVPicture whose fields are to be filled in
3339 3346
 * @param ptr Buffer which will contain or contains the actual image data
3340 3347
 * @param pix_fmt The format in which the picture data is stored.
......
3344 3351
 */
3345 3352
int avpicture_fill(AVPicture *picture, uint8_t *ptr,
3346 3353
                   enum PixelFormat pix_fmt, int width, int height);
3354

  
3355
/**
3356
 * Copy pixel data from an AVPicture into a buffer.
3357
 * The data is stored compactly, without any gaps for alignment or padding
3358
 * which may be applied by avpicture_fill().
3359
 *
3360
 * \see avpicture_get_size()
3361
 *
3362
 * @param[in] src AVPicture containing image data
3363
 * @param[in] pix_fmt The format in which the picture data is stored.
3364
 * @param[in] width the width of the image in pixels.
3365
 * @param[in] height the height of the image in pixels.
3366
 * @param[out] dest A buffer into which picture data will be copied.
3367
 * @param[in] dest_size The size of 'dest'.
3368
 * @return The number of bytes written to dest, or a negative value (error code) on error.
3369
 */
3347 3370
int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height,
3348 3371
                     unsigned char *dest, int dest_size);
3349 3372

  
......
3351 3374
 * Calculate the size in bytes that a picture of the given width and height
3352 3375
 * would occupy if stored in the given picture format.
3353 3376
 * Note that this returns the size of a compact representation as generated
3354
 * by avpicture_layout, which can be smaller than the size required for e.g.
3355
 * avpicture_fill.
3377
 * by avpicture_layout(), which can be smaller than the size required for e.g.
3378
 * avpicture_fill().
3356 3379
 *
3357 3380
 * @param pix_fmt the given picture format
3358 3381
 * @param width the width of the image
......
3361 3384
 */
3362 3385
int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height);
3363 3386
void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift);
3387

  
3388
/**
3389
 * Return the short name for a pixel format.
3390
 *
3391
 * \see av_get_pix_fmt(), av_get_pix_fmt_string().
3392
 */
3364 3393
const char *avcodec_get_pix_fmt_name(enum PixelFormat pix_fmt);
3394

  
3365 3395
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
3366 3396

  
3367 3397
#if LIBAVCODEC_VERSION_MAJOR < 53
......
3498 3528

  
3499 3529
/**
3500 3530
 * Initialize libavcodec.
3531
 * If called more than once, does nothing.
3501 3532
 *
3502 3533
 * @warning This function must be called before any other libavcodec
3503 3534
 * function.
3535
 *
3536
 * @warning This function is not thread-safe.
3504 3537
 */
3505 3538
void avcodec_init(void);
3506 3539

  
......
3514 3547
/**
3515 3548
 * Register the codec codec and initialize libavcodec.
3516 3549
 *
3517
 * @see avcodec_init()
3550
 * @see avcodec_init(), avcodec_register_all()
3518 3551
 */
3519 3552
void avcodec_register(AVCodec *codec);
3520 3553

  
......
3702 3735
 * @param avctx The context which will be set up to use the given codec.
3703 3736
 * @param codec The codec to use within the context.
3704 3737
 * @return zero on success, a negative value on error
3705
 * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder
3738
 * @see avcodec_alloc_context, avcodec_find_decoder, avcodec_find_encoder, avcodec_close
3706 3739
 */
3707 3740
int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
3708 3741

  

Also available in: Unified diff