summaryrefslogtreecommitdiffstats
path: root/libhb/fifo.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2013-08-22 20:33:35 +0000
committerRodeo <[email protected]>2013-08-22 20:33:35 +0000
commitd41905d539046445e1b81499ff7bd04d170c91d4 (patch)
tree3f39a09e757bca8bc461d46303a2cb1c35e8d9a6 /libhb/fifo.c
parentc1a493b581f0567eba92625f2ee132de8e7f1d6d (diff)
Big merge, QSV to trunk: part 1 (tracked files).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5737 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/fifo.c')
-rw-r--r--libhb/fifo.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c
index a32242c03..be69616f1 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -389,6 +389,10 @@ hb_buffer_t * hb_buffer_dup( const hb_buffer_t * src )
hb_buffer_init_planes( buf );
}
+#ifdef USE_QSV
+ memcpy(&buf->qsv_details, &src->qsv_details, sizeof(src->qsv_details));
+#endif
+
return buf;
}
@@ -412,7 +416,7 @@ int hb_buffer_copy(hb_buffer_t * dst, const hb_buffer_t * src)
static void hb_buffer_init_planes_internal( hb_buffer_t * b, uint8_t * has_plane )
{
uint8_t * plane = b->data;
- int p, tot = 0;
+ int p;
for( p = 0; p < 4; p++ )
{
@@ -425,7 +429,6 @@ static void hb_buffer_init_planes_internal( hb_buffer_t * b, uint8_t * has_plane
b->plane[p].height = hb_image_height( b->f.fmt, b->f.height, p );
b->plane[p].size = b->plane[p].stride * b->plane[p].height_stride;
plane += b->plane[p].size;
- tot += b->plane[p].size;
}
}
}
@@ -508,6 +511,7 @@ void hb_video_buffer_realloc( hb_buffer_t * buf, int width, int height )
buf->f.width = width;
buf->f.height = height;
+ buf->size = size;
hb_buffer_init_planes_internal( buf, has_plane );
}
@@ -570,6 +574,11 @@ void hb_buffer_move_subs( hb_buffer_t * dst, hb_buffer_t * src )
// Note that dst takes ownership of the subtitles
dst->sub = src->sub;
src->sub = NULL;
+
+#ifdef USE_QSV
+ memcpy(&dst->qsv_details, &src->qsv_details, sizeof(src->qsv_details));
+#endif
+
}
hb_fifo_t * hb_fifo_init( int capacity, int thresh )