Commit bd761688e3e71ee9011f5024ddd9ef8358350f68
- Diff rendering mode:
- inline
- side by side
configure
(2 / 0)
|   | |||
| 1131 | 1131 | mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder" | |
| 1132 | 1132 | mpeg4_vaapi_hwaccel_deps="va_va_h" | |
| 1133 | 1133 | mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder" | |
| 1134 | mpeg4_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" | ||
| 1135 | mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder" | ||
| 1134 | 1136 | mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h" | |
| 1135 | 1137 | mpeg_xvmc_decoder_select="mpegvideo_decoder" | |
| 1136 | 1138 | msmpeg4v1_encoder_select="h263_encoder" |
libavcodec/allcodecs.c
(1 / 0)
|   | |||
| 123 | 123 | REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video); | |
| 124 | 124 | REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video); | |
| 125 | 125 | REGISTER_ENCDEC (MPEG4, mpeg4); | |
| 126 | REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau); | ||
| 126 | 127 | REGISTER_DECODER (MPEGVIDEO, mpegvideo); | |
| 127 | 128 | REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau); | |
| 128 | 129 | REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau); |
libavcodec/h263dec.c
(23 / 0)
|   | |||
| 32 | 32 | #include "h263_parser.h" | |
| 33 | 33 | #include "mpeg4video_parser.h" | |
| 34 | 34 | #include "msmpeg4.h" | |
| 35 | #include "vdpau_internal.h" | ||
| 35 | 36 | ||
| 36 | 37 | //#define DEBUG | |
| 37 | 38 | //#define PRINT_FRAME_TIME | |
| … | … | ||
| 622 | 622 | if(MPV_frame_start(s, avctx) < 0) | |
| 623 | 623 | return -1; | |
| 624 | 624 | ||
| 625 | if (CONFIG_MPEG4_VDPAU_DECODER && (s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU)) { | ||
| 626 | ff_vdpau_mpeg4_decode_picture(s, buf, buf_size); | ||
| 627 | goto frame_end; | ||
| 628 | } | ||
| 629 | |||
| 625 | 630 | if (avctx->hwaccel) { | |
| 626 | 631 | if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0) | |
| 627 | 632 | return -1; | |
| … | … | ||
| 701 | 701 | intrax8_decoded: | |
| 702 | 702 | ff_er_frame_end(s); | |
| 703 | 703 | ||
| 704 | frame_end: | ||
| 704 | 705 | if (avctx->hwaccel) { | |
| 705 | 706 | if (avctx->hwaccel->end_frame(avctx) < 0) | |
| 706 | 707 | return -1; | |
| … | … | ||
| 842 | 842 | .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV) / Sorenson Spark / Sorenson H.263"), | |
| 843 | 843 | .pix_fmts= ff_pixfmt_list_420, | |
| 844 | 844 | }; | |
| 845 | |||
| 846 | #if CONFIG_MPEG4_VDPAU_DECODER | ||
| 847 | AVCodec mpeg4_vdpau_decoder = { | ||
| 848 | "mpeg4_vdpau", | ||
| 849 | CODEC_TYPE_VIDEO, | ||
| 850 | CODEC_ID_MPEG4, | ||
| 851 | sizeof(MpegEncContext), | ||
| 852 | ff_h263_decode_init, | ||
| 853 | NULL, | ||
| 854 | ff_h263_decode_end, | ||
| 855 | ff_h263_decode_frame, | ||
| 856 | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, | ||
| 857 | .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), | ||
| 858 | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_VDPAU_MPEG4, PIX_FMT_NONE}, | ||
| 859 | }; | ||
| 860 | #endif |
libavcodec/imgconvert.c
(5 / 0)
|   | |||
| 376 | 376 | .is_hwaccel = 1, | |
| 377 | 377 | .x_chroma_shift = 1, .y_chroma_shift = 1, | |
| 378 | 378 | }, | |
| 379 | [PIX_FMT_VDPAU_MPEG4] = { | ||
| 380 | .name = "vdpau_mpeg4", | ||
| 381 | .is_hwaccel = 1, | ||
| 382 | .x_chroma_shift = 1, .y_chroma_shift = 1, | ||
| 383 | }, | ||
| 379 | 384 | [PIX_FMT_UYYVYY411] = { | |
| 380 | 385 | .name = "uyyvyy411", | |
| 381 | 386 | .nb_channels = 1, |
libavcodec/vdpau.c
(50 / 0)
|   | |||
| 305 | 305 | render->bitstream_buffers_used = 0; | |
| 306 | 306 | } | |
| 307 | 307 | ||
| 308 | void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, | ||
| 309 | int buf_size) | ||
| 310 | { | ||
| 311 | struct vdpau_render_state *render, *last, *next; | ||
| 312 | int i; | ||
| 313 | |||
| 314 | if (!s->current_picture_ptr) return; | ||
| 315 | |||
| 316 | render = (struct vdpau_render_state *)s->current_picture_ptr->data[0]; | ||
| 317 | assert(render); | ||
| 318 | |||
| 319 | /* fill VdpPictureInfoMPEG4Part2 struct */ | ||
| 320 | render->info.mpeg4.vop_time_increment_resolution = s->avctx->time_base.den; | ||
| 321 | render->info.mpeg4.vop_coding_type = 0; | ||
| 322 | render->info.mpeg4.vop_fcode_forward = s->f_code; | ||
| 323 | render->info.mpeg4.vop_fcode_backward = s->b_code; | ||
| 324 | render->info.mpeg4.resync_marker_disable = !s->resync_marker; | ||
| 325 | render->info.mpeg4.interlaced = !s->progressive_sequence; | ||
| 326 | render->info.mpeg4.quant_type = s->mpeg_quant; | ||
| 327 | render->info.mpeg4.quarter_sample = s->quarter_sample; | ||
| 328 | render->info.mpeg4.short_video_header = s->avctx->codec->id == CODEC_ID_H263; | ||
| 329 | render->info.mpeg4.rounding_control = s->no_rounding; | ||
| 330 | render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan; | ||
| 331 | render->info.mpeg4.top_field_first = s->top_field_first; | ||
| 332 | for (i = 0; i < 64; ++i) { | ||
| 333 | render->info.mpeg4.intra_quantizer_matrix[i] = s->intra_matrix[i]; | ||
| 334 | render->info.mpeg4.non_intra_quantizer_matrix[i] = s->inter_matrix[i]; | ||
| 335 | } | ||
| 336 | render->info.mpeg4.forward_reference = VDP_INVALID_HANDLE; | ||
| 337 | render->info.mpeg4.backward_reference = VDP_INVALID_HANDLE; | ||
| 338 | |||
| 339 | switch (s->pict_type) { | ||
| 340 | case FF_B_TYPE: | ||
| 341 | next = (struct vdpau_render_state *)s->next_picture.data[0]; | ||
| 342 | assert(next); | ||
| 343 | render->info.mpeg4.backward_reference = next->surface; | ||
| 344 | render->info.mpeg4.vop_coding_type = 2; | ||
| 345 | // no break here, going to set forward prediction | ||
| 346 | case FF_P_TYPE: | ||
| 347 | last = (struct vdpau_render_state *)s->last_picture.data[0]; | ||
| 348 | assert(last); | ||
| 349 | render->info.mpeg4.forward_reference = last->surface; | ||
| 350 | } | ||
| 351 | |||
| 352 | ff_vdpau_add_data_chunk(s, buf, buf_size); | ||
| 353 | |||
| 354 | ff_draw_horiz_band(s, 0, s->avctx->height); | ||
| 355 | render->bitstream_buffers_used = 0; | ||
| 356 | } | ||
| 357 | |||
| 308 | 358 | /* @}*/ |
libavcodec/vdpau.h
(1 / 0)
|   | |||
| 73 | 73 | VdpPictureInfoH264 h264; | |
| 74 | 74 | VdpPictureInfoMPEG1Or2 mpeg; | |
| 75 | 75 | VdpPictureInfoVC1 vc1; | |
| 76 | VdpPictureInfoMPEG4Part2 mpeg4; | ||
| 76 | 77 | } info; | |
| 77 | 78 | ||
| 78 | 79 | /** Describe size/location of the compressed video data. |
libavcodec/vdpau_internal.h
(3 / 0)
|   | |||
| 39 | 39 | void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, | |
| 40 | 40 | int buf_size); | |
| 41 | 41 | ||
| 42 | void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, | ||
| 43 | int buf_size); | ||
| 44 | |||
| 42 | 45 | #endif /* AVCODEC_VDPAU_INTERNAL_H */ |
libavutil/pixfmt.h
(1 / 0)
|   | |||
| 123 | 123 | PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian | |
| 124 | 124 | PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian | |
| 125 | 125 | PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian | |
| 126 | PIX_FMT_VDPAU_MPEG4, ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers | ||
| 126 | 127 | PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions | |
| 127 | 128 | }; | |
| 128 | 129 |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

