[FFmpeg-cvslog] vaapi_vc1: Convert to use the new VAAPI hwaccel code
ffmpeg | branch: master | Mark Thompson| Sat Aug 6 22:12:50 2016 +0100| [520fb77285ff0e7da1449d2b60742865b0b43ae8] | committer: Mark Thompson vaapi_vc1: Convert to use the new VAAPI hwaccel code > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=520fb77285ff0e7da1449d2b60742865b0b43ae8 --- libavcodec/vaapi_vc1.c | 346 + 1 file changed, 206 insertions(+), 140 deletions(-) diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index 2fc03e6..fe1a20f 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "vaapi_internal.h" #include "internal.h" +#include "vaapi_decode.h" #include "vc1.h" #include "vc1data.h" @@ -148,143 +148,165 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t { const VC1Context *v = avctx->priv_data; const MpegEncContext *s = >s; -struct vaapi_context * const vactx = avctx->hwaccel_context; -VAPictureParameterBufferVC1 *pic_param; - -vactx->slice_param_size = sizeof(VASliceParameterBufferVC1); - -/* Fill in VAPictureParameterBufferVC1 */ -pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1)); -if (!pic_param) -return -1; -pic_param->forward_reference_picture= VA_INVALID_ID; -pic_param->backward_reference_picture = VA_INVALID_ID; -pic_param->inloop_decoded_picture = VA_INVALID_ID; -pic_param->sequence_fields.value= 0; /* reset all bits */ -pic_param->sequence_fields.bits.pulldown= v->broadcast; -pic_param->sequence_fields.bits.interlace = v->interlace; -pic_param->sequence_fields.bits.tfcntrflag = v->tfcntrflag; -pic_param->sequence_fields.bits.finterpflag = v->finterpflag; -pic_param->sequence_fields.bits.psf = v->psf; -pic_param->sequence_fields.bits.multires= v->multires; -pic_param->sequence_fields.bits.overlap = v->overlap; -pic_param->sequence_fields.bits.syncmarker = v->resync_marker; -pic_param->sequence_fields.bits.rangered= v->rangered; -pic_param->sequence_fields.bits.max_b_frames= s->avctx->max_b_frames; -pic_param->sequence_fields.bits.profile = v->profile; -pic_param->coded_width = s->avctx->coded_width; -pic_param->coded_height = s->avctx->coded_height; -pic_param->entrypoint_fields.value = 0; /* reset all bits */ -pic_param->entrypoint_fields.bits.broken_link = v->broken_link; -pic_param->entrypoint_fields.bits.closed_entry = v->closed_entry; -pic_param->entrypoint_fields.bits.panscan_flag = v->panscanflag; -pic_param->entrypoint_fields.bits.loopfilter= s->loop_filter; -pic_param->conditional_overlap_flag = v->condover; -pic_param->fast_uvmc_flag = v->fastuvmc; -pic_param->range_mapping_fields.value = 0; /* reset all bits */ -pic_param->range_mapping_fields.bits.luma_flag = v->range_mapy_flag; -pic_param->range_mapping_fields.bits.luma = v->range_mapy; -pic_param->range_mapping_fields.bits.chroma_flag= v->range_mapuv_flag; -pic_param->range_mapping_fields.bits.chroma = v->range_mapuv; -pic_param->b_picture_fraction = v->bfraction_lut_index; -pic_param->cbp_table= v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -pic_param->mb_mode_table= 0; /* XXX: interlaced frame */ -pic_param->range_reduction_frame= v->rangeredfrm; -pic_param->rounding_control = v->rnd; -pic_param->post_processing = v->postproc; -pic_param->picture_resolution_index = v->respic; -pic_param->luma_scale = v->lumscale; -pic_param->luma_shift = v->lumshift; -pic_param->picture_fields.value = 0; /* reset all bits */ -pic_param->picture_fields.bits.picture_type = vc1_get_PTYPE(v); -
[FFmpeg-cvslog] vaapi_vc1: Convert to use the new VAAPI hwaccel code
ffmpeg | branch: master | Mark Thompson| Sat Aug 6 22:12:50 2016 +0100| [32b3812b60e936952e01746f218981f44651092a] | committer: Mark Thompson vaapi_vc1: Convert to use the new VAAPI hwaccel code (cherry picked from commit 520fb77285ff0e7da1449d2b60742865b0b43ae8) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32b3812b60e936952e01746f218981f44651092a --- libavcodec/vaapi_vc1.c | 353 + 1 file changed, 206 insertions(+), 147 deletions(-) diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index 17e35e6..a456149 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -20,8 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "vaapi_internal.h" #include "internal.h" +#include "vaapi_decode.h" #include "vc1.h" #include "vc1data.h" @@ -148,143 +148,165 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t { const VC1Context *v = avctx->priv_data; const MpegEncContext *s = >s; -FFVAContext *vactx = ff_vaapi_get_context(avctx); -VAPictureParameterBufferVC1 *pic_param; - -vactx->slice_param_size = sizeof(VASliceParameterBufferVC1); - -/* Fill in VAPictureParameterBufferVC1 */ -pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1)); -if (!pic_param) -return -1; -pic_param->forward_reference_picture= VA_INVALID_ID; -pic_param->backward_reference_picture = VA_INVALID_ID; -pic_param->inloop_decoded_picture = VA_INVALID_ID; -pic_param->sequence_fields.value= 0; /* reset all bits */ -pic_param->sequence_fields.bits.pulldown= v->broadcast; -pic_param->sequence_fields.bits.interlace = v->interlace; -pic_param->sequence_fields.bits.tfcntrflag = v->tfcntrflag; -pic_param->sequence_fields.bits.finterpflag = v->finterpflag; -pic_param->sequence_fields.bits.psf = v->psf; -pic_param->sequence_fields.bits.multires= v->multires; -pic_param->sequence_fields.bits.overlap = v->overlap; -pic_param->sequence_fields.bits.syncmarker = v->resync_marker; -pic_param->sequence_fields.bits.rangered= v->rangered; -pic_param->sequence_fields.bits.max_b_frames= s->avctx->max_b_frames; -pic_param->sequence_fields.bits.profile = v->profile; -pic_param->coded_width = s->avctx->coded_width; -pic_param->coded_height = s->avctx->coded_height; -pic_param->entrypoint_fields.value = 0; /* reset all bits */ -pic_param->entrypoint_fields.bits.broken_link = v->broken_link; -pic_param->entrypoint_fields.bits.closed_entry = v->closed_entry; -pic_param->entrypoint_fields.bits.panscan_flag = v->panscanflag; -pic_param->entrypoint_fields.bits.loopfilter= s->loop_filter; -pic_param->conditional_overlap_flag = v->condover; -pic_param->fast_uvmc_flag = v->fastuvmc; -pic_param->range_mapping_fields.value = 0; /* reset all bits */ -pic_param->range_mapping_fields.bits.luma_flag = v->range_mapy_flag; -pic_param->range_mapping_fields.bits.luma = v->range_mapy; -pic_param->range_mapping_fields.bits.chroma_flag= v->range_mapuv_flag; -pic_param->range_mapping_fields.bits.chroma = v->range_mapuv; -pic_param->b_picture_fraction = v->bfraction_lut_index; -pic_param->cbp_table= v->cbpcy_vlc ? v->cbpcy_vlc - ff_vc1_cbpcy_p_vlc : 0; -pic_param->mb_mode_table= 0; /* XXX: interlaced frame */ -pic_param->range_reduction_frame= v->rangeredfrm; -pic_param->rounding_control = v->rnd; -pic_param->post_processing = v->postproc; -pic_param->picture_resolution_index = v->respic; -pic_param->luma_scale = v->lumscale; -pic_param->luma_shift = v->lumshift; -pic_param->picture_fields.value = 0; /* reset all bits */ -pic_param->picture_fields.bits.picture_type