]> granicus.if.org Git - handbrake/commitdiff
libhb: remove unused hb_buffer_t.sub
authorJohn Stebbins <jstebbins.hb@gmail.com>
Thu, 3 Sep 2015 17:16:03 +0000 (10:16 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Fri, 4 Sep 2015 15:44:03 +0000 (08:44 -0700)
libhb/cropscale.c
libhb/deblock.c
libhb/decomb.c
libhb/deinterlace.c
libhb/denoise.c
libhb/detelecine.c
libhb/fifo.c
libhb/internal.h
libhb/rendersub.c
libhb/rotate.c
libhb/sync.c

index a8a995a6c66dfdb53a875f55a7656f7da0e1b84d..73360245763351aabb08b2f57f6520d5179eec53 100644 (file)
@@ -217,7 +217,6 @@ static hb_buffer_t* crop_scale( hb_filter_private_t * pv, hb_buffer_t * in )
     }
 
     out->s = in->s;
-    hb_buffer_move_subs( out, in );
     return out;
 }
 
index e05f2e21ece5ceeb9ac38485175c889be878a2c6..e48d89ced29301bdfbe5763574d303e4ab719a47 100644 (file)
@@ -439,7 +439,6 @@ static int hb_deblock_work( hb_filter_object_t * filter,
                 0 );
 
         out->s = in->s;
-        hb_buffer_move_subs( out, in );
 
         *buf_out = out;
     }
index 1f6be45c8b1b1a23a8ecd4a4d39fde8d548e0b7e..b00d7ce27c7fc022caf561b6df279eea46513a28 100644 (file)
@@ -2655,9 +2655,6 @@ static int hb_decomb_work( hb_filter_object_t * filter,
             }
         }
     }
-    // Copy subs only to first output buffer
-    hb_buffer_move_subs( out, pv->ref[1] );
-
     hb_buffer_close(&o_buf[0]);
     hb_buffer_close(&o_buf[1]);
 
index 0e8de8d8e986452537be5a0c223870e61a4b6478..cd68a60702b66a139bbcba1f4362dffee4d7a216 100644 (file)
@@ -427,7 +427,6 @@ static hb_buffer_t * deint_fast(hb_filter_private_t * pv, hb_buffer_t * in)
         last = dst;
 
         dst->s = src->s;
-        hb_buffer_move_subs(dst, src);
         hb_buffer_close(&src);
     }
     if (in == NULL)
@@ -675,10 +674,6 @@ static int hb_deinterlace_work( hb_filter_object_t * filter,
             idx ^= 1;
         }
     }
-
-    // Copy subs only to first output buffer
-    hb_buffer_move_subs( out, pv->yadif_ref[1] );
-
     hb_buffer_close(&o_buf[0]);
     hb_buffer_close(&o_buf[1]);
 
index 8057b6c7df9093da7e13ccd42bd919f02e69b4e7..2b6c6c4cfca93a4c4325cf3b97e65de406280be3 100644 (file)
@@ -364,8 +364,6 @@ static int hb_denoise_work( hb_filter_object_t * filter,
     }
 
     out->s = in->s;
-    hb_buffer_move_subs( out, in );
-
     *buf_out = out;
 
     return HB_FILTER_OK;
index 983db217f8f77e66988501fe36f1f8f19c4ba06c..3d79d2595f456a2fc83aea63961130c44968ea97 100644 (file)
@@ -1023,8 +1023,6 @@ static int hb_detelecine_work( hb_filter_object_t * filter,
     pullup_release_frame( frame );
 
     out->s = in->s;
-    hb_buffer_move_subs( out, in );
-
     *buf_out = out;
 
 output_frame:
index 72c1c181fb3f42158eec2283ac33ce3022f27324..0a4c0ae3ddf5855a84d97ada639cde0a9c95e8f3 100644 (file)
@@ -686,9 +686,6 @@ void hb_buffer_close( hb_buffer_t ** _b )
         hb_list_rem(buffers.alloc_list, b);
         hb_unlock(buffers.lock);
 #endif
-        // Close any attached subtitle buffers
-        hb_buffer_close( &b->sub );
-
         if( buffer_pool && b->data && !hb_fifo_is_full( buffer_pool ) )
         {
             hb_fifo_push_head( buffer_pool, b );
@@ -723,18 +720,6 @@ void hb_buffer_close( hb_buffer_t ** _b )
     *_b = NULL;
 }
 
-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_image_t * hb_image_init(int pix_fmt, int width, int height)
 {
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
@@ -1175,29 +1160,6 @@ void hb_fifo_push_head( hb_fifo_t * f, hb_buffer_t * b )
     hb_unlock( f->lock );
 }
 
-// Pushes a list of packets onto the specified FIFO as a single element.
-void hb_fifo_push_list_element( hb_fifo_t *fifo, hb_buffer_t *buffer_list )
-{
-    hb_buffer_t *container = hb_buffer_init( 0 );
-    // XXX: Using an arbitrary hb_buffer_t pointer (other than 'next')
-    //      to carry the list inside a single "container" buffer
-    container->sub = buffer_list;
-    
-    hb_fifo_push( fifo, container );
-}
-
-// Removes a list of packets from the specified FIFO that were stored as a single element.
-hb_buffer_t *hb_fifo_get_list_element( hb_fifo_t *fifo )
-{
-    hb_buffer_t *container = hb_fifo_get( fifo );
-    // XXX: Using an arbitrary hb_buffer_t pointer (other than 'next')
-    //      to carry the list inside a single "container" buffer
-    hb_buffer_t *buffer_list = container->sub;
-    hb_buffer_close( &container );
-    
-    return buffer_list;
-}
-
 void hb_fifo_close( hb_fifo_t ** _f )
 {
     hb_fifo_t   * f = *_f;
index 4be0dffc333d6ba09b7c478fdf39541a12f9b209..0192dab66a32cd852abb600e9fb4e7d03e757dba 100644 (file)
@@ -160,16 +160,6 @@ struct hb_buffer_s
     // Store this data here when read and pass to decoder.
     hb_buffer_t * palette;
 
-    // PICTURESUB subtitle packets:
-
-    // Video packets (after processing by the hb_sync_video work-object):
-    //   A (copy of a) PICTURESUB subtitle packet that needs to be burned into 
-    //   this video packet by the vobsub renderer filter
-    //
-    //   Subtitles that are simply passed thru are NOT attached to the 
-    //   associated video packets.
-    hb_buffer_t * sub;
-
     // Packets in a list:
     //   the next packet in the list
     hb_buffer_t * next;
@@ -189,7 +179,6 @@ void          hb_buffer_close( hb_buffer_t ** );
 hb_buffer_t * hb_buffer_dup( const hb_buffer_t * src );
 int           hb_buffer_copy( hb_buffer_t * dst, const hb_buffer_t * src );
 void          hb_buffer_swap_copy( hb_buffer_t *src, hb_buffer_t *dst );
-void          hb_buffer_move_subs( hb_buffer_t * dst, hb_buffer_t * src );
 hb_image_t  * hb_image_init(int pix_fmt, int width, int height);
 hb_image_t  * hb_buffer_to_image(hb_buffer_t *buf);
 
@@ -208,8 +197,6 @@ void          hb_fifo_push( hb_fifo_t *, hb_buffer_t * );
 void          hb_fifo_push_wait( hb_fifo_t *, hb_buffer_t * );
 int           hb_fifo_full_wait( hb_fifo_t * f );
 void          hb_fifo_push_head( hb_fifo_t *, hb_buffer_t * );
-void          hb_fifo_push_list_element( hb_fifo_t *fifo, hb_buffer_t *buffer_list );
-hb_buffer_t * hb_fifo_get_list_element( hb_fifo_t *fifo );
 void          hb_fifo_close( hb_fifo_t ** );
 void          hb_fifo_flush( hb_fifo_t * f );
 
index 3c17c4a01c592c6c7bfa343701e709d1982da802..dee178d1919f7a9b11648053a46093ee4454c8bc 100644 (file)
@@ -775,11 +775,7 @@ static void ApplyPGSSubs( hb_filter_private_t * pv, hb_buffer_t * buf )
         sub = hb_list_item( pv->sub_list, 0 );
         if ( sub->s.start <= buf->s.start )
         {
-            while ( sub )
-            {
-                ApplySub( pv, buf, sub );
-                sub = sub->sub;
-            }
+            ApplySub( pv, buf, sub );
         }
     }
 }
index 090a1b4183be170a0f4f5705ea1bac228a80b37f..7c96e99c00f0a14069181928a4ef3ad11d443fc0 100644 (file)
@@ -419,9 +419,8 @@ static int hb_rotate_work( hb_filter_object_t * filter,
 
     // Rotate!
     rotate_filter( pv, out, in );
+
     out->s = in->s;
-    hb_buffer_move_subs( out, in );
-    
     *buf_out = out;
     
     return HB_FILTER_OK;
index 3c2a7ffbd590fd7eeb4a6ddeae4bd03476c39679..688e1cd538afb9005b74c4d636d6de435e8c18c5 100644 (file)
@@ -904,7 +904,6 @@ int syncVideoWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
     *buf_out = cur;
     int64_t duration = next_start - cur->s.start;
     sync->cur = cur = next;
-    cur->sub = NULL;
     cur->s.start -= pv->common->video_pts_slip;
     if (cur->s.renderOffset != AV_NOPTS_VALUE)
         cur->s.renderOffset -= pv->common->video_pts_slip;