comparison avcodec.h @ 9217:53ec03e7ba40 libavcodec

Fix avpicture_get_size for non-paletted formats with a helper palette to not include the size of that palette. Also clarify its documentation.
author reimar
date Sat, 21 Mar 2009 10:25:20 +0000
parents 7b62de9c383d
children 18dffa8f2382
comparison
equal deleted inserted replaced
9216:64246d9e583a 9217:53ec03e7ba40
2674 * which points to the image data buffer. Depending on the specified picture 2674 * which points to the image data buffer. Depending on the specified picture
2675 * format, one or multiple image data pointers and line sizes will be set. 2675 * format, one or multiple image data pointers and line sizes will be set.
2676 * If a planar format is specified, several pointers will be set pointing to 2676 * If a planar format is specified, several pointers will be set pointing to
2677 * the different picture planes and the line sizes of the different planes 2677 * the different picture planes and the line sizes of the different planes
2678 * will be stored in the lines_sizes array. 2678 * will be stored in the lines_sizes array.
2679 * Call with ptr == NULL to get the required size for the ptr buffer.
2679 * 2680 *
2680 * @param picture AVPicture whose fields are to be filled in 2681 * @param picture AVPicture whose fields are to be filled in
2681 * @param ptr Buffer which will contain or contains the actual image data 2682 * @param ptr Buffer which will contain or contains the actual image data
2682 * @param pix_fmt The format in which the picture data is stored. 2683 * @param pix_fmt The format in which the picture data is stored.
2683 * @param width the width of the image in pixels 2684 * @param width the width of the image in pixels
2690 unsigned char *dest, int dest_size); 2691 unsigned char *dest, int dest_size);
2691 2692
2692 /** 2693 /**
2693 * Calculate the size in bytes that a picture of the given width and height 2694 * Calculate the size in bytes that a picture of the given width and height
2694 * would occupy if stored in the given picture format. 2695 * would occupy if stored in the given picture format.
2696 * Note that this returns the size of a compact representation as generated
2697 * by avpicture_layout, which can be smaller than the size required for e.g.
2698 * avpicture_fill.
2695 * 2699 *
2696 * @param pix_fmt the given picture format 2700 * @param pix_fmt the given picture format
2697 * @param width the width of the image 2701 * @param width the width of the image
2698 * @param height the height of the image 2702 * @param height the height of the image
2699 * @return Image data size in bytes 2703 * @return Image data size in bytes or -1 on error (e.g. too large dimensions).
2700 */ 2704 */
2701 int avpicture_get_size(int pix_fmt, int width, int height); 2705 int avpicture_get_size(int pix_fmt, int width, int height);
2702 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift); 2706 void avcodec_get_chroma_sub_sample(int pix_fmt, int *h_shift, int *v_shift);
2703 const char *avcodec_get_pix_fmt_name(int pix_fmt); 2707 const char *avcodec_get_pix_fmt_name(int pix_fmt);
2704 void avcodec_set_dimensions(AVCodecContext *s, int width, int height); 2708 void avcodec_set_dimensions(AVCodecContext *s, int width, int height);