| OLD | NEW |
| 1 /* | 1 /* |
| 2 * VC-1 and WMV3 decoder | 2 * VC-1 and WMV3 decoder |
| 3 * Copyright (c) 2006-2007 Konstantin Shishkov | 3 * Copyright (c) 2006-2007 Konstantin Shishkov |
| 4 * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermay
er | 4 * Partly based on vc9.c (c) 2005 Anonymous, Alex Beregszaszi, Michael Niedermay
er |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * @file libavcodec/vc1dec.c | 24 * @file libavcodec/vc1dec.c |
| 25 * VC-1 and WMV3 decoder | 25 * VC-1 and WMV3 decoder |
| 26 * | 26 * |
| 27 */ | 27 */ |
| 28 #include "internal.h" | 28 #include "internal.h" |
| 29 #include "dsputil.h" | 29 #include "dsputil.h" |
| 30 #include "avcodec.h" | 30 #include "avcodec.h" |
| 31 #include "mpegvideo.h" | 31 #include "mpegvideo.h" |
| 32 #include "h263.h" |
| 32 #include "vc1.h" | 33 #include "vc1.h" |
| 33 #include "vc1data.h" | 34 #include "vc1data.h" |
| 34 #include "vc1acdata.h" | 35 #include "vc1acdata.h" |
| 35 #include "msmpeg4data.h" | 36 #include "msmpeg4data.h" |
| 36 #include "unary.h" | 37 #include "unary.h" |
| 37 #include "simple_idct.h" | 38 #include "simple_idct.h" |
| 38 #include "mathops.h" | 39 #include "mathops.h" |
| 39 #include "vdpau_internal.h" | 40 #include "vdpau_internal.h" |
| 40 | 41 |
| 41 #undef NDEBUG | 42 #undef NDEBUG |
| (...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2986 avctx->pix_fmt = PIX_FMT_GRAY8; | 2987 avctx->pix_fmt = PIX_FMT_GRAY8; |
| 2987 avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); | 2988 avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); |
| 2988 v->s.avctx = avctx; | 2989 v->s.avctx = avctx; |
| 2989 avctx->flags |= CODEC_FLAG_EMU_EDGE; | 2990 avctx->flags |= CODEC_FLAG_EMU_EDGE; |
| 2990 v->s.flags |= CODEC_FLAG_EMU_EDGE; | 2991 v->s.flags |= CODEC_FLAG_EMU_EDGE; |
| 2991 | 2992 |
| 2992 if(avctx->idct_algo==FF_IDCT_AUTO){ | 2993 if(avctx->idct_algo==FF_IDCT_AUTO){ |
| 2993 avctx->idct_algo=FF_IDCT_WMV2; | 2994 avctx->idct_algo=FF_IDCT_WMV2; |
| 2994 } | 2995 } |
| 2995 | 2996 |
| 2996 if(ff_h263_decode_init(avctx) < 0) | 2997 if(ff_msmpeg4_decode_init(avctx) < 0) |
| 2997 return -1; | 2998 return -1; |
| 2998 if (vc1_init_common(v) < 0) return -1; | 2999 if (vc1_init_common(v) < 0) return -1; |
| 2999 // only for ff_msmp4_mb_i_table | |
| 3000 if (ff_msmpeg4_decode_init(avctx) < 0) return -1; | |
| 3001 | 3000 |
| 3002 avctx->coded_width = avctx->width; | 3001 avctx->coded_width = avctx->width; |
| 3003 avctx->coded_height = avctx->height; | 3002 avctx->coded_height = avctx->height; |
| 3004 if (avctx->codec_id == CODEC_ID_WMV3) | 3003 if (avctx->codec_id == CODEC_ID_WMV3) |
| 3005 { | 3004 { |
| 3006 int count = 0; | 3005 int count = 0; |
| 3007 | 3006 |
| 3008 // looks like WMV3 has a sequence header stored in the extradata | 3007 // looks like WMV3 has a sequence header stored in the extradata |
| 3009 // advanced sequence header may be before the first frame | 3008 // advanced sequence header may be before the first frame |
| 3010 // the last byte of the extradata is a version number, 1 for the | 3009 // the last byte of the extradata is a version number, 1 for the |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3376 vc1_decode_init, | 3375 vc1_decode_init, |
| 3377 NULL, | 3376 NULL, |
| 3378 vc1_decode_end, | 3377 vc1_decode_end, |
| 3379 vc1_decode_frame, | 3378 vc1_decode_frame, |
| 3380 CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, | 3379 CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, |
| 3381 NULL, | 3380 NULL, |
| 3382 .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), | 3381 .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), |
| 3383 .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE} | 3382 .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE} |
| 3384 }; | 3383 }; |
| 3385 #endif | 3384 #endif |
| OLD | NEW |