Mercurial > libavcodec.hg
comparison h264.c @ 8610:2ca51be7dad8 libavcodec
Remove CODEC_ID_H264_VDPAU.
author | cehoyos |
---|---|
date | Sat, 17 Jan 2009 01:17:04 +0000 |
parents | 68e959302527 |
children | d6bab465b82c |
comparison
equal
deleted
inserted
replaced
8609:99bfffc29ab9 | 8610:2ca51be7dad8 |
---|---|
2187 s->quarter_sample = 1; | 2187 s->quarter_sample = 1; |
2188 s->low_delay= 1; | 2188 s->low_delay= 1; |
2189 | 2189 |
2190 if(avctx->codec_id == CODEC_ID_SVQ3) | 2190 if(avctx->codec_id == CODEC_ID_SVQ3) |
2191 avctx->pix_fmt= PIX_FMT_YUVJ420P; | 2191 avctx->pix_fmt= PIX_FMT_YUVJ420P; |
2192 else if(avctx->codec_id == CODEC_ID_H264_VDPAU) | 2192 else if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) |
2193 avctx->pix_fmt= PIX_FMT_VDPAU_H264; | 2193 avctx->pix_fmt= PIX_FMT_VDPAU_H264; |
2194 else | 2194 else |
2195 avctx->pix_fmt= PIX_FMT_YUV420P; | 2195 avctx->pix_fmt= PIX_FMT_YUV420P; |
2196 | 2196 |
2197 decode_init_vlc(); | 2197 decode_init_vlc(); |
7291 MpegEncContext * const s = &h->s; | 7291 MpegEncContext * const s = &h->s; |
7292 AVCodecContext * const avctx= s->avctx; | 7292 AVCodecContext * const avctx= s->avctx; |
7293 H264Context *hx; | 7293 H264Context *hx; |
7294 int i; | 7294 int i; |
7295 | 7295 |
7296 if(avctx->codec_id == CODEC_ID_H264_VDPAU) | 7296 if(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) |
7297 return; | 7297 return; |
7298 if(context_count == 1) { | 7298 if(context_count == 1) { |
7299 decode_slice(avctx, &h); | 7299 decode_slice(avctx, &h); |
7300 } else { | 7300 } else { |
7301 for(i = 1; i < context_count; i++) { | 7301 for(i = 1; i < context_count; i++) { |
7421 if(hx->redundant_pic_count==0 && hx->s.hurry_up < 5 | 7421 if(hx->redundant_pic_count==0 && hx->s.hurry_up < 5 |
7422 && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc) | 7422 && (avctx->skip_frame < AVDISCARD_NONREF || hx->nal_ref_idc) |
7423 && (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE) | 7423 && (avctx->skip_frame < AVDISCARD_BIDIR || hx->slice_type_nos!=FF_B_TYPE) |
7424 && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE) | 7424 && (avctx->skip_frame < AVDISCARD_NONKEY || hx->slice_type_nos==FF_I_TYPE) |
7425 && avctx->skip_frame < AVDISCARD_ALL){ | 7425 && avctx->skip_frame < AVDISCARD_ALL){ |
7426 if(CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU){ | 7426 if(CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU){ |
7427 static const uint8_t start_code[] = {0x00, 0x00, 0x01}; | 7427 static const uint8_t start_code[] = {0x00, 0x00, 0x01}; |
7428 ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code)); | 7428 ff_vdpau_add_data_chunk(s, start_code, sizeof(start_code)); |
7429 ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed ); | 7429 ff_vdpau_add_data_chunk(s, &buf[buf_index - consumed], consumed ); |
7430 }else | 7430 }else |
7431 context_count++; | 7431 context_count++; |
7622 s->mb_y= 0; | 7622 s->mb_y= 0; |
7623 | 7623 |
7624 s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; | 7624 s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264; |
7625 s->current_picture_ptr->pict_type= s->pict_type; | 7625 s->current_picture_ptr->pict_type= s->pict_type; |
7626 | 7626 |
7627 if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU) | 7627 if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) |
7628 ff_vdpau_h264_set_reference_frames(s); | 7628 ff_vdpau_h264_set_reference_frames(s); |
7629 | 7629 |
7630 if(!s->dropable) { | 7630 if(!s->dropable) { |
7631 execute_ref_pic_marking(h, h->mmco, h->mmco_index); | 7631 execute_ref_pic_marking(h, h->mmco, h->mmco_index); |
7632 h->prev_poc_msb= h->poc_msb; | 7632 h->prev_poc_msb= h->poc_msb; |
7633 h->prev_poc_lsb= h->poc_lsb; | 7633 h->prev_poc_lsb= h->poc_lsb; |
7634 } | 7634 } |
7635 h->prev_frame_num_offset= h->frame_num_offset; | 7635 h->prev_frame_num_offset= h->frame_num_offset; |
7636 h->prev_frame_num= h->frame_num; | 7636 h->prev_frame_num= h->frame_num; |
7637 | 7637 |
7638 if (CONFIG_H264_VDPAU_DECODER && avctx->codec_id == CODEC_ID_H264_VDPAU) | 7638 if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) |
7639 ff_vdpau_h264_picture_complete(s); | 7639 ff_vdpau_h264_picture_complete(s); |
7640 | 7640 |
7641 /* | 7641 /* |
7642 * FIXME: Error handling code does not seem to support interlaced | 7642 * FIXME: Error handling code does not seem to support interlaced |
7643 * when slices span multiple rows | 7643 * when slices span multiple rows |
8025 | 8025 |
8026 #if CONFIG_H264_VDPAU_DECODER | 8026 #if CONFIG_H264_VDPAU_DECODER |
8027 AVCodec h264_vdpau_decoder = { | 8027 AVCodec h264_vdpau_decoder = { |
8028 "h264_vdpau", | 8028 "h264_vdpau", |
8029 CODEC_TYPE_VIDEO, | 8029 CODEC_TYPE_VIDEO, |
8030 CODEC_ID_H264_VDPAU, | 8030 CODEC_ID_H264, |
8031 sizeof(H264Context), | 8031 sizeof(H264Context), |
8032 decode_init, | 8032 decode_init, |
8033 NULL, | 8033 NULL, |
8034 decode_end, | 8034 decode_end, |
8035 decode_frame, | 8035 decode_frame, |