Changeset 2573
- Timestamp:
- Apr 6, 2009 1:52:01 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia-codec/ipp_codecs.c
r2516 r2573 201 201 pj_size_t *pkt_size, pj_size_t max_pkt_size); 202 202 203 static void predecode_g7221( ipp_private_t *codec_data, 204 const pjmedia_frame *rtp_frame, 205 USC_Bitstream *usc_frame); 206 static pj_status_t pack_g7221( ipp_private_t *codec_data, void *pkt, 207 pj_size_t *pkt_size, pj_size_t max_pkt_size); 203 208 204 209 /* IPP codec implementation descriptions. */ … … 294 299 {0, "G7221", PJMEDIA_RTP_PT_G722_1_16, &USC_G722_Fxns, 16000, 1, 320, 295 300 16000, 16000, 1, 0, 1, 296 NULL, NULL, NULL,301 predecode_g7221, NULL, pack_g7221, 297 302 {1, {{{"bitrate", 7}, {"16000", 5}}} } 298 303 }, 299 304 {1, "G7221", PJMEDIA_RTP_PT_G722_1_24, &USC_G722_Fxns, 16000, 1, 320, 300 305 24000, 24000, 1, 0, 1, 301 NULL, NULL, NULL,306 predecode_g7221, NULL, pack_g7221, 302 307 {1, {{{"bitrate", 7}, {"24000", 5}}} } 303 308 }, 304 309 {1, "G7221", PJMEDIA_RTP_PT_G722_1_32, &USC_G722_Fxns, 16000, 1, 320, 305 310 32000, 32000, 1, 0, 1, 306 NULL, NULL, NULL,311 predecode_g7221, NULL, pack_g7221, 307 312 {1, {{{"bitrate", 7}, {"32000", 5}}} } 308 313 }, … … 564 569 #endif /* PJMEDIA_HAS_INTEL_IPP_CODEC_AMR */ 565 570 571 572 #if PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 573 574 static void predecode_g7221( ipp_private_t *codec_data, 575 const pjmedia_frame *rtp_frame, 576 USC_Bitstream *usc_frame) 577 { 578 usc_frame->pBuffer = (char*)rtp_frame->buf; 579 usc_frame->nbytes = rtp_frame->size; 580 usc_frame->frametype = 0; 581 usc_frame->bitrate = codec_data->info->params.modes.bitrate; 582 583 #if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0 584 { 585 pj_uint16_t *p, *p_end; 586 587 p = (pj_uint16_t*)rtp_frame->buf; 588 p_end = p + rtp_frame->size/2; 589 while (p < p_end) { 590 *p = pj_ntohs(*p); 591 ++p; 592 } 593 } 594 #endif 595 } 596 597 static pj_status_t pack_g7221( ipp_private_t *codec_data, void *pkt, 598 pj_size_t *pkt_size, pj_size_t max_pkt_size) 599 { 600 PJ_UNUSED_ARG(codec_data); 601 PJ_UNUSED_ARG(max_pkt_size); 602 603 #if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0 604 { 605 pj_uint16_t *p, *p_end; 606 607 p = (pj_uint16_t*)pkt; 608 p_end = p + *pkt_size/2; 609 while (p < p_end) { 610 *p = pj_htons(*p); 611 ++p; 612 } 613 } 614 #else 615 PJ_UNUSED_ARG(pkt); 616 PJ_UNUSED_ARG(pkt_size); 617 #endif 618 619 return PJ_SUCCESS; 620 } 621 622 #endif /* PJMEDIA_HAS_INTEL_IPP_CODEC_G722_1 */ 566 623 567 624 /*
Note: See TracChangeset
for help on using the changeset viewer.