• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/minidlna/ffmpeg-0.5.1/libavcodec/

Lines Matching refs:x4

57     X264Context *x4 = ctx->priv_data;
62 if (x4->sei_size > 0 && nnal > 0) {
63 memcpy(p, x4->sei, x4->sei_size);
64 p += x4->sei_size;
65 x4->sei_size = 0;
71 x4->sei_size = nals[i].i_payload;
72 x4->sei = av_malloc(x4->sei_size);
73 memcpy(x4->sei, nals[i].p_payload, nals[i].i_payload);
85 X264Context *x4 = ctx->priv_data;
90 if (x4->sei_size > 0 && nnal > 0) {
91 memcpy(p, x4->sei, x4->sei_size);
92 p += x4->sei_size;
93 x4->sei_size = 0;
99 x4->sei = av_malloc( 5 + nals[i].i_payload * 4 / 3 );
100 if(x264_nal_encode(x4->sei, &x4->sei_size, 1, nals + i) < 0)
117 X264Context *x4 = ctx->priv_data;
123 x4->pic.img.i_csp = X264_CSP_I420;
124 x4->pic.img.i_plane = 3;
128 x4->pic.img.plane[i] = frame->data[i];
129 x4->pic.img.i_stride[i] = frame->linesize[i];
132 x4->pic.i_pts = frame->pts;
133 x4->pic.i_type = X264_TYPE_AUTO;
136 if (x264_encoder_encode(x4->enc, &nal, &nnal, frame? &x4->pic: NULL, &pic_out) < 0)
144 x4->out_pic.pts = pic_out.i_pts;
149 x4->out_pic.pict_type = FF_I_TYPE;
152 x4->out_pic.pict_type = FF_P_TYPE;
156 x4->out_pic.pict_type = FF_B_TYPE;
161 x4->out_pic.key_frame = pic_out.i_type == X264_TYPE_IDR;
163 x4->out_pic.key_frame = pic_out.b_keyframe;
165 x4->out_pic.quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
172 X264Context *x4 = avctx->priv_data;
175 av_free(x4->sei);
177 if (x4->enc)
178 x264_encoder_close(x4->enc);
185 X264Context *x4 = avctx->priv_data;
187 x4->sei_size = 0;
188 x264_param_default(&x4->params);
190 x4->params.pf_log = X264_log;
191 x4->params.p_log_private = avctx;
193 x4->params.i_keyint_max = avctx->gop_size;
194 x4->params.rc.i_bitrate = avctx->bit_rate / 1000;
195 x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
196 x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate / 1000;
197 x4->params.rc.b_stat_write = avctx->flags & CODEC_FLAG_PASS1;
199 x4->params.rc.b_stat_read = 1;
202 x4->params.rc.i_rc_method = X264_RC_CRF;
203 x4->params.rc.f_rf_constant = avctx->crf;
205 x4->params.rc.i_rc_method = X264_RC_CQP;
206 x4->params.rc.i_qp_constant = avctx->cqp;
213 x4->params.rc.i_rc_method = X264_RC_ABR;
215 x4->params.i_bframe = avctx->max_b_frames;
216 x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
217 x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
218 x4->params.i_bframe_bias = avctx->bframebias;
220 x4->params.i_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID ? X264_B_PYRAMID_NORMAL : X264_B_PYRAMID_NONE;
222 x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
226 x4->params.i_keyint_min = avctx->keyint_min;
227 if (x4->params.i_keyint_min > x4->params.i_keyint_max)
228 x4->params.i_keyint_min = x4->params.i_keyint_max;
230 x4->params.i_scenecut_threshold = avctx->scenechange_threshold;
232 x4->params.b_deblocking_filter = avctx->flags & CODEC_FLAG_LOOP_FILTER;
233 x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha;
234 x4->params.i_deblocking_filter_beta = avctx->deblockbeta;
236 x4->params.rc.i_qp_min = avctx->qmin;
237 x4->params.rc.i_qp_max = avctx->qmax;
238 x4->params.rc.i_qp_step = avctx->max_qdiff;
240 x4->params.rc.f_qcompress = avctx->qcompress; /* 0.0 => cbr, 1.0 => constant qp */
241 x4->params.rc.f_qblur = avctx->qblur; /* temporally blur quants */
242 x4->params.rc.f_complexity_blur = avctx->complexityblur;
244 x4->params.i_frame_reference = avctx->refs;
246 x4->params.i_width = avctx->width;
247 x4->params.i_height = avctx->height;
248 x4->params.vui.i_sar_width = avctx->sample_aspect_ratio.num;
249 x4->params.vui.i_sar_height = avctx->sample_aspect_ratio.den;
251 x4->params.i_fps_num = x4->params.i_timebase_den = avctx->time_base.den;
252 x4->params.i_fps_den = x4->params.i_timebase_num = avctx->time_base.num;
255 x4->params.analyse.inter = 0;
258 x4->params.analyse.inter |= X264_ANALYSE_I4x4;
260 x4->params.analyse.inter |= X264_ANALYSE_I8x8;
262 x4->params.analyse.inter |= X264_ANALYSE_PSUB16x16;
264 x4->params.analyse.inter |= X264_ANALYSE_PSUB8x8;
266 x4->params.analyse.inter |= X264_ANALYSE_BSUB16x16;
269 x4->params.analyse.i_direct_mv_pred = avctx->directpred;
271 x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
273 x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred;
277 x4->params.analyse.i_me_method = X264_ME_DIA;
279 x4->params.analyse.i_me_method = X264_ME_HEX;
281 x4->params.analyse.i_me_method = X264_ME_UMH;
283 x4->params.analyse.i_me_method = X264_ME_ESA;
285 x4->params.analyse.i_me_method = X264_ME_TESA;
286 else x4->params.analyse.i_me_method = X264_ME_HEX;
288 x4->params.analyse.i_me_range = avctx->me_range;
289 x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
291 x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
292 x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
293 x4->params.analyse.b_transform_8x8 = avctx->flags2 & CODEC_FLAG2_8X8DCT;
294 x4->params.analyse.b_fast_pskip = avctx->flags2 & CODEC_FLAG2_FASTPSKIP;
296 x4->params.analyse.i_trellis = avctx->trellis;
297 x4->params.analyse.i_noise_reduction = avctx->noise_reduction;
300 x4->params.i_level_idc = avctx->level;
302 x4->params.rc.f_rate_tolerance =
307 x4->params.rc.f_vbv_buffer_init =
310 x4->params.rc.f_vbv_buffer_init = 0.9;
313 x4->params.rc.b_mb_tree = !!(avctx->flags2 & CODEC_FLAG2_MBTREE);
315 x4->params.rc.f_ip_factor = 1 / fabs(avctx->i_quant_factor);
316 x4->params.rc.f_pb_factor = avctx->b_quant_factor;
317 x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
319 x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
320 x4->params.i_log_level = X264_LOG_DEBUG;
322 x4->params.b_aud = avctx->flags2 & CODEC_FLAG2_AUD;
324 x4->params.i_threads = avctx->thread_count;
326 x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
329 x4->params.b_repeat_headers = 0;
331 x4->enc = x264_encoder_open(&x4->params);
332 if (!x4->enc)
335 avctx->coded_frame = &x4->out_pic;
342 s = x264_encoder_headers(x4->enc, &nal, &nnal);
352 x264_encoder_headers(x4->enc, &nal, &nnal);