Revision a33c7159

View differences:

libavcodec/avcodec.h
923 923
     */
924 924
    int me_subpel_quality;
925 925

  
926
    /**
927
     * callback to negotiate the pixelFormat
928
     * @param fmt is the list of formats which are supported by the codec,
929
     * its terminated by -1 as 0 is a valid format, the formats are ordered by quality
930
     * the first is allways the native one
931
     * @return the choosen format
932
     * encoding: unused
933
     * decoding: set by user, if not set then the native format will always be choosen
934
     */
935
    enum PixelFormat (*get_format)(struct AVCodecContext *s, enum PixelFormat * fmt);
926 936
} AVCodecContext;
927 937

  
928 938
typedef struct AVCodec {
libavcodec/mpegvideo.c
86 86
static UINT16 (*default_mv_penalty)[MAX_MV*2+1]=NULL;
87 87
static UINT8 default_fcode_tab[MAX_MV*2+1];
88 88

  
89
enum PixelFormat ff_yuv420p_list[2]= {PIX_FMT_YUV420P, -1};
90

  
89 91
static void convert_matrix(MpegEncContext *s, int (*qmat)[64], uint16_t (*qmat16)[64], uint16_t (*qmat16_bias)[64],
90 92
                           const UINT16 *quant_matrix, int bias, int qmin, int qmax)
91 93
{
libavcodec/mpegvideo.h
597 597
                                    int src_x, int src_y, int w, int h);
598 598
char ff_get_pict_type_char(int pict_type);
599 599

  
600
extern enum PixelFormat ff_yuv420p_list[2];
600 601

  
601 602
extern int ff_bit_exact;
602 603

  
libavcodec/utils.c
185 185
//printf("R%X\n", pic->opaque);
186 186
}
187 187

  
188
enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, enum PixelFormat * fmt){
189
    return fmt[0];
190
}
191

  
188 192
void avcodec_get_context_defaults(AVCodecContext *s){
189 193
    s->bit_rate= 800*1000;
190 194
    s->bit_rate_tolerance= s->bit_rate*10;
......
207 211
    s->me_method= ME_EPZS;
208 212
    s->get_buffer= avcodec_default_get_buffer;
209 213
    s->release_buffer= avcodec_default_release_buffer;
214
    s->get_format= avcodec_default_get_format;
210 215
    s->me_subpel_quality=8;
211 216
}
212 217

  

Also available in: Unified diff