summaryrefslogtreecommitdiffstats
path: root/libhb/enc_qsv.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2014-01-02 14:32:46 +0000
committerRodeo <[email protected]>2014-01-02 14:32:46 +0000
commitc0fce1aeb05b413f2cc8c97698e2ff5ee6f338d9 (patch)
treee3efe5bdc01e8c39e23882fec943079365ddbbf5 /libhb/enc_qsv.c
parent59f27d3ab84dfa5753007f38c143f4cb69898a66 (diff)
qsv: add some frame type helper functions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5950 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/enc_qsv.c')
-rw-r--r--libhb/enc_qsv.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index a906e6dc2..6f17f2b79 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -1406,18 +1406,10 @@ int encqsvWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
// see nal_encode
buf = hb_video_buffer_init( job->width, job->height );
buf->size = 0;
- buf->s.frametype = 0;
- // maping of FrameType(s)
- if(task->bs->FrameType & MFX_FRAMETYPE_IDR ) buf->s.frametype = HB_FRAME_IDR;
- else
- if(task->bs->FrameType & MFX_FRAMETYPE_I ) buf->s.frametype = HB_FRAME_I;
- else
- if(task->bs->FrameType & MFX_FRAMETYPE_P ) buf->s.frametype = HB_FRAME_P;
- else
- if(task->bs->FrameType & MFX_FRAMETYPE_B ) buf->s.frametype = HB_FRAME_B;
-
- if(task->bs->FrameType & MFX_FRAMETYPE_REF ) buf->s.flags = HB_FRAME_REF;
+ // map Media SDK's FrameType to our internal representation
+ buf->s.frametype = hb_qsv_frametype_xlat(task->bs->FrameType,
+ &buf->s.flags);
parse_nalus(task->bs->Data + task->bs->DataOffset,task->bs->DataLength, buf, pv->frames_out);