diff --git a/crystalhd_decoder.c b/crystalhd_decoder.c index cf71ebd..c7bc094 100644 --- a/crystalhd_decoder.c +++ b/crystalhd_decoder.c @@ -160,7 +160,7 @@ static void crystalhd_video_render (crystalhd_video_decoder_t *this, image_buffe } } -static void* crystalhd_video_rec_thread (void *this_gen) { +void* crystalhd_video_rec_thread (void *this_gen) { crystalhd_video_decoder_t *this = (crystalhd_video_decoder_t *) this_gen; BC_STATUS ret = BC_STS_ERROR; diff --git a/crystalhd_decoder.h b/crystalhd_decoder.h index 45ac857..2bf5b73 100644 --- a/crystalhd_decoder.h +++ b/crystalhd_decoder.h @@ -227,6 +227,7 @@ typedef struct crystalhd_video_decoder_s { typedef uint32_t BCM_STREAM_TYPE; typedef uint32_t BCM_VIDEO_ALGO; +void *crystalhd_video_rec_thread (void *this_gen); void crystalhd_decode_package (uint8_t *buf, uint32_t size); void set_video_params (crystalhd_video_decoder_t *this); diff --git a/crystalhd_mpeg.c b/crystalhd_mpeg.c index f7e74bf..b53b7a4 100644 --- a/crystalhd_mpeg.c +++ b/crystalhd_mpeg.c @@ -416,7 +416,7 @@ void mpeg_decode_picture( crystalhd_video_decoder_t *this, uint8_t end_of_sequen lprintf("crystalhd_mpeg: slice buf len %ld\n", len); - memcpy(buf, pic->slices, len); + xine_fast_memcpy(buf, pic->slices, len); #define FILEDEBUG 1 #ifdef FILEDEBUG diff --git a/crystalhd_vc1.c b/crystalhd_vc1.c index abec18c..5707f15 100644 --- a/crystalhd_vc1.c +++ b/crystalhd_vc1.c @@ -134,7 +134,7 @@ void crystalhd_vc1_handle_buffer (crystalhd_video_decoder_t *this, if ((bytestream[0] == 0x00) && (bytestream[1] == 0x00) && (bytestream[2] == 0x01)) { if(sequence->bytestream_bytes) { - memcpy(p, sequence->bytestream, sequence->bytestream_bytes); + xine_fast_memcpy(p, sequence->bytestream, sequence->bytestream_bytes); p+=sequence->bytestream_bytes; } @@ -178,7 +178,7 @@ void crystalhd_vc1_handle_buffer (crystalhd_video_decoder_t *this, } } - memcpy(p, bytestream, bytestream_bytes); + xine_fast_memcpy(p, bytestream, bytestream_bytes); //crystalhd_decode_package(buf, 20); if(this->set_form) { @@ -450,7 +450,7 @@ void parse_header( crystalhd_video_decoder_t *this, uint8_t *buf, int len ) free(sequence->bytestream); sequence->bytestream_bytes = len-off; sequence->bytestream = realloc( sequence->bytestream, sequence->bytestream_bytes ); - memcpy(sequence->bytestream, buf+off, sequence->bytestream_bytes); + xine_fast_memcpy(sequence->bytestream, buf+off, sequence->bytestream_bytes); break; } @@ -462,7 +462,7 @@ void parse_header( crystalhd_video_decoder_t *this, uint8_t *buf, int len ) free(sequence->bytestream); sequence->bytestream_bytes = len; sequence->bytestream = realloc( sequence->bytestream, sequence->bytestream_bytes ); - memcpy(sequence->bytestream, buf, sequence->bytestream_bytes); + xine_fast_memcpy(sequence->bytestream, buf, sequence->bytestream_bytes); sequence_header( this, buf, len ); } @@ -483,7 +483,7 @@ void remove_emulation_prevention( uint8_t *src, uint8_t *dst, int src_len, int * ++removed; } else { - memcpy( dst+len, src+i, 4 ); + xine_fast_memcpy( dst+len, src+i, 4 ); ++len; } } @@ -520,7 +520,7 @@ int parse_code( crystalhd_video_decoder_t *this, uint8_t *buf, int len ) free(sequence->bytestream); sequence->bytestream_bytes = dst_len; sequence->bytestream = realloc( sequence->bytestream, sequence->bytestream_bytes ); - memcpy(sequence->bytestream, tmp, sequence->bytestream_bytes); + xine_fast_memcpy(sequence->bytestream, tmp, sequence->bytestream_bytes); free( tmp ); break; @@ -532,7 +532,7 @@ int parse_code( crystalhd_video_decoder_t *this, uint8_t *buf, int len ) sequence->bytestream_bytes += dst_len; sequence->bytestream = realloc( sequence->bytestream, sequence->bytestream_bytes); - memcpy(sequence->bytestream + ( sequence->bytestream_bytes - dst_len), tmp, dst_len); + xine_fast_memcpy(sequence->bytestream + ( sequence->bytestream_bytes - dst_len), tmp, dst_len); free( tmp ); break; diff --git a/h264_parser.c b/h264_parser.c index 090eb1b..579754e 100644 --- a/h264_parser.c +++ b/h264_parser.c @@ -135,7 +135,7 @@ static void decode_nal(uint8_t **ret, int *len_ret, uint8_t *buf, int buf_len) static inline void dump_bits(const char *label, const struct buf_reader *buf, int bits) { struct buf_reader lbuf; - memcpy(&lbuf, buf, sizeof(struct buf_reader)); + xine_fast_memcpy(&lbuf, buf, sizeof(struct buf_reader)); int i; printf("%s: 0b", label); @@ -448,7 +448,7 @@ void parse_scaling_list(struct buf_reader *buf, uint8_t *scaling_list, for(i = 0; i < sizeof(default_4x4_intra); i++) { scaling_list[zigzag_4x4[i]] = default_4x4_intra[i]; } - //memcpy(scaling_list, default_4x4_intra, sizeof(default_4x4_intra)); + //xine_fast_memcpy(scaling_list, default_4x4_intra, sizeof(default_4x4_intra)); break; } case 3: @@ -457,21 +457,21 @@ void parse_scaling_list(struct buf_reader *buf, uint8_t *scaling_list, for(i = 0; i < sizeof(default_4x4_inter); i++) { scaling_list[zigzag_4x4[i]] = default_4x4_inter[i]; } - //memcpy(scaling_list, default_4x4_inter, sizeof(default_4x4_inter)); + //xine_fast_memcpy(scaling_list, default_4x4_inter, sizeof(default_4x4_inter)); break; } case 6: { for(i = 0; i < sizeof(default_8x8_intra); i++) { scaling_list[zigzag_8x8[i]] = default_8x8_intra[i]; } - //memcpy(scaling_list, default_8x8_intra, sizeof(default_8x8_intra)); + //xine_fast_memcpy(scaling_list, default_8x8_intra, sizeof(default_8x8_intra)); break; } case 7: { for(i = 0; i < sizeof(default_8x8_inter); i++) { scaling_list[zigzag_8x8[i]] = default_8x8_inter[i]; } - //memcpy(scaling_list, default_8x8_inter, sizeof(default_8x8_inter)); + //xine_fast_memcpy(scaling_list, default_8x8_inter, sizeof(default_8x8_inter)); break; } } @@ -486,34 +486,34 @@ static void sps_scaling_list_fallback(struct seq_parameter_set_rbsp *sps, int i) for(j = 0; j < sizeof(default_4x4_intra); j++) { sps->scaling_lists_4x4[i][zigzag_4x4[j]] = default_4x4_intra[j]; } - //memcpy(sps->scaling_lists_4x4[i], default_4x4_intra, sizeof(sps->scaling_lists_4x4[i])); + //xine_fast_memcpy(sps->scaling_lists_4x4[i], default_4x4_intra, sizeof(sps->scaling_lists_4x4[i])); break; } case 3: { for(j = 0; j < sizeof(default_4x4_inter); j++) { sps->scaling_lists_4x4[i][zigzag_4x4[j]] = default_4x4_inter[j]; } - //memcpy(sps->scaling_lists_4x4[i], default_4x4_inter, sizeof(sps->scaling_lists_4x4[i])); + //xine_fast_memcpy(sps->scaling_lists_4x4[i], default_4x4_inter, sizeof(sps->scaling_lists_4x4[i])); break; } case 1: case 2: case 4: case 5: - memcpy(sps->scaling_lists_4x4[i], sps->scaling_lists_4x4[i-1], sizeof(sps->scaling_lists_4x4[i])); + xine_fast_memcpy(sps->scaling_lists_4x4[i], sps->scaling_lists_4x4[i-1], sizeof(sps->scaling_lists_4x4[i])); break; case 6: { for(j = 0; j < sizeof(default_8x8_intra); j++) { sps->scaling_lists_8x8[i-6][zigzag_8x8[j]] = default_8x8_intra[j]; } - //memcpy(sps->scaling_lists_8x8[i-6], default_8x8_intra, sizeof(sps->scaling_lists_8x8[i-6])); + //xine_fast_memcpy(sps->scaling_lists_8x8[i-6], default_8x8_intra, sizeof(sps->scaling_lists_8x8[i-6])); break; } case 7: { for(j = 0; j < sizeof(default_8x8_inter); j++) { sps->scaling_lists_8x8[i-6][zigzag_8x8[j]] = default_8x8_inter[j]; } - //memcpy(sps->scaling_lists_8x8[i-6], default_8x8_inter, sizeof(sps->scaling_lists_8x8[i-6])); + //xine_fast_memcpy(sps->scaling_lists_8x8[i-6], default_8x8_inter, sizeof(sps->scaling_lists_8x8[i-6])); break; } @@ -525,17 +525,17 @@ static void pps_scaling_list_fallback(struct seq_parameter_set_rbsp *sps, struct switch (i) { case 0: case 3: - memcpy(pps->scaling_lists_4x4[i], sps->scaling_lists_4x4[i], sizeof(pps->scaling_lists_4x4[i])); + xine_fast_memcpy(pps->scaling_lists_4x4[i], sps->scaling_lists_4x4[i], sizeof(pps->scaling_lists_4x4[i])); break; case 1: case 2: case 4: case 5: - memcpy(pps->scaling_lists_4x4[i], pps->scaling_lists_4x4[i-1], sizeof(pps->scaling_lists_4x4[i])); + xine_fast_memcpy(pps->scaling_lists_4x4[i], pps->scaling_lists_4x4[i-1], sizeof(pps->scaling_lists_4x4[i])); break; case 6: case 7: - memcpy(pps->scaling_lists_8x8[i-6], sps->scaling_lists_8x8[i-6], sizeof(pps->scaling_lists_8x8[i-6])); + xine_fast_memcpy(pps->scaling_lists_8x8[i-6], sps->scaling_lists_8x8[i-6], sizeof(pps->scaling_lists_8x8[i-6])); break; } @@ -1003,9 +1003,9 @@ void interpret_pps(struct coded_picture *pic) } if (!pps->pic_scaling_matrix_present_flag && sps != NULL) { - memcpy(pps->scaling_lists_4x4, sps->scaling_lists_4x4, + xine_fast_memcpy(pps->scaling_lists_4x4, sps->scaling_lists_4x4, sizeof(pps->scaling_lists_4x4)); - memcpy(pps->scaling_lists_8x8, sps->scaling_lists_8x8, + xine_fast_memcpy(pps->scaling_lists_8x8, sps->scaling_lists_8x8, sizeof(pps->scaling_lists_8x8)); } }