diff options
author | sr55 <[email protected]> | 2013-03-16 18:06:11 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-03-16 18:06:11 +0000 |
commit | b46fc44c7540090fc0605159e70b6afb3996620e (patch) | |
tree | 5ae7901a1850700cd76217112dbb10c7067be089 | |
parent | 878b39d6505c48d2aece1cd3208635992b3f9fbf (diff) |
Shift USE_HWD blocks around methods we no longer use but the HWD still does. Can these be removed now?
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5333 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | libhb/decavcodec.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 1c8f391e4..54acc689f 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -675,9 +675,12 @@ static hb_buffer_t *copy_frame( hb_work_private_t *pv, AVFrame *frame ) #endif } +#ifdef USE_HWD + +/* These methods are only used by HWD now. Can we remove this as per these changes: https://trac.handbrake.fr/changeset?reponame=&new=5323%40trunk%2Flibhb%2Fdecavcodec.c&old=5242%40trunk%2Flibhb%2Fdecavcodec.c */ static int get_frame_buf( AVCodecContext *context, AVFrame *frame ) { -#ifdef USE_HWD + hb_work_private_t *pv = (hb_work_private_t*)context->opaque; if ( (pv != NULL) && pv->dxva2 ) { @@ -689,7 +692,6 @@ static int get_frame_buf( AVCodecContext *context, AVFrame *frame ) return 0; } else -#endif return avcodec_default_get_buffer( context, frame ); } @@ -697,6 +699,7 @@ static int reget_frame_buf( AVCodecContext *context, AVFrame *frame ) { return avcodec_default_reget_buffer( context, frame ); } +#endif static void log_chapter( hb_work_private_t *pv, int chap_num, int64_t pts ) { @@ -1116,19 +1119,20 @@ static void hb_ffmpeg_release_frame_buf( struct AVCodecContext *p_context, AVFra for( i = 0; i < 4; i++ ) frame->data[i] = NULL; } -#endif +/* This is only used by HWD now. Can we remove this as per these changes: https://trac.handbrake.fr/changeset?reponame=&new=5323%40trunk%2Flibhb%2Fdecavcodec.c&old=5242%40trunk%2Flibhb%2Fdecavcodec.c */ static void init_video_avcodec_context( hb_work_private_t *pv ) { /* we have to wrap ffmpeg's get_buffer to be able to set the pts (?!) */ pv->context->opaque = pv; pv->context->get_buffer = get_frame_buf; pv->context->reget_buffer = reget_frame_buf; -#ifdef USE_HWD + if( pv->dxva2 && pv->dxva2->do_job==HB_WORK_OK ) pv->context->release_buffer = hb_ffmpeg_release_frame_buf; -#endif } +#endif + static int decavcodecvInit( hb_work_object_t * w, hb_job_t * job ) { |